-
Notifications
You must be signed in to change notification settings - Fork 0
/
walkthru.text
146 lines (81 loc) · 3.24 KB
/
walkthru.text
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
create user and DB
CREATE USER ea_app WITH PASSWORD 'password' CREATEDB;
CREATE DATABASE ea WITH OWNER ea_app;
create models and migrations
_____________________________________
User
npx sequelize-cli model:generate --name User --attributes name:string,userName:string,email:string,password:string,productId:integer,profileImg:string,bio:text
Comment
npx sequelize-cli model:generate --name Comment --attributes productId:integer,userId:integer,body:text
Product
npx sequelize-cli model:generate --name Product --attributes name:string,comments:string,imgUrl:string,productUrl:string,categoryId:integer,creatorName:string,description:text,userId:integer
Category
npx sequelize-cli model:generate --name Category --attributes name:string
migrate
npx dotenv sequelize db:migrate
set up migration files in correct order
made model associations
////////DAY ONE///////////
//make utils file
//make view files
//
// user/register path
// user/log-in
//
//implement auth
//import bcrypt
//import our db
//create userValidator array to use in the user regsitration POST route
//POST route
//needs to use asyncHandler and be an async function
//destructure from the req.body
//build a user object
//create an errors array
//if errors array is empty, hash the password and add user to the db
//if errors array contains errors, display the errors on the user-register page
//pass the title, user object, errors array, and csrfToken to the pug file
//Update the pug file to include the errors array so registration errors can be rendered on the page
////////DAY TWO - Proposed Tos///////////
done //create login routes
//router.get('/log-in')
//router.post('/log-in')
done //create login pug files
done //create logout routes
done //create the demo user
//profile image
//existing extensions
//bio
//hard-code info for a specific user (Alec's suggestion)
//have a demo button that will link to the hard-coded user
done //error handler handling
done //seed the database with our ten selected extensions
done //seed user database with user file
////////Still To Do///////////
//create products page pug file
done //created nav bar in pug file
done //create add product/extension routes
done //create delete product/extension routes
//complete styling
////////////////AFTERNOON/////////////
done //add demo to seeder file
doneadd products to demo user
done product list page/ home page
??????????MAYBE????????????????
//if possible, add up vote functionality (join table)
Search Result Drop Down
search functionality?!
//practice presenting! :)
DAY 3:
done add comments to index.pug
donce create /products/:id/comments route
done delete for products and comments
done create profile.pug
list extensions posted by user
delete posts
////////Presentation Points///////////
dynamic user profile image for logged out or logged in user
delete functionality for only the signed in user on their profile page
//////////CURRENTLY NEEDED//////////////////////////
need Alec help edit for products
seed
npx dotenv sequelize db:seed:all