-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Mohan Vaddi edited this page Apr 18, 2022
·
1 revision
Users can either post one of these things:
- OpenToWork (People in search of work) It’s a status kind of thing, one user can have one status at most.
- Need Worker (People in need of worker) One user can post many requests for workers.
(Phone number and location are most vital requirements from a user.)
To post work or to keep OpenToWork user has to verify their number and update their location in their profile or during the post(modal).
OpenToWork:
A user can update their status OpenToWork to allow people to see their profile.
We need things like phoneNumber, Location and other to show that he’s a trustworthy and belong to that region.
Need Worker:
It’s like a news feed, one can post many posts with title, description, (maybe an image). etc.,
All posts are public and are shown to a user nearby.
Frontend routes:
/home
home will show the user profile and details
/posts
will send req to server (if loading, load spinner) and render posts based on the location if not they will give error that the location access is needed.
/search or /profiles or /opentowork
where users can see all the profiles that are currently open to work and will have filters to filter based on the users need.
/chat/roomid?='<uuid>'
will have chat of a certain user and they are saved in the database for now
Backend routes:
/user
@get()
get will get the user details to set them in the context of next app.
@post()
to create a new user in the database. (also be used if user needs to update details.)
/opentowork
@get()
to get opentowork profiles to load /opentowork page in the frontend. (store them in the context and then filter them as needed.)
@post()
to add opentowork of certain user in opentowork collection and to set a users status of opentowork. (store them to database)
/posts
@get()
to get posts based on the location.
@post()
to add the post into posts collection and update the posts list in the user document as well.
(Users chat will only be implemented if needed.)