All Projects → xilution → xilution-react-todomvc

xilution / xilution-react-todomvc

Licence: MIT license
An implementation of TodoMVC featuring AWS Serverless Application Model (SAM) and Xilution SaaS.

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects
HTML
75241 projects

Projects that are alternatives of or similar to xilution-react-todomvc

Dracker
An iOS and React App to track debt and send/receive payments.
Stars: ✭ 22 (-8.33%)
Mutual labels:  aws-s3, aws-apigateway
Serverless Photo Recognition
A collection of 3 lambda functions that are invoked by Amazon S3 or Amazon API Gateway to analyze uploaded images with Amazon Rekognition and save picture labels to ElasticSearch (written in Kotlin)
Stars: ✭ 345 (+1337.5%)
Mutual labels:  aws-s3, aws-apigateway
hyper-kube-config
H Y P E R K U B E - A Serverless API and kubectl plugin providing a storage and retrieval Kubernetes cluster credentials. Hyperkube leverages AWS Secrets Manager for storing credential information.
Stars: ✭ 27 (+12.5%)
Mutual labels:  aws-apigateway, aws-secrets-manager
Amplify Js
A declarative JavaScript library for application development using cloud services.
Stars: ✭ 8,539 (+35479.17%)
Mutual labels:  aws-s3, aws-apigateway
Saas
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Stars: ✭ 2,720 (+11233.33%)
Mutual labels:  aws-s3, saas
mlflow-tracking-server
MLFLow Tracking Server based on Docker and AWS S3
Stars: ✭ 59 (+145.83%)
Mutual labels:  aws-s3, aws-cli
serverless-data-pipeline-sam
Serverless Data Pipeline powered by Kinesis Firehose, API Gateway, Lambda, S3, and Athena
Stars: ✭ 78 (+225%)
Mutual labels:  aws-s3, aws-sam
Awsmobile Cli
CLI experience for Frontend developers in the JavaScript ecosystem.
Stars: ✭ 147 (+512.5%)
Mutual labels:  aws-s3, aws-apigateway
Aws Csa Notes 2018
My AWS Certified Solutions Architect Associate Study Notes!
Stars: ✭ 167 (+595.83%)
Mutual labels:  aws-s3, aws-apigateway
ginger
Serverless framework for Go runtime.
Stars: ✭ 16 (-33.33%)
Mutual labels:  aws-s3, aws-apigateway
s3cli
Command line tool for S3
Stars: ✭ 21 (-12.5%)
Mutual labels:  aws-s3, aws-cli
redux-todomvc
A TodoMVC written with React, Redux and Immutable
Stars: ✭ 58 (+141.67%)
Mutual labels:  todomvc
todo-app-ngrx
TodoMV* - Angular + Redux (ngrx)
Stars: ✭ 42 (+75%)
Mutual labels:  todomvc
developer-free-saas
🕸️ A curated list Of Free Web-based Tools For Developers
Stars: ✭ 22 (-8.33%)
Mutual labels:  saas
Bucket-Flaws
Bucket Flaws ( S3 Bucket Mass Scanner ): A Simple Lightweight Script to Check for Common S3 Bucket Misconfigurations
Stars: ✭ 43 (+79.17%)
Mutual labels:  aws-s3
fss3
FSS3 is an S3 filesystem abstraction layer for Golang
Stars: ✭ 52 (+116.67%)
Mutual labels:  aws-s3
lambda-resize-image
An AWS Lambda Function to resize images automatically with API Gateway and S3 for imagemagick tasks. When an image is called on AWS Api Gateway, this package will resize it and send it to the S3.
Stars: ✭ 56 (+133.33%)
Mutual labels:  aws-s3
terraform-aws-s3-object
Terraform module which creates S3 object resources on AWS
Stars: ✭ 15 (-37.5%)
Mutual labels:  aws-s3
minio-boshrelease
MinIO release for http://bosh.io/
Stars: ✭ 31 (+29.17%)
Mutual labels:  aws-s3
Hello-AWS-Data-Services
Sample code for AWS data service and ML courses on LinkedIn Learning
Stars: ✭ 144 (+500%)
Mutual labels:  aws-cli

xilution-react-todomvc

A Serverless Example of TodoMVC

This is a full-stack example of the ubiquitous TodoMVC app using a serverless computing model. Follow the instructions below to stand up an example of the app for yourself. Within about a 1/2 hour you will have a fully functional todo management app running in AWS.

Issues Forks Stars License

Travis Codecov Greenkeeper

Tweet

Is it time to reboot our love affair with servers?

Great For

  • This example is ideally suited for...
    • Digital agencies who want to accelerate client project time lines and extend their technical capabilities.
    • Hackathon teams who want a complete full-stack example upon which they can base their projects.
    • Frontend developers with backend responsibilities who just want to code awesome web and mobile apps.
    • Technical leaders who are always on the look out for next big productivity accelerator.
    • Backend developers who want to sharpen their technical skill sets.

Features

xilution-react-todomvc components

Prerequisites

This example was developed on macOS High Sierra using WebStorm. Your experience on other development platforms will vary. If you find inconsistencies with these instructions and develop a solution for your development platform, please share your experience through a pull request.

For Windows users, I recommend using Git Bash for command line steps. Git Bash is included in the Git installation mentioned below. For Mac users, the Terminal application is the best way to go for command line steps.

  1. Create an AWS Account

    • AWS offers a 12 month Free trial.
  2. Create a Xilution Account in our Test Environment

    • Limited access to Xilution's Test environments is Free for registered users.
    • Open https://register.xilution.com, to create an account in our Production environment.
      • At this time, Test and Production accounts don't synchronize.
  3. Activate Xilution - Basics - Beagily

    • Some Xilution APIaaS products require activation to enable access.
    • Without activation, you will receive 401 errors when making calls to Beagily's endpoints.
  4. Install Git

  5. Install AWS CLI

    1. You'll need python 3 to get access to the latest AWS CLI commands.
  6. Install Node Version Manager (nvm)

  7. Install Yarn

  8. Install ./jq

    • This will quickly become one of your favorite command line utilities. 😎

One Time Set Up

  1. Create an AWS IAM User in your AWS Account

    • It's bad practice to use your AWS root account.
    • I recommend following the console instructions.
    • When you get to the "Set permissions" step, attach an existing policy and choose "AdministratorAccess". You can change the access at anytime. AWS will prompt you when you don't have sufficient access to a resource.
  2. Configure the AWS CLI

    • Remember your region for configuration later.
  3. Open a command line app.

    • Mac: Terminal
    • Windows: Git Bash
  4. Download Project Source Code

    • Some of these steps may be superfluous for experienced developers. For those less experienced coders, I recommend following these steps verbatim.
    1. Run cd ~ to navigate to your home directory.
    2. Run mkdir Developer to create a directory to keep development related things.
    3. Run cd Developer to navigate into the Developer directory.
    4. Run mkdir git to create a directory to keep code cloned through git.
    5. Run cd git to navigate into the git directory.
    6. Run git clone https://github.com/xilution/xilution-react-todomvc to download the code for this example.
    7. Run cd xilution-react-todomvc to navigate into the directory where the code for this example has been downloaded.
  5. Install Node.js 10.16.3

    1. From within the 'xilution-react-todomvc' directory, run nvm install to install the version of Node.js used by the example.
  6. Download Project Dependencies

    1. From within the 'xilution-react-todomvc' directory, run yarn to install Node.Js dependencies.
  7. Create a config.mk file to hold build settings

    • Look up your Xilution Client Id through the Xilution Customer Admin Portal. Use the credentials you used to create your Xilution Subscriber Account.
    1. Run touch config.mk to create the file.
    2. Run echo XILUTION_CLIENT_ID={REPLACE-WITH-YOUR-CLIENT-ID} >> config.mk to save your xilution client identifier to the config.
    3. Run echo AWS_STAGING_BUCKET={REPLACE-WITH-A-UNIQUE-STAGING-BUCKET-NAME} >> config.mk to save a staging bucket name to the config.
      • AWS S3 bucket names must be unique across all AWS S3 buckets. We recommend prefixing your bucket name with your organization name to prevent naming conflicts.
    4. Run echo AWS_WEBSITE_BUCKET={REPLACE-WITH-A-UNIQUE-WEBSITE-BUCKET-NAME} >> config.mk to save a website bucket name to the config.
      • AWS S3 bucket names must be unique across all AWS S3 buckets. We recommend prefixing your bucket name with your organization name to prevent naming conflicts.
    5. Run echo AWS_REGION={REPLACE-WITH-YOUR-AWS-REGION} >> config.mk to save your AWS account's region to the config.

Provision and Deploy

  1. Open a command line app.

    • Mac: Terminal
    • Windows: Git Bash
  2. Provision and Deploy Backend Resources

    1. Run make provision-base to provision the base AWS resources.
    2. Run make build-backend to build the backend resources.
    3. Run make deploy-backend to deploy the backend resources to your AWS account.
    4. Run make show-backend-url to see the URL of the backend RESTful web service.
    5. Run make put-types to register JSON schema used by this example with Xilution - Basics - Beagily.
      • You will be prompted for credentials. Use the credentials you used to create your Xilution account.
  3. Deploy Frontend Resource

    1. Run make build-frontend to build the frontend resources.
    2. Run make deploy-frontend to deploy the frontend resources.
    3. Run make show-frontend-url to see the URL of the frontend application.
    4. Copy the front end URL and paste it into a browser.
      • You should see the login for for the TodoMVC app.

👏👏👏 The example should now be up and running in AWS. 👏👏👏

To Test

  1. Open a command line app.

    • Mac: Terminal
    • Windows: Git Bash
  2. To Run Linter and Unit Tests

    1. Run yarn test to run the linter and run unit tests.
  3. To Run the App Locally

    1. Run make dev to run the app locally.
      • make is necessary to automatically inject the backend url.
  4. User Acceptance Testing

    1. Run make show-frontend-url to see the URL of the frontend application.
    2. Copy the front end URL and paste it into a browser.
    3. Run through the different use cases
      • Login User
        • Use your Xilution user credentials
      • View Todos
      • Create/Update/Delete Todos

Troubleshooting

  1. Backend

    • CloudWatch Logs
      • Open the AWS CloudWatch console.
        • Lambdas
          • Click Logs in the left hand menu.
          • Search for '/aws/lambda' to see a list of provisioned Lambda functions.
          • Choose the Lambda function associated with the endpoint giving you trouble.
          • Browse through the logs for error messages.
          • I've found it most effective to find error messages by time.
        • API Gateway
          • Finding CloudWatch logs for API Gateway is a little trickier than Lambda.
          • Open the AWS APIGateway console
          • Find the API ID for the xilution-todo-sam API.
          • Go back to the AWS CloudWatch console.
          • Click Logs in the left hand menu.
          • Search for 'API-Gateway-Execution-Logs_{REPLACE-WITH-API-ID}/Prod'
  2. Frontend

    • Google Chrome
      • Open the Chrome Developer Console
      • Errors appear in the Console tab and will have a Error ID.
      • You can get a more detailed description of the error by finding the Error ID in CloudWatch Logs.
      • Also use the Network tab to observe how the app is interacting with the API.
  3. Bugs

Deprovisioning

  1. Open a command line app.

    • Mac: Terminal
    • Windows: Git Bash
  2. Deprovision Resources

    1. Run make deprovision-backend to deprovision backend resources.
    2. Using the AWS Console, delete the S3 buckets
      • xilution-todomvc-website-bucket
      • xilution-todomvc-staging-bucket
    3. Run make deprovision-base to deprovision the base resources.

Next Steps

I'm hopeful that this reference implementation inspires you to to use AWS SAM and React for your next web application. I also invite you to learn more about how Xilution APIaaS can accelerate your next web or mobile application project.

Need help with your serverless project? Hit me up on Twitter. I would be happy to pitch in where I can.

FAQ

  1. 💰 How much does it cost to run this example?

    • AWS offers a "free" tier which enables you to gain free, hands-on experience with the AWS platform, products and services.
    • You may find the AWS Simple Monthly Calculator to be useful in calculating your monthly AWS expense as well.
    • Pricing for AWS managed services used in this example
    • Pricing for Xilution APIaaS Products used in this example
      • This example integrates with Xilution's Test environment which is Free for evaluation purposes.
      • The Xilution APIaaS products highlighted in this example have not yet been released for production consumption.
      • See the Xilution APIaaS Products page for the latest product phase and pricing details.
      • For comparision, here is AWS's published pricing for data storage services.
  2. Why React?

  3. Is the backend necessary?

    • The backend is useful for abstracting secrets and domain specific functionality from the frontend.
  4. Why Node.js for the backend? Are there alternative programming languages?

  5. Can this example run on other public cloud platforms?

    • In theory, yes. Azure and Google Cloud Platform offer similar types of web hosting and compute services needed to run this example. Eventually, I would like to develop Terraform templates for several different public cloud platforms. If you're passionate about your cloud platform and would like to see it incorporated in this example, I invite you to submit a pull request.
  6. What about the Serverless framework?

    • I personally don't have experience working with the Serverless framework, but I hear good things. The pervasiveness of the framework warrants a mention in this example's FAQ. I applaud the maintainers of the framework for their advancement of serverless computing. I would like to learn more about the framework and how it could be incorporated into this example. If you're passionate about the Serverless framework or other similar frameworks, I invite you to submit a pull request.
  7. Do I have to use Xilution APIaaS?

    • Nope. You can use just about any persistance model in your backend implementation including other API as a Service providers. AWS RDS and DynamoDB are valid alternatives if you choose to provision and maintain your own persistence infrastructure. However, I think you'll reconsider investing in a relational or noSQL database and choose API as a Service when you consider the productivity gains that a serverless architecture model has already afforded you. In a way, API as a Service is like the icing on the cake. If you're interested in learning more about API as a Service, this blog article Ed Shelley is a good place to start.

Issues

Issues are managed here.

About the Author

Todd Brunia is the founder of Xilution. Xilution creates and markets API as a Service products.

Contributions

See something about this example that you think could be improved? Pull requests are encouraged and greatly appreciated!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].