This project is a full-stack application featuring:
Frontend built with React (Located in the /client folder) Backend API built with Node.js (Located in the /server folder) MongoDB server for the database Docker Compose for containerization and orchestration
POST /users/register: Registers a new userPOST /users/login: Logs in a userGET /users/profile: Retrieves the user profile (requires JWT token)PUT /users/updateProfile: Updates the user profile (requires JWT token)DELETE /users/deleteAccount: Deletes the user account (requires JWT token)
POST /posts/createpost: Create post (requires JWT token)GET /posts/getposts: Get posts (requires JWT token)DELETE /deletepost/:id: Deletes the posts (requires JWT token)
.
├── client # Frontend React App
│ └── ...
├── server # Backend Node.js API
│ └── ...
└── docker-compose.yaml # Docker Compose file
Node.js Docker Docker Compose
Navigate to the client folder and run:
npm install
npm startThe React app will start and can be accessed at http://localhost:3000.
Navigate to the server folder and run:
npm install
npm startThe Node.js API will start and can be accessed at http://localhost:3001.
From the project root, run:
docker-compose up --buildThis will start the React app, the Node.js API, and the MongoDB server in individual containers.
To contribute to this project:
Fork the repository
Create your feature branch (git checkout -b feature/fooBar)
Commit your changes (git commit -am 'Add some fooBar')
Push to the branch (git push origin feature/fooBar)
Create a new pull request
This project is licensed under the MIT License.