Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss58 #69

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#amplify-do-not-edit-begin
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/logs
amplify/mock-data
amplify/mock-api-resources
amplify/backend/amplify-meta.json
amplify/backend/.temp
build/
dist/
node_modules/
aws-exports.js
awsconfiguration.json
amplifyconfiguration.json
amplifyconfiguration.dart
amplify-build-config.json
amplify-gradle-config.json
amplifytools.xcconfig
.secret-*
**.sample
#amplify-do-not-edit-end
17 changes: 17 additions & 0 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "lumina",
"version": "3.1",
"frontend": "javascript",
"javascript": {
"framework": "none",
"config": {
"SourceDir": "src",
"DistributionDir": "dist",
"BuildCommand": "npm.cmd run-script build",
"StartCommand": "npm.cmd run-script start"
}
},
"providers": [
"awscloudformation"
]
}
8 changes: 8 additions & 0 deletions amplify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Getting Started with Amplify CLI
This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).

Helpful resources:
- Amplify documentation: https://docs.amplify.aws
- Amplify CLI documentation: https://docs.amplify.aws/cli
- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
- Join Amplify's community: https://amplify.aws/community/
49 changes: 49 additions & 0 deletions amplify/backend/auth/lumina7406d3a9/cli-inputs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "1",
"cognitoConfig": {
"identityPoolName": "lumina7406d3a9_identitypool_7406d3a9",
"allowUnauthenticatedIdentities": false,
"resourceNameTruncated": "lumina7406d3a9",
"userPoolName": "lumina7406d3a9_userpool_7406d3a9",
"autoVerifiedAttributes": [
"email"
],
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS Text Message"
],
"smsAuthenticationMessage": "Your authentication code is {####}",
"smsVerificationMessage": "Your verification code is {####}",
"emailVerificationSubject": "Your verification code",
"emailVerificationMessage": "Your verification code is {####}",
"defaultPasswordPolicy": false,
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": [],
"requiredAttributes": [
"email"
],
"aliasAttributes": [],
"userpoolClientGenerateSecret": false,
"userpoolClientRefreshTokenValidity": 30,
"userpoolClientWriteAttributes": [
"email"
],
"userpoolClientReadAttributes": [
"email"
],
"userpoolClientLambdaRole": "lumina7406d3a9_userpoolclient_lambda_role",
"userpoolClientSetAttributes": false,
"sharedId": "7406d3a9",
"resourceName": "lumina7406d3a9",
"authSelections": "identityPoolAndUserPool",
"useDefault": "default",
"usernameAttributes": [
"email"
],
"triggers": {},
"userPoolGroupList": [],
"serviceName": "Cognito",
"usernameCaseSensitive": false,
"useEnabledMfas": true
}
}
30 changes: 30 additions & 0 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"auth": {
"lumina7406d3a9": {
"customAuth": false,
"dependsOn": [],
"frontendAuthConfig": {
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS"
],
"passwordProtectionSettings": {
"passwordPolicyCharacters": [],
"passwordPolicyMinLength": 8
},
"signupAttributes": [
"EMAIL"
],
"socialProviders": [],
"usernameAttributes": [
"EMAIL"
],
"verificationMechanisms": [
"EMAIL"
]
},
"providerPlugin": "awscloudformation",
"service": "Cognito"
}
}
}
10 changes: 10 additions & 0 deletions amplify/backend/tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"Key": "user:Stack",
"Value": "{project-env}"
},
{
"Key": "user:Application",
"Value": "{project-name}"
}
]
13 changes: 13 additions & 0 deletions amplify/backend/types/amplify-dependent-resources-ref.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export type AmplifyDependentResourcesAttributes = {
"auth": {
"lumina7406d3a9": {
"AppClientID": "string",
"AppClientIDWeb": "string",
"IdentityPoolId": "string",
"IdentityPoolName": "string",
"UserPoolArn": "string",
"UserPoolId": "string",
"UserPoolName": "string"
}
}
}
63 changes: 63 additions & 0 deletions amplify/cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"features": {
"graphqltransformer": {
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
"skipoverridemutationinputtypes": true,
"transformerversion": 2,
"suppressschemamigrationprompt": true,
"securityenhancementnotification": false,
"showfieldauthnotification": false,
"usesubusernamefordefaultidentityclaim": true,
"usefieldnameforprimarykeyconnectionfield": false,
"enableautoindexquerynames": true,
"respectprimarykeyattributesonconnectionfield": true,
"shoulddeepmergedirectiveconfigdefaults": false,
"populateownerfieldforstaticgroupauth": true
},
"frontend-ios": {
"enablexcodeintegration": true
},
"auth": {
"enablecaseinsensitivity": true,
"useinclusiveterminology": true,
"breakcirculardependency": true,
"forcealiasattributes": false,
"useenabledmfas": true
},
"codegen": {
"useappsyncmodelgenplugin": true,
"usedocsgeneratorplugin": true,
"usetypesgeneratorplugin": true,
"cleangeneratedmodelsdirectory": true,
"retaincasestyle": true,
"addtimestampfields": true,
"handlelistnullabilitytransparently": true,
"emitauthprovider": true,
"generateindexrules": true,
"enabledartnullsafety": true,
"generatemodelsforlazyloadandcustomselectionset": false
},
"appsync": {
"generategraphqlpermissions": true
},
"latestregionsupport": {
"pinpoint": 1,
"translate": 1,
"transcribe": 1,
"rekognition": 1,
"textract": 1,
"comprehend": 1
},
"project": {
"overrides": true
}
},
"debug": {
"shareProjectConfig": false
}
}
7 changes: 7 additions & 0 deletions amplify/hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Command Hooks

Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc.

To get started, add your script files based on the expected naming convention in this directory.

Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks
20 changes: 20 additions & 0 deletions amplify/team-provider-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"dev": {
"awscloudformation": {
"AuthRoleName": "amplify-lumina-dev-143108-authRole",
"UnauthRoleArn": "arn:aws:iam::510553689729:role/amplify-lumina-dev-143108-unauthRole",
"AuthRoleArn": "arn:aws:iam::510553689729:role/amplify-lumina-dev-143108-authRole",
"Region": "us-east-1",
"DeploymentBucketName": "amplify-lumina-dev-143108-deployment",
"UnauthRoleName": "amplify-lumina-dev-143108-unauthRole",
"StackName": "amplify-lumina-dev-143108",
"StackId": "arn:aws:cloudformation:us-east-1:510553689729:stack/amplify-lumina-dev-143108/c8942010-aa5b-11ed-ac5f-0ae15995a955",
"AmplifyAppId": "dsrfhmvhf231s"
},
"categories": {
"auth": {
"lumina7406d3a9": {}
}
}
}
}
38 changes: 38 additions & 0 deletions backend/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {Auth} from 'aws-amplify'

const express = require("express")
const app = express()

// signs up new user
async function signUp() {
try {
const { user } = await Auth.signUp({
email, // credentials you enter to log in
password,
attributes: {
firstName, // other attributes associated with account (not used to log in)
lastName,
email,
phoneNumber,
},
autoSignIn: { // optional - enables auto sign in after user is confirmed
enabled: false,
}
});
console.log(user);
} catch (error) {
console.log('error signing up:', error);
}
}

// when a user signs up, they get a confirmation code. If not received, this will resend them a new one
async function resendConfirmationCode() {
try {
await Auth.resendSignUp(email);
console.log('code resent successfully');
} catch (err) {
console.log('error resending code: ', err);
}
}

app.listen(3001)
5 changes: 3 additions & 2 deletions frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.eslintrc.js
amplify
amplify/*
src/models
src/ui-components
src/ui-components
src\models
2 changes: 2 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

lumina.code-workspace
3 changes: 2 additions & 1 deletion frontend/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
"singleQuote": true,
"endOfLine": "lf"
}
Loading