Giter VIP home page Giter VIP logo

tachyon-camera-app's Introduction

tachyon-camera-app

An Amplify app to take pictures and upload the to S3 for processing.

How this was built

Install required modules

npm install -g @aws-amplify/cli
npm install -g @vue/cli

Create the Vue app

vue create tachyon-camera-app

You will see:

๐ŸŽ‰  Successfully created project tachyon-camera-app.
๐Ÿ‘‰  Get started with the following commands:

 $ cd tachyon-camera-app
 $ npm run serve

Verify the app starts

Follow the advice offered and:

cd tachyon-camera-app
npm run serve

A browser window should open to http::/localhost:3000

Amplify your efforts

Let AWS do the undifferentiated heavy lifting, Amplify is amazing for that.

Initailize Amplify

Choose defaults unless you know what you are doing.

amplify init

Answer as below:

amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project tachyoncameraapp
? Enter a name for the environment dev
? Choose your default editor: Visual Studio Code
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using react

? Source Directory Path:  src
? Distribution Directory Path: build
? Build Command:  npm run-script build
? Start Command: npm run-script start
? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use default

Output will be similar to:

Initialized your environment successfully.

Your project has been successfully initialized and connected to the cloud!

Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify add <category>" will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify console" to open the Amplify Console and view your project status
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud

Pro tip:
Try "amplify add api" to create a backend API and then "amplify publish" to deploy everything

Add Authentication

Getting auth correct yourself is easy, installing Amplify auth is easy. Choose the Default Configuration for now, its easy to rerun Amplify later to update to add facebook or other Social auth.

amplify add auth

Use ther defaults as shown:

Using service: Cognito, provided by: awscloudformation
 The current configured provider is Amazon Cognito.
 Do you want to use the default authentication and security configuration? Default configuration
 Warning: you will not be able to edit these selections.
 How do you want users to be able to sign in? Username
 Do you want to configure advanced settings? (Use arrow keys)
โฏ No, I am done.

Push your changes out to AWS Amplify

amplify push
Current Environment: dev

| Category | Resource name         | Operation | Provider plugin   |
| -------- | --------------------- | --------- | ----------------- |
| Auth     | tachyoncameraapp12345 | Create    | awscloudformation |
? Are you sure you want to continue? (Y/n)

Integrate Amplify with Vue

Install modules

npm install aws-amplify @aws-amplify/ui-vue --save

Import Amplify and config in src/index.js

Edit src/index.js and add the following code below the last import:

import Amplify from "aws-amplify";
import awsExports from "./aws-exports";
Amplify.configure(awsExports);

Create a simple layout

Edit src/App.js, replace it with he following content.

import './App.css';
import { withAuthenticator, AmplifySignOut } from '@aws-amplify/ui-react';

const App = () => (
  <div>
    <AmplifySignOut />
    My App
  </div>
);

export default withAuthenticator(App);

Create an account and Login

On http://localhost:8080 you should now see an auth prompt. Create an account through the link on that page and verify you can login.

Install MDB Bootstrap Vue

Open a new shell window for the remaining commands so the node app remains running.

vue add mdb

tachyon-camera-app's People

Contributors

bwinkers avatar

Watchers

James Cloos avatar  avatar

Forkers

bwinkers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.