diff --git a/README.md b/README.md index e8222e5..a90d245 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,70 @@ -# Getting Started with Serverless Stack (SST) +# SST Demo Notes App [![Seed Status](https://api.seed.run/serverless-stack/demo-notes-app/stages/prod/build_badge)](https://console.seed.run/serverless-stack/demo-notes-app) -This project was bootstrapped with [Create Serverless Stack](https://docs.serverless-stack.com/packages/create-serverless-stack). +The [Serverless Stack Guide](https://serverless-stack.com/#guide) is a comprehensive open source tutorial for building and deploying full-stack apps using serverless and React on AWS. -Start by installing the dependencies. +We create a [note taking app](https://demo.serverless-stack.com) from scratch. Using React.js, AWS Lambda, API Gateway, DynamoDB, and Cognito. + +![Demo App](screenshot.png) + +This repo is a full-stack serverless app built with [SST](https://github.com/serverless-stack/serverless-stack). + +- The `lib/` directory defines our AWS infrastructure using AWS CDK. +- The `src/` directory contains the Lambda functions that power the CRUD API. +- The `frontend/` directory contains the React app. + +It's a single-page React app powered by a serverless CRUD API. We also cover how add user authentication, handle file uploads, and process credit card payments with Stripe. + +### Usage + +Clone this repo. ```bash -$ npm install +$ git clone https://github.com/serverless-stack/demo-notes-app ``` -## Commands +Install dependencies. + +``` bash +$ npm install +``` -### `npm run start` +#### Developing Locally -Starts the local Lambda development environment. +Start the [Live Lambda Dev Environment](https://docs.serverless-stack.com/live-lambda-development). -### `npm run build` +``` bash +$ npx sst start +``` -Build your app and synthesize your stacks. +Install dependencies for the frontend React app. -Generates a `.build/` directory with the compiled files and a `.build/cdk.out/` directory with the synthesized CloudFormation stacks. +``` bash +$ cd frontend +$ npm install +``` -### `npm run deploy [stack]` +Start the React local dev environment from the `frontend/` dir. -Deploy all your stacks to AWS. Or optionally deploy, a specific stack. +``` bash +$ npm start +``` -### `npm run remove [stack]` +#### Running Tests -Remove all your stacks and all of their resources from AWS. Or optionally removes, a specific stack. +From the project root. -### `npm run test` +``` bash +$ npx sst test +``` -Runs your tests using Jest. Takes all the [Jest CLI options](https://jestjs.io/docs/en/cli). +#### Deploying to Prod -## Documentation +Run this in the project root to deploy it to prod. -Learn more about the Serverless Stack. -- [Docs](https://docs.serverless-stack.com) -- [@serverless-stack/cli](https://docs.serverless-stack.com/packages/cli) -- [@serverless-stack/resources](https://docs.serverless-stack.com/packages/resources) +``` bash +$ npx sst deploy +``` -## Community +--- -[Follow us on Twitter](https://twitter.com/ServerlessStack) or [post on our forums](https://discourse.serverless-stack.com). +Join the SST community over on [Slack](https://launchpass.com/serverless-stack) and follow us on [Twitter](https://twitter.com/ServerlessStack). diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..b6b1c00 Binary files /dev/null and b/screenshot.png differ