Skip to content

Hungry is an event-driven serverless application for food ordering ๐Ÿ”

License

Notifications You must be signed in to change notification settings

eduardo3g/hungry

Repository files navigation

Hungry ๐Ÿฒ

Food ordering software for restaurants to delivery delicious food.

Author Languages Stars

๐Ÿ“š Introduction

This project was built on top of the main Serverless managed services from AWS. It follows an event-driven architecture and patterns of production-ready applications.

๐Ÿ‘จ๐Ÿฝโ€๐Ÿ”ง Tech stack

  • ๐Ÿก AWS API Gateway - a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
  • ๐Ÿ‘ท๐Ÿป AWS Lambda - serverless compute service that lets you run code without provisioning or managing servers, creating workload-aware cluster scaling logic, maintaining event integrations, or managing runtimes.
  • ๐ŸŒ‰ Event Bridge - serverless event bus that ingests data from your own apps, SaaS apps and AWS services and routes that data to targets.
  • ๐Ÿ”” SNS - a fully managed service, taking care of the heavy lifting related to capacity planning, provisioning, monitoring, and patching.
  • ๐Ÿคซ KMS - a service that makes it easy for you to create and manage cryptographic keys and control their use across a wide range of AWS services and in your applications.
  • ๐Ÿ”‘ SSM Parameter Store - a provides secure, hierarchical storage for configuration data management and secrets management.
  • ๐Ÿ—ƒ๏ธ AWS DynamoDB - fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.
  • ๐Ÿ‘ฎ๐Ÿป AWS Cognito - provides authentication, authorization, and user management for your web and mobile apps.
  • ๐Ÿƒ Serverless Framework - framework that speeds up the development of Serverless cloud-native applications.

๐Ÿ–ฅ๏ธ Features

  • Get static web page by accessing the root endpoint (/)
  • User registration
  • Sign in
  • Sign out
  • Get all the restaurants
  • Search for a specific restaurant
  • Place an order
  • Notify the restaurant when a new order is created

Sounds fun, right? ๐ŸคŸ

โœ”๏ธ Requirements

  • Node.js 12.x+
  • AWS account
  • AWS IAM user with administrator role and programmatic access (access key id and access secret key)
  • Lumigo account - grab the tracer token from your account settings

โš™๏ธ Deploying the app

  • Get the tracing token from Lumigo

    • Open Lumigo (I assume you already have an account)
    • Click on Settings > Tracing
    • Get the Manual tracing token
  • Configure an SSM Parameter on AWS to store Lumigo's token

    • Open the AWS Console
    • Select the Systems Manager (aka. SSM) service
    • Select Parameter Store on the left menu
    • Create a new parameter
    • Name this parameter as /lumigo/tracing-token (it must have this name)
    • Paste the tracing token from Lumigo on the value field and hit save
  • Deploy the stack

# Clone this repository
git clone https://github.com/eduardo3g/hungry.git

# Move yourself to the root directory
cd hungry

# Install the dependencies with NPM
npm install

# Deploy the stack (by detault it'll create a 'dev' stack)
npx sls deploy

# Grab the API URL on the terminal output

๐ŸŒฑ Seeding the database

Run the following command to seed restaurants to DynamoDB:

# Generate a .env file on your root directory
npm run exportEnv

# Seed the database
cd util

# It'll create 8 items on the Restaurants table on DynamoDB
node seed-restaurants.js

๐Ÿž Issues

Feel free to create a new issue with an detailed title and description. If you already have a solution to fix the problem, I would be very happy to review your pull request.

๐ŸŽ‰ Contributing

I'm highly opened to contributions and would love to review pull requests to make this project even better.

About

Hungry is an event-driven serverless application for food ordering ๐Ÿ”

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published