chore: Backend for onboarding. Takes the user's email and set's their section, year, and campus.#11
Conversation
…n, year, and campus.
PranavU-Coder
left a comment
There was a problem hiding this comment.
try implementing redis api , can't have user rewrite their mail address again in on-boarding form
also we need the the data of the user from the db since cookies or local storage isn't permanent.
and just a simple boolean value is needed from the db if the user is on-boarded or not
|
After researching this a bit more, I think Redis would be overkill. This can be handled easily using JWT, Zustand, and a one-time fetch from the backend API. We can create a We'll call Does that sound good? |
| @@ -0,0 +1,71 @@ | |||
| import express from 'express'; | |||
| import cors from 'cors'; | |||
| import { MongoClient } from 'mongodb'; | |||
There was a problem hiding this comment.
can we use mongoose instead of mongodb, also where's the User Schema? we need to create that first before any further development @PixelHalide @PranavU-Coder
|
Also, please use this file structure instead of writing everything in index.js for efficiency and readability @PixelHalide . Eg -
|
FirezTheGreat
left a comment
There was a problem hiding this comment.
Let me know, @PixelHalide, whether we'll go ahead with mongoose or MongoDB, and if there are any updates on the User Schema and file structure.

When the user signs up, A document will be created in the userData collection with the email as the primary key.
When the user completes onboarding, it finds their document via their email and updates it to store their data.