{"id":14384460,"url":"https://github.com/serverless/forms-service","last_synced_at":"2025-04-23T22:28:21.305Z","repository":{"id":65982480,"uuid":"104534455","full_name":"serverless/forms-service","owner":"serverless","description":"Serverless Forms Service to collect form data with Admin UI","archived":false,"fork":false,"pushed_at":"2018-05-17T23:30:26.000Z","size":208,"stargazers_count":66,"open_issues_count":0,"forks_count":17,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-08-29T18:34:38.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://serverless-forms.netlify.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-23T02:12:16.000Z","updated_at":"2023-01-07T03:43:28.000Z","dependencies_parsed_at":"2023-02-19T18:45:24.047Z","dependency_job_id":null,"html_url":"https://github.com/serverless/forms-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fforms-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fforms-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fforms-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fforms-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless","download_url":"https://codeload.github.com/serverless/forms-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223764392,"owners_count":17198610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-28T18:01:24.411Z","updated_at":"2024-11-08T22:37:55.825Z","avatar_url":"https://github.com/serverless.png","language":"JavaScript","readme":"# Serverless Form Collection Application\n\nCollect and manage form data with serverless tech.\n\n## Frontend\n\n- React application using [create react app](https://github.com/facebookincubator/create-react-app)\n- Routing via [react router 4](https://reacttraining.com/react-router/web/guides/philosophy)\n- State management via [redux](https://redux.js.org/)\n- Talks to API Gateway via [axios](https://github.com/axios/axios)\n- Auth via [Auth0](https://auth0.com)\n- Hosted on [Netlify](https://www.netlify.com/)\n\n## Backend\n\n- Node backend running in AWS Lambda Functions\n- DynamoDB noSQL for database\n- Authorization via API Gateway Custom Authorizer Function\n\n![slsforms](https://user-images.githubusercontent.com/532272/34530669-bc0efe0c-f064-11e7-94fe-5a17b636d5f7.png)\n\n## Setup\n\n1. Clone down the repo and install the dependencies\n\n  ```bash\n  # install frontend dependencies\n  cd frontend \u0026\u0026 npm i\n\n  # install backend dependencies\n  cd backend \u0026\u0026 npm i\n  ```\n\n2. Setup auth0 client. See Auth0 Setup below\n\n3. Then deploy the backend application. ([install `serverless`](serverless.com/getting-started/) if you haven't already)\n\n  ```bash\n  cd backend\n\n  serverless deploy\n  ```\n\n4. Add the API values to `src/_config.js` and bootup the frontend!\n\n  ```\n  cd frontend\n\n  npm start\n  ```\n\n## Deployment\n\nConnect your repo to netlify and add the build command `cd frontend \u0026\u0026 npm install \u0026\u0026 npm run build`  \n\n## Auth0 Setup\n\n1. [Create an Auth0 Client](https://manage.auth0.com/#/clients/create)\n\n    1. Choose Single Page web app\n    2. Grab your auth0 domain and clientID from your auth0 client settings\n    3. plug those values into the frontend and backend config\n\n2. Install the [Auth0 Authorization extension](https://manage.auth0.com/#/extensions) in your auth0 account\n\n3. Add an [auth0 rule](https://manage.auth0.com/#/rules) that will attach user roles to your JWT token\n\n    ```js\n    function (user, context, callback) {\n      if (context.clientID === 'your-auth-client-id') {\n        // Update namespace with your namespace\n        var namespace = 'https://serverless.com/';\n        // console for debug purposes\n        console.log('user.roles', user.roles);\n        // add role to JWT token\n        context.idToken[namespace + 'roles'] = user.roles;\n      }\n      callback(null, user, context);\n    }\n    ```\n\n4. Add your auth0 values to `/frontend/src/_config.js`\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fforms-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless%2Fforms-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fforms-service/lists"}