{"id":21575516,"url":"https://github.com/rangle/serverless-app-poc","last_synced_at":"2025-03-18T06:45:40.982Z","repository":{"id":102476655,"uuid":"332906507","full_name":"rangle/serverless-app-poc","owner":"rangle","description":"A serverless application that provides subscription-based online learning content managed by headless CMS.","archived":false,"fork":false,"pushed_at":"2021-02-25T23:00:47.000Z","size":1391,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-24T13:32:07.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rangle.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}},"created_at":"2021-01-25T22:51:23.000Z","updated_at":"2022-03-21T19:07:09.000Z","dependencies_parsed_at":"2023-04-04T20:04:17.299Z","dependency_job_id":null,"html_url":"https://github.com/rangle/serverless-app-poc","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/rangle%2Fserverless-app-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fserverless-app-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fserverless-app-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fserverless-app-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rangle","download_url":"https://codeload.github.com/rangle/serverless-app-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244173507,"owners_count":20410295,"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-11-24T12:13:29.929Z","updated_at":"2025-03-18T06:45:40.954Z","avatar_url":"https://github.com/rangle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **BiteTut - Headless Serverless E-commerce POC**\n\nBiteTut is a serverless e-commerce storefront that provides subscription-based online learning content managed by headless CMS.\n\n## **Features**\n\n- Create, manage and publish content with [Contentful](https://www.contentful.com/)\n- Manage recurring payments using [Stripe](https://stripe.com)\n- Secure user authentication and access control using [AWS Cognito](https://aws.amazon.com/cognito/)\n- Highly customizable components with full theming support using [styled-components](https://styled-components.com/docs/advanced#theming)\n- Deploy and manage AWS infrastructure to use AWS Lambda functions with the [Serverless Framework](https://www.serverless.com/)\n\n## Overview\n\nThis project consists of a ReactJS front-end and a serverless back-end using AWS Lambda. The following AWS services are also used in this project:\n\n- S3: a public S3 bucket to host the React web app and a private S3 bucket to store private content\n- Simple Email Service (SES): notify customers with the pre-sign URL of the private content\n- Cognito: user sign-in and access control\n- Simple Notification Service (SNS): save user information to DynamoDB when a user is created in the Cognito user pool\n- DynamoDB: store user account information (e.g. user email and their Stripe customer ID)\n\nReact app screenshots\n\n\u003cimg src=\"./doc/react-app-screenshots.png\" alt=\"React app screenshots\" width=\"80%\"/\u003e\n\n### User Sign Up Flow\n\n![User Sign Up Flow](./doc/user-sign-up-flow.png)\n\n### User Purchase Flow\n\n![User Purchase Flow](./doc/user-purchase-flow.png)\n\n## Prerequisites\n\n### Contentful Account\n\n1. Sign up for a Contentful account\n2. Create an empty Space to hold your content\n3. Set up content model\n4. Configure the [Contentful Javascript SDK](https://github.com/contentful/contentful.js/#configuration) using your set of the access token and space ID\n\n### Stripe account\n\n1. Sign up for a Stripe account\n2. Obtain the [Stripe API keys](https://stripe.com/docs/keys)\n\n### AWS account\n\n1. Sign up for an AWS account\n2. Create an IAM User and Access Key\n3. Set up credential [with AWS CLI](https://github.com/serverless/serverless/blob/master/docs/providers/aws/guide/credentials.md#setup-with-the-aws-cli)\n\n## Get Started\n\nFollow the following steps to run the React application and the serverless backend locally.\n\n```bash\ngit clone https://github.com/rangle/serverless-app-poc.git\n```\n\n- Update placeholder credentials listed in the `.env.example` file, and rename this file to `.env`\n- Install dependencies for the project\n\n```bash\ncd frontend\n\n# install dependencies for the React application\nyarn install\n\n# run the application locally\nyarn start\n\ncd backend\n\n# install dependencies for the serverless application\nyarn install\n\n# run lambda functions offline\nyarn dev\n```\n\n## Folder Structure\n\n```\n.\n├── frontend                    # ReactJS application\n│   ├── src\n│   │   ├── components          # styled-components\n│   │   ├── content             # content service, contentful config\n│   │   ├── payment             # payment service with Stripe\n│   │   ├── auth                # auth service with Cognito, auth context\n│   │   ├── theme               # theme config for styled-components\n│   │   └── ...\n│   └── ...\n├── backend                     # Serverless backend\n│   ├── src                     # lambda functions\n│   └── serverless.yml          # defines AWS infrastructure resources\n└── README.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fserverless-app-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangle%2Fserverless-app-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fserverless-app-poc/lists"}