This project is a a clone of a user management service for a community messaging app like stack overflow, developed for my capstone software engineering class (hence the lack of commit history). It provides a set of APIs to handle user-related operations such as creating a new user, adding a comment, retrieving user details, updating user information, deleting a user, and authenticating a user.
- Node.js
- Express.js
- MongoDB
- Mongoose
- TypeScript
The schemas for the database are documented in the directory server/models/schema.
A class diagram for the schema definition is shown below:
| Endpoint | Method | Description |
|---|---|---|
| /addAnswer | POST | Add a new answer |
| Endpoint | Method | Description |
|---|---|---|
| /addComment | POST | Add a new comment |
| Endpoint | Method | Description |
|---|---|---|
| /addMessage | POST | Add a new message |
| /getMessages | GET | Retrieve all messages |
| Endpoint | Method | Description |
|---|---|---|
| /getQuestion | GET | Fetch questions by filter |
| /getQuestionById/ | GET | Fetch a specific question by ID |
| /addQuestion | POST | Add a new question |
| /upvoteQuestion | POST | Upvote a question |
| /downvoteQuestion | POST | Downvote a question |
| Endpoint | Method | Description |
|---|---|---|
| /getTagsWithQuestionNumber | GET | Fetch tags along with the number of questions |
| /getTagByName/ | GET | Fetch a specific tag by name |
| Endpoint | Method | Description |
|---|---|---|
| /signup | POST | Create a new user account |
| /login | POST | Log in as a user |
| /resetPassword | PATCH | Reset user password |
| /getUser/ | GET | Fetch user details by username |
| /deleteUser/ | DELETE | Delete a user by username |
