Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 4.86 KB

README.md

File metadata and controls

105 lines (77 loc) · 4.86 KB

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.