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

Adds Amplify backend and POC registry pages #46

Open
wants to merge 1 commit into
base: main
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
25 changes: 25 additions & 0 deletions daostar-website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,28 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

amplify/team-provider-info.json
src/graphql

#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
18 changes: 18 additions & 0 deletions daostar-website/.graphqlconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
projects:
daostarwebsite:
schemaPath: amplify/backend/api/daostarwebsite/build/schema.graphql
includes:
- src/graphql/**/*.js
excludes:
- ./amplify/**
extensions:
amplify:
codeGenTarget: javascript
generatedFileName: ''
docsFilePath: src/graphql
region: ap-southeast-2
apiId: null
maxDepth: 2
extensions:
amplify:
version: 3
17 changes: 17 additions & 0 deletions daostar-website/amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "daostarwebsite",
"version": "3.1",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "src",
"DistributionDir": "build",
"BuildCommand": "npm run-script build",
"StartCommand": "npm run-script start"
}
},
"providers": [
"awscloudformation"
]
}
8 changes: 8 additions & 0 deletions daostar-website/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/
15 changes: 15 additions & 0 deletions daostar-website/amplify/backend/api/daostarwebsite/cli-inputs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": 1,
"serviceConfiguration": {
"apiName": "daostarwebsite",
"serviceName": "AppSync",
"defaultAuthType": {
"mode": "API_KEY",
"expirationTime": 180,
"apiKeyExpirationDate": "2023-08-12T06:55:07.453Z",
"keyDescription": "testAPI"
},
"conflictResolution": {},
"additionalAuthTypes": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AppSyncApiName": "daostarwebsite",
"DynamoDBBillingMode": "PAY_PER_REQUEST",
"DynamoDBEnableServerSideEncryption": false,
"AuthModeLastUpdated": "2023-02-13T06:55:10.853Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud.
For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers)
72 changes: 72 additions & 0 deletions daostar-website/amplify/backend/api/daostarwebsite/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
input AMPLIFY {
globalAuthRule: AuthRule = { allow: public }
} # FOR TESTING ONLY!
type DAO @model {
id: ID!
searchField: String!
name: String!
treasuryAddresses: [Address!]!
tokenAddresses: [Address!]!
factories: [String!]!
fora: [String!]!
formationDate: AWSDate!
reviewDate: AWSDate
status: DAOStatus!
type: [String!]!
amlStatus: Boolean!
legalRepresentative: Representative!
registrations: [Registeration!]!
presence: [String!]!
exclusions: [String]
wrappers: [Wrapper]
contact: Contact!
}

type Address {
address: String!
description: String
}

enum DAOStatus {
withGovernance
withoutGovernance
warning
shutdown
restructured
}

enum DAOTypes {
publicUseProtocol
memberUseProtocol
}

type Representative {
name: String!
contact: [String!]!
}

enum Registeration {
NONE
US_DE
US_VT
US_WY
BM
MT
MH
CH
}

type Wrapper {
name: String!
jurisdiction: String!
regulator: String!
functions: String!
}

type Contact {
name: String!
email: String!
phone: String!
company: String!
role: String!
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "An auto-generated nested stack.",
"Metadata": {},
"Parameters": {
"AppSyncApiId": {
"Type": "String",
"Description": "The id of the AppSync API associated with this project."
},
"AppSyncApiName": {
"Type": "String",
"Description": "The name of the AppSync API",
"Default": "AppSyncSimpleTransform"
},
"env": {
"Type": "String",
"Description": "The environment name. e.g. Dev, Test, or Production",
"Default": "NONE"
},
"S3DeploymentBucket": {
"Type": "String",
"Description": "The S3 bucket containing all deployment assets for the project."
},
"S3DeploymentRootKey": {
"Type": "String",
"Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory."
}
},
"Resources": {
"EmptyResource": {
"Type": "Custom::EmptyResource",
"Condition": "AlwaysFalse"
}
},
"Conditions": {
"HasEnvironmentParameter": {
"Fn::Not": [
{
"Fn::Equals": [
{
"Ref": "env"
},
"NONE"
]
}
]
},
"AlwaysFalse": {
"Fn::Equals": ["true", "false"]
}
},
"Outputs": {
"EmptyOutput": {
"Description": "An empty output. You may delete this if you have at least one resource above.",
"Value": ""
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"Version": 5,
"ElasticsearchWarning": true
}
48 changes: 48 additions & 0 deletions daostar-website/amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"api": {
"daostarwebsite": {
"dependsOn": [],
"output": {
"authConfig": {
"additionalAuthenticationProviders": [],
"defaultAuthentication": {
"apiKeyConfig": {
"apiKeyExpirationDate": "2023-08-12T06:55:07.453Z",
"apiKeyExpirationDays": 180,
"description": "testAPI"
},
"authenticationType": "API_KEY"
}
}
},
"providerPlugin": "awscloudformation",
"service": "AppSync"
}
},
"auth": {},
"hosting": {
"amplifyhosting": {
"providerPlugin": "awscloudformation",
"service": "amplifyhosting",
"type": "manual"
}
},
"parameters": {
"AMPLIFY_hosting_amplifyhosting_appId": {
"usedBy": [
{
"category": "hosting",
"resourceName": "amplifyhosting"
}
]
},
"AMPLIFY_hosting_amplifyhosting_type": {
"usedBy": [
{
"category": "hosting",
"resourceName": "amplifyhosting"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"10.7.1\",\"stackType\":\"hosting-amplifyhosting\",\"metadata\":{}}",
"Parameters": {
"env": {
"Type": "String"
},
"appId": {
"Type": "String"
},
"type": {
"Type": "String"
}
},
"Conditions": {
"isManual": {
"Fn::Equals": [
{
"Ref": "type"
},
"manual"
]
}
},
"Resources": {
"AmplifyBranch": {
"Condition": "isManual",
"Type": "AWS::Amplify::Branch",
"Properties": {
"BranchName": {
"Ref": "env"
},
"AppId": {
"Ref": "appId"
}
}
}
}
}
10 changes: 10 additions & 0 deletions daostar-website/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}"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type AmplifyDependentResourcesAttributes = {
"api": {
"daostarwebsite": {
"GraphQLAPIEndpointOutput": "string",
"GraphQLAPIIdOutput": "string",
"GraphQLAPIKeyOutput": "string"
}
}
}
Loading