Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference guide #1

Closed
mFlaifel opened this issue Jan 31, 2021 · 3 comments
Closed

Reference guide #1

mFlaifel opened this issue Jan 31, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@mFlaifel
Copy link
Collaborator

mFlaifel commented Jan 31, 2021

in this thread, you can see the reference guide for this repo.

@mFlaifel
Copy link
Collaborator Author

mFlaifel commented Jan 31, 2021

Daily Checklist

  • closing any issues that are done, and updating any issues which are out of date due to a change of plan, or giving more detail to them.
  • For a new task, make sure an issue exists - if it doesn’t, create one!.
  • Add the corresponding labels
  • Assign yourself and begin the task
    NB. Branches should be prefixed with the issue number, (feature, bug, enhancement) and the name for the branch,
    ex. 5-feature-backend-loginRoute
  • Push your work to GitHub as early as possible.
  • Open a draft (work in progress) PR with a clear TITLE and DESCRIPTION.
  • Add the issue number inside the title or the description of the PR as fixed #issue_number then the issue will close automatically as soon as the PR got merged OR write related #issue_number and you can close the issue manually
  • Once merged add a done label to the issue

@mFlaifel
Copy link
Collaborator Author

mFlaifel commented Jan 31, 2021

PR Checklist

  • Always know what your PR is going to include before you begin.
  • Always have a description!
  1. If it is big have a checkbox of things that happen in the PR, eg:
    add authentication

    • Add /login POST route with auth middleware

    • Auth middleware checks password and creates a JWT of the user id and puts it in a cookie named token

    • Send back a JSON of {success:true} if login is ok (along with the cookie) and of {success:false} if not

    • If the PR is very small, and the name of the PR explains what it does entirely, then at least put a description saying "See title" and reference some issues.

  2. If you do something unusual or unplanned, explain why and what it does

    • Have added a logged variable to the global state of the app, so we can check if a user is logged in before rendering this component
    • Used Axios to make requests, as it seemed better than fetch when working with react (link to stack overflow or citation if possible)
  3. Explain if anyone has to add env variables or anything to get this to run

    • You now need to add a DB_URL to your .env file in src
  4. Make a note of any follow up that needs to be done next

    • Need to now add authentication to the protected routes which check for the cookie in the next PR
    • Raise these as issues whilst you know about them!!!
  • Reviewing & Merging
  1. Assign other teammates
  2. Teammates request changes
  3. When teammates are happy they assign Team Lead
  4. Team Lead merges when they are happy

@mFlaifel mFlaifel pinned this issue Jan 31, 2021
@mFlaifel
Copy link
Collaborator Author

mFlaifel commented Jan 31, 2021

Backend issue template

Product Route

get all product information in json format from the database

Route : /

Method : GET


Main Things :

  • Database
  • Response
  • Test

Database :

Use database query to fetch all the data related to products


Response :

Response may be success or error :

  • Error :
    {
        status:400,
        messgae:'Bad reqeust'
    }
  • Success
    {
        status:200,
        data: [...please fill sample of data] , 
    }

Test :

  • Route :
    Test route by testing all the expected cases for correct retrieve for data from application table.

  • Query :
    Test select database query to make sure that everything is ok.

@mFlaifel mFlaifel added the documentation Improvements or additions to documentation label Feb 1, 2021
@NouraldinS NouraldinS unpinned this issue Feb 8, 2021
@mFlaifel mFlaifel pinned this issue Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant