-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
111 lines (102 loc) · 2.94 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
###########
## To-do ##
###########
Front-end
=========
Forgot password
Password reset
Delete account
user recipe
Page system to display more results
User dashboard(front-end)
Save and Organize : Favorite recipes
Shopping List : Create list for shopping
Back-end
========
Forgot password
Password reset
Delete account
Database for storing user recipe
Page system to display more results
User dashboard(front-end)
Save and Organize : Favorite recipes
Shopping List : Create list for shopping
###############
## Completed ##
###############
Front-end
=========
Navigation bar
Dark mode option
Hero section
About
Parallax image
Contact us
Footer
404 not found page
Sign-up
Login
Drop-down menu under Home in Footer
Terms & Conditions
Logout
Scroll-back-to-top button
Search Recipes
Search bar
Categories (cuisine,diet,type)
Recipe Details : Ingredients, Instructions
Get Analyzed Recipe Instructions
Search suggestion
Back-end
========
API: spoonacular / Edamam / Food2Fork
https://spoonacular.com/food-api/docs
https://rapidapi.com/spoonacular/api/recipe-food-nutrition
Dotfile: For hiding API key
Back-end for contact form
Sign-up with back-end
Encrypt password (bcrypt)
Login with back-end
Restricted routing
Logout
Search Recipes
Search bar
Categories (cuisine,diet,type)
Recipe Details : Ingredients, Instructions
Get Analyzed Recipe Instructions
Search suggestion
###########
## Notes ##
###########
MERN:
-----
It stands for MongoDB, Express, React, Node.js.
Form Back-end:
-------------
https://www.techomoro.com/submit-a-form-data-to-rest-api-in-a-react-app/
User Authentication:
-------------------
Making sure user is logging-in with correct credentials.
JWT:
----
JsonWebToken is used for user authorisation and privileges
https://www.youtube.com/watch?v=mbsmsi7l3r4&t=608s
Generate secret key:
-------------------
$ node
> require('crypto').randomBytes(64).toString('hex');
How JWT works:
-------------
0.1) User signs-in and credentials are stored in database after encrypting
the password using 'bcrypt' module in Express.
0.2) User logs-in and user credentials are 'authenticated' from Database.
1) Using JWT, a token is created with privileges and other details attached
to it and encrypted for security.
Ex: jwt.sign();
2) This token is sent to user after login was successful. This must be
stored as cookies , in localStorage or state variable.
3) Token must be sent to the server in order to access protected pages.
3.1) Token can be sent through fetch (not recommended).
3.2) In React, create a 'state' variable to store token which send the
token to server for each page which are protected.
4) Using middleware function, which is created by the developer and does not
come with the JWT module, the token is decrypted for authorisation.