Skip to content

backEndLaVioleta/DanRobProject

Repository files navigation

Dan & Rob Project 🍔 BLOSSH 🍔

Recipe DDBB

What is BLOSSH?

In this project we are going to start an APP and DB that will hold the recipes and menu from BLOSSH

Dan and Rob had decided to use MongoDB as their model for the DB

Raul wants us to have three entities:

  • Users
  • Recipes
  • Menu

USERS

Will have two roles:

  • Admin
  • User
  • User Info
    • _id: objectId
    • firstName: string
    • lastName: string
    • email: string
    • password: string
    • role: string

Admins will be loged in and authenticated by token. They can perform CRUD in both Recipes and Menu

Users won't need to be authenticated, but they'll only be able to read Recipes and menu

RECIPES

Collection will include:

  • Recipes Info
    • _id: objectId
    • name: string
    • ingridients: array[]
      • _id: product id that will be the same as product collection. objectId
      • name: string
      • photo: string
      • price: decimal (optional)
    • photo: string
    • preparation: string

In this stage of the DB, we'll just shhow the recipes and preparation to the menu.

Search engine. Need of discussion about the queries. Search for info with Algolia

In thge large run, we'll love to make it linked and related to stock and cost price

MENU

How many times do we cook grilled onions?. How many cakes we made this week?...

These questions mean to be answered in the menu collection. Here will show the menu from the restaurant and, at least the first stage of the

DB how many times a recipe has been used to do some of the items from the rest menu.

  • menu Info
    • _id: objectId
    • name: string
    • recipes: array[]
      • _id: product id that will be the same as recipe collection. objectId
      • nameRecipe: string
    • photo: string

GOALS

First stage:

Admins able to do both Recipes and Menus CRUD

Users able to read them

search engine in recipes and menu

When to cook the recipes

presentation 24/12/21

  • Diapos

  • Explanation project

  • Objectives

  • End Points (or at least the main ones)

  • Swagger documentation

Presentation 26/12/21

  • Planning 🚴‍♂️
  • Work Done 🎟️
  • What has been done?
  • Blocks ⏬
  • Issues that can affect to everyone
  • News 📰
  • Things that we do for love 🤎

Documentation

Optional fields in TypeScript thanks to StackOverFlow

packages added

npm install --save @nestjs/typeorm typeorm @nestjs/config mongodb

GIT and GITHUB

Dan and I are working together in this project. Git commands that we highly recommend to work in a team

  • One repository

    Pick Up one of the profiles and open just one repository.

  • One main | master

One main or master branch. Is the anchor of the project. Once the repository is created, clone it into your computer

> git clone htttps://github/<name Of Organization>/<name of the repository>.git
  • As MANY branches requiered

Now you can check how everything is doing into your computer

> git status

To see local branches

> git branch 

To see remote branches

> git branch -r
  • Create new Branch

    git checkout -b my_new_branch_name

To work with your new branch

> git checkout my_new_branch_name

Important

Your new branch is not yet working in remote

To push your my_new_branch_name to the remote repository

> git push -u origin my_new_branch_name

or

> git push -u origin HEAD

*Get and work with remote branches

Get all branches from remote

> git fetch origin

check if you have the branches from remote

> git branch -v -a

```
main                    5ac0dbc Update README.md
remotes/origin/HEAD     -> origin/main
remotes/origin/dev-dan  cbb15fe :art: Working version
remotes/origin/dev-rob  cf50e24 dev-rob
remotes/origin/homeWork d23d7a2 check mail work in userService
remotes/origin/main     5ac0dbc Update README.md

```

to work in local with the remote branch

> git checkout -b name_branch_ you_want origin/name_branch_you_want

```
git checkout -b dev-rob origin/dev-rob
Switched to a new branch 'dev-rob'
Branch 'dev-rob' set up to track remote branch 'dev-rob' from 'origin'
```

ready to work with the desired branch

Avoiding pull request as owner

gitmoji -c (lista de emojis)

git checkout <main branch>

git rebase <your branch>

git push

Link to resources Git

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published