- Pre-Development Phase (1st Day)
- Development Phase I: Building Core Features
- Styling & Organization Phase: Integrating Design with Functional Components
- Testing & Refinements Phase
- March 26: Final Preparations
- Presentation Day
- API-Documentation
- Installation
- npm i nodemailer (used for sending emails out in the utilities/email files)
- npm i express-fileupload (used for attachments/files encoded in base64.)
- npm i @octokit/rest (Used for Github API.)
- npm i react-markdown (Renders markdown in react files.)
- npm i axios (Allows to make HTTP request from nodeJS.)
- npm i fileUpload (used for attachments)
- Users
- Nodemailer must be installed
- Posts
- Installation
March 9: Setup and Planning
- Initial setup and planning phase.
- Team meeting to define roles and tasks.
March 10-13: User Authentication, User Profile, and Project Portfolio Management
- Implement JWT authentication for user login and registration.
- Develop functionalities for users to create, update, and display profiles and portfolio projects.
March 14-16: Social Feature Implementation, Employer Profile
- Add abilities to like, comment, follow users, and save projects.
- Develop special views and functionalities for employer profiles.
March 17-20: Advanced Features (Search & API Pull)
- Implement advanced search functionalities.
- Integrate third-party APIs as required.
March 19-23: Begin Styling Integration
- Focus on applying consistent styling across the application.
- Enhance user interfaces based on usability principles.
March 20: Component, Pages, & Files Review
- Ensure all necessary components, pages, and files are in place.
March 20: Comprehensive README File
- Write out a comprehensive README file detailing project setup, usage, and contribution guidelines.
March 23: Finalize Styling Efforts and Deployment
- Resolve any design and functionality discrepancies.
- DEPLOY the application.
March 20-24: Thorough Testing
- Conduct thorough testing for all features, including UI/UX testing.
- Identify any design or functional bugs.
March 24-25: Finalize Fixes
- Address and fix any issues identified during testing.
- Coordinate between developers and designers for necessary adjustments.
- Conduct a final group review of the project to ensure all components work seamlessly.
- Prepare for the project presentation, ensuring all documentation is ready and the project is fully deployed.
March 27: Presentation and Demonstration
- Present the project, emphasizing the collaborative effort between functionality and design.
- Showcase the application's features with a focus on the enhanced user experience.
- Explain the motivation behind the app and encourage classmates to sign up.
Create a new user.
-
Request
- Method:
POST
- Endpoint:
/api/users
- Headers: None
- Body:
name
(required): Name of the useremail
(required): Email address of the userpassword
(required): Password for the useruserType
(optional): Type of user (developer or employer)picture
(optional): URL to the user's profile picturebio
(optional): user biolocation
(optional): user location
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the newly created user and authentication token
- Example:
{ "user": { "_id": "65f50499a42ef6a2b817768d", "name": "John Doe", "email": "[email protected]", "userType": "developer", "picture": "https://example.com/profile.jpg", "createdAt": "2024-03-10T12:00:00.000Z", "updatedAt": "2024-03-10T12:00:00.000Z" }, "token": "<authentication_token>" }
- Status Code:
Authenticate an existing user.
-
Request
- Method:
POST
- Endpoint:
/api/users/login
- Headers: None
- Body:
email
(required): Email address of the userpassword
(required): Password for the userrememberMe
(optional): Boolean indicating whether to remember the user's session
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the authenticated user and authentication token (same format as the "Create User" response)
- Status Code:
Authenticate an existing user. Request
-
Method:
POST
-
Endpoint:
/api/users/reset-password
-
Headers: None
-
Body:
email
(required): Email address of the usertemporaryPassword
(Created and sent in the email)temporaryToken
(Created and sent to email expires in 30 minutes)
-
Response
- A email sent using the npm package nodemailer
- Status Code:
200 OK
- Body: JSON object containing Password reset successful. Check your email for the temporary password and token
Request
-
Method:
PUT
-
Endpoint:
/api/users/reset-password/:token
-
Headers: None
-
Body:
newPassword
: (required): new password using the JWT token created sent to the email.token
: (required): The Link sent to the email will have the token, and the page will know to grab it to fill the value.
-
Response
- A email sent using the npm package nodemailer
- Status Code:
200 OK
- Body: JSON object containing Password updated successfully.
Is used for the email function nodemailer used.
Request
-
Method:
POST
-
Endpoint:
/api/users/support
-
Headers: None
-
Body:
name
: Your name sentemail
(required/must be in the db): Email sent to the support email and to user who inputed an email.message
: Whatever message you want addedattachments
: (can add around 5 attachments)
-
Response
- A email sent using the npm package nodemailer
- Status Code:
200 OK
- Body: JSON object containing Password updated successfully.
Is used for the email function nodemailer used.
Retrieve user profile information by ID.
-
Request
- Method:
GET
- Endpoint:
/api/users/:id
- Headers: None
- Parameters:
id
(required): ID of the user
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the user profile information
- Example:
{ "_id": "65f50499a42ef6a2b817768d", "name": "John Doe", "email": "[email protected]", "userType": "developer", "picture": "https://example.com/profile.jpg", "createdAt": "2024-03-10T12:00:00.000Z", "updatedAt": "2024-03-10T12:00:00.000Z" }
- Status Code:
Update user profile information.
-
Request
- Method:
PUT
- Endpoint:
/api/users/:id
- Headers: None
- Parameters:
id
(required): ID of the user
- Body (fields to update):
name
: New name of the useremail
: New email address of the userpassword
: New password for the useruserType
: New type of user (developer or employer)picture
: New URL to the user's profile picture
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the updated user profile information
- Example:
{ "_id": "65f50499a42ef6a2b817768d", "name": "John Doe", "email": "[email protected]", "userType": "employer", "picture": "https://example.com/new-profile.jpg", "createdAt": "2024-03-10T12:00:00.000Z", "updatedAt": "2024-03-11T08:00:00.000Z" }
- Status Code:
Check the validity of the authentication token.
-
Request
- Method:
GET
- Endpoint:
/api/users/check-token
- Headers:
Authorization
: Bearer token
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object with a message indicating the token is valid
- Example:
{ "message": "Token is valid" }
- Status Code:
Allows a user to follow another user.
- URL:
/api/users/:userId/follow
- Method:
POST
- Authentication required: Yes
- Request Parameters:
userId
(String, required): The ID of the user to follow.developerId
(String, required): The ID of the developer to follow.
- Response:
user
: Updated user object after following.developer
: Updated developer object after being followed.
{
"userId": "6123456789abcdef1234567",
"developerId": "6123456789abcdef1234568"
}
{
"user": {
"_id": "6123456789abcdef1234567",
"name": "User Name",
"followedDevelopers": ["6123456789abcdef1234568"],
},
"developer": {
"_id": "6123456789abcdef1234568",
"name": "Developer Name",
"usersThatFollowThisDeveloper": ["6123456789abcdef1234567"],
}
}
Allows a user to unfollow another user.
- URL:
/api/users/:userId/unfollow
- Method :
POST
- Authentication required: Yes
- **Request Parameters:
userId
(String, required): The ID of the user to unfollow.developerId
(String, required): The ID of the developer to unfollow.
- Response:
user
:Updated user object after unfollowing.developer
:Updated developer object after being unfollowed.
{
"userId": "6123456789abcdef1234567",
"developerId": "6123456789abcdef1234568"
}
{
"user": {
"_id": "6123456789abcdef1234567",
"name": "User Name",
"followedDevelopers": [],
},
"developer": {
"_id": "6123456789abcdef1234568",
"name": "Developer Name",
"usersThatFollowThisDeveloper": [],
}
}
Create a new post.
-
Request
- Method:
POST
- Endpoint:
/api/posts
- Headers:
- Authorization: Bearer {token}
- Body:
githubLink
(required): Link to the GitHub repositorycontent
(required): Content of the postprojectTitle
(required): Title of the projectprojectDescription
(required): Description of the projectimage
(required): URL of an image related to the project
- Method:
-
Response
- Status Code:
201 Created
- Body: JSON object containing the newly created post
- Example:
{ "_id": "<Post_ID>", "user": "<User_ID>", "githubLink": "<GitHub_Link>", "content": "<Post_Content>", "projectTitle": "<Project_Title>", "projectDescription": "<Project_Description>", "image": "<Image_URL>", "likes": [], "comments": [], "createdAt": "<Creation_Date>", "updatedAt": "<Update_Date>", "__v": 0 }
- Status Code:
Retrieve all posts.
-
Request
- Method:
GET
- Endpoint:
/api/posts
- Headers: None
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON array containing all posts
- Example:
[ { "_id": "<Post_ID_1>", "user": "<User_ID_1>", "githubLink": "<GitHub_Link_1>", "content": "<Post_Content_1>", "projectTitle": "<Project_Title_1>", "projectDescription": "<Project_Description_1>", "image": "<Image_URL_1>", "likes": [], "comments": [], "createdAt": "<Creation_Date_1>", "updatedAt": "<Update_Date_1>", "__v": 0 }, { "_id": "<Post_ID_2>", "user": "<User_ID_2>", "githubLink": "<GitHub_Link_2>", "content": "<Post_Content_2>", "projectTitle": "<Project_Title_2>", "projectDescription": "<Project_Description_2>", "image": "<Image_URL_2>", "likes": [], "comments": [], "createdAt": "<Creation_Date_2>", "updatedAt": "<Update_Date_2>", "__v": 0 }, ]
- Status Code:
Retrieves all posts created by a specific user. Used for profile pages.
-
Request
- Method:
GET
- Endpoint:
/api/posts/user/:userId
- Headers: None
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON array containing all posts
- Status Code:
Retrieve a specific post by its ID.
-
Request
- Method:
GET
- Endpoint:
/api/posts/:id
- Headers: None
- Parameters:
id
(required): ID of the post
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the post with the specified ID (same format as the "Create Post" response)
- Status Code:
Update an existing post.
-
Request
- Method:
PUT
- Endpoint:
/api/posts/:id
- Headers:
- Authorization: Bearer {token}
- Parameters:
id
(required): ID of the post to update
- Body (fields to update):
- Any of the fields mentioned in the "Create Post" request body
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the updated post (same format as the "Create Post" response)
- Status Code:
Delete an existing post.
-
Request
- Method:
DELETE
- Endpoint:
/api/posts/:id
- Headers:
- Authorization: Bearer {token}
- Parameters:
id
(required): ID of the post to delete
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the deleted post (same format as the "Create Post" response)
- Status Code:
Like a post.
-
Request
- Method:
POST
- Endpoint:
/api/posts/:id/like
- Headers:
- Authorization: Bearer {token}
- Parameters:
id
(required): ID of the post to like
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the updated post with the user's like added
- Status Code:
Remove a like from a post.
-
Request
- Method:
POST
- Endpoint:
/api/posts/:id/unlike
- Headers:
- Authorization: Bearer {token}
- Parameters:
id
(required): ID of the post to unlike
- Method:
-
Response
- Status Code:
200 OK
- Body: JSON object containing the updated post with the user's like removed
- Status Code: