{"id":18248159,"url":"https://github.com/serverless-components/fullstack-app","last_synced_at":"2025-04-06T01:08:15.171Z","repository":{"id":97839362,"uuid":"259469388","full_name":"serverless-components/fullstack-app","owner":"serverless-components","description":"⚡ Ready-to-use, serverless, full-stack application built with AWS Lambda, Express.js, React, AWS DynamoDB and AWS HTTP API.","archived":false,"fork":false,"pushed_at":"2023-11-12T04:19:38.000Z","size":1105,"stargazers_count":322,"open_issues_count":12,"forks_count":70,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T23:11:09.929Z","etag":null,"topics":["aws-dynamodb","aws-http-api","aws-lambda","express","nodejs","react","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"https://www.serverless.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-components.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-27T22:17:27.000Z","updated_at":"2025-03-06T21:00:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"c20f9ead-390e-4bca-9309-0d21341d37e4","html_url":"https://github.com/serverless-components/fullstack-app","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-components%2Ffullstack-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ffullstack-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ffullstack-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ffullstack-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-components","download_url":"https://codeload.github.com/serverless-components/fullstack-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"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":["aws-dynamodb","aws-http-api","aws-lambda","express","nodejs","react","serverless","serverless-framework"],"created_at":"2024-11-05T09:36:05.334Z","updated_at":"2025-04-06T01:08:15.154Z","avatar_url":"https://github.com/serverless-components.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Serverless Fullstack Application Express React DynamoDB AWS Lambda AWS HTTP API](https://s3.amazonaws.com/assets.github.serverless/components/readme-serverless-framework-fullstack-application.png\n)](https://www.serverless-fullstack-app.com)\n\nA complete, serverless, full-stack application built on AWS Lambda, AWS HTTP API, Express.js, React and DynamoDB.\n\n#### Live Demo: [https://www.serverless-fullstack-app.com](https://www.serverless-fullstack-app.com)\n\n## Quick Start\n\nInstall the latest version of the Serverless Framework:\n\n\n```\nnpm i -g serverless\n```\n\nAfter installation, make sure you connect your AWS account by setting a provider in the org setting page on the [Serverless Dashboard](https://app.serverless.com).\n\nThen, initialize the `fullstack-app` template:\n\n```\nserverless init fullstack-app\ncd fullstack-app\n```\n\nThen, add the following environment variables in an `.env` file in the root directory, like this:\n\n```text\n# This signs you JWT tokens used for auth.  Enter a random string in here that's ~40 characters in length.\ntokenSecret=yourSecretKey\n\n# Only add this if you want a custom domain.  Purchase it on AWS Route53 in your target AWS account first.\ndomain=serverless-fullstack-app.com\n```\n\nIn the root folder of the project, run `serverless deploy`\n\nLastly, you will need to add your API domain manually to your React application in `./site/src/config.js`, so that you interact with your serverless Express.js back-end.  You can find the your API url by going into `./api` and running `serverless info` and copying the `url:` value.  It should look something like this `https://9jfalnal19.execute-api.us-east-1.amazonaws.com` or it will look like the custom domain you have set.\n\n**Note:**  Upon the first deployment of your website, it will take a 2-3 minutes for the Cloudfront (CDN) URL to work.  Until then, you can access it via the `bucketUrl`.\n\nAfter initial deployment, we recommend deploying only the parts you are changing, not the entire thing together (why risk deploying your database with a code change?).  To do this, `cd` into a part of the application and run `serverless deploy`.\n\nWhen working on the `./api` we highly recommend using `serverless dev`.  This command watches your code, auto-deploys it, and streams `console.log()` statements and errors directly to your CLI in real-time!\n\nIf you want to add custom domains to your landing pages and API, either hardcode them in your `serverless.yml` or reference them as environment variables in `serverless.yml`, like this:\n\n```yaml\ninputs:\n  domain: ${env:domain}\n```\n\n```text\ndomain=serverless-fullstack-app.com\n```\n\nSupport for stages is built in. \n\nYou can deploy everything or individual components to different stages via the `--stage` flag, like this:\n \n`serverless deploy --stage prod`\n\nOr, you can hardcode the stage in `serverless.yml` (not recommended):\n\n```yaml\napp: fullstack\ncomponent: express@0.0.20\nname: fullstack-api\nstage: prod # Put the stage in here\n```\n\nLastly, you can add separate environment variables for each stage using `.env` files with the stage name in them:\n\n```bash\n.env # Any stage\n.env.dev # \"dev\" stage only\n.env.prod # \"prod\" stage only\n```\n\nThen simply reference those environment variables using Serverless Variables in your YAML:\n\n```yaml\napp: fullstack\ncomponent: express@0.0.20\nname: fullstack-api\n\ninputs:\n  domain: api.${env:domain}\n```\n\nAnd deploy!\n\n`serverless deploy --stage prod`\n\nEnjoy!  This is a work in progress and we will continue to add funcitonality to this.\n\n## Other Resources\n\nFor more details on each part of this fullstack application, check out these resources:\n\n* [Serverless Components](https://github.com/serverless/components)\n* [Serverless Express](https://github.com/serverless-components/express)\n* [Serverless Website](https://github.com/serverless-components/website)\n* [Serverless AWS DynamoDB](https://github.com/serverless-components/aws-dynamodb)\n* [Serverless AWS IAM Role](https://github.com/serverless-components/aws-iam-role)\n\n## Guides\n\n### How To Debug CORS Errors\n\nIf you are running into CORS errors, see our guide on debugging them [within the Express Component's repo](https://github.com/serverless-components/express/blob/master/README.md#how-to-debug-cors-errors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ffullstack-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-components%2Ffullstack-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ffullstack-app/lists"}