Recette Social

1. Project:

Social-network app based on food recipes.


2. Functionalities:

  • CRUD for recipes, users and ingredients.
  • User authentication.

3. Development Team: receta2

4. Deployment

5. Mockup

6. Stacks

  • Typescript
  • HTML5
  • CSS
  • React
  • Nest
  • Axios
  • Jest
  • MongoDB

7. Documentation:

Requirements:

  • Node and npm installed.

Installation:

Clone the repository:

$ git clone https://github.com/factoriaf5-p52/front-recette-social-receta2

Install node packages on each folder:

/server$ npm install
/client$ npm install

Start the server and the client:

/server$ npm start
/client$ npm start

Architecture

The project is divided in 2 main folders. The Client folder contains the front-end and the Server folder contains the back-end.


Client

Pages:

  • Home
  • Social
  • Recipe List
  • Recipe Detail
  • Login/register
  • User profile
  • Post recipe

User must be logged in via email + password in order to do most of the CRUD requests.

The requests can be found in the "api" folder.

To update the favicon visit the file in the browser (by default it will be at localhost:3000/favicon.ico).

Server

The database is created using Mongo. It consists of 3 main collections: Users, Recipes and Ingredients. There are other collections but they are unused or unfinished.

Each collection has its own schema, controller/service, and dto.

Security

Authentication is done using a JWT. To log in you must do a POST request on /auth/login with a registered user's email and password. This will return the JWT and it will then be stored in the session storage.

Passwords are encrypted using bcrypt.