/meal-tracker

Primary LanguageTypeScript

Serverless Meal Tracker

This project implements a meal tracker and calorie counter application using a serverless event-driven architecture.

Functionality of the application

This application allows creating/removing/updating/fetching meals. Each meal can optionally have an attachment image. Each user only has access to meals that he/she has created.

How to run the application

  • Install nodejs
  • Install serverless v2.4.0
  • Install awscli
  • configure awscli credentials.
  • Create a SPA in oauth

Backend

To deploy an application run the following commands:

cd backend
npm install
sls deploy -v

Frontend

To run a client application first edit the client/src/config.ts file to set correct parameters. And then run the following commands:

cd client
npm install
npm run start

This should start a development server with the React application that will interact with the serverless meal tracker application.

Postman collection

An alternative way to test your API, you can use the Postman collection that contains sample requests. You can find a Postman collection in this project. To import this collection, do the following.

Click on the import button:

Alt text

Click on the "Choose Files":

Alt text

Select a file to import:

Alt text

Right click on the imported collection to set variables for the collection:

Alt text

Provide variables for the collection (similarly to how this was done in the course):

Alt text