Skip to content

AmineAML/thermopolia-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Thermopolia API

An API for the Thermopolia App, a daily recipe recommendation and newsletter application.

EtymologyKey FeaturesAPIArchitecture DiagramHow to useBuilt withLicense

Ethymology

Thermopolia (plural of thermopolium) was the ancient Roman/Greek equivanlt to restaurants. It was a commercial establishment for purshasing ready-to-eat food and often with servings similar to modern fast food. This name is a good description to what the application offers from easy-to-prepare recipes, newsletter subscriptions and delivery and other amazing features

Key Features

The principal key features to keep note of are:

  • Daily newsletter
  • Weekly same ingredient recipes/drinks
  • Week-ends recipes/drinks from a cuisine
  • New recipes/drinks/diet each day
  • Membres recipes/drinks articles

API

Method URL Description
GET /Recipes/foods List ten random recipes
GET /Recipes/foods/:id Recipe by its id
GET /Recipes/drinks List then random drinks
GET /Recipes/drinks/:id Drink by its id
GET /Recipes/diet Diet randomly
POST /Newsletters/subscribers Subscribe to the newsletter
GET /Newsletters/subscribers Subscribe to the newsletter
GET /Newsletters/subscribers/:id Subscriber by id
GET /Newsletters/subscribers/validation/:token Confirm email by unique token of the subscriber

Architecture Diagram

Thermopolia Architecture
C4 Model Diagram

How to use

Requirements

This project is built using Visual Studio Code, the Omnisharp extension, the .Net 6.0 with both the SDK and the Runtime, Docker and Docker Compose.

Developing

Rename example.appsettings.Development.json into appsettings.Development.json and add your environment variables.

dotnet restore

dotnet ef database update # if it's not installed, you can install it with `dotnet tool install --global dotnet-ef`

docker-compose up -d # PostgreSQL, pgAdmin and Redis

dotnet run

Deploying

Rename .env.example into .env and add your environment variables.

docker-compose -f docker-compose.prod.yml up -d --build --force-recreate

Built with

License

This project is under the MIT license.