A RESTful API for creating, reading and managing tasks and their respective users. Hosted on MongoDB Atlas, this REST api provides fast access to anything you need. Documentation provided below.
Deployed at http://task-manager.shubhranil.com
- Built With
- Getting Started
- Features Include
- Docker Instructions
- API Endpoints
- Contributing
- License
- Contact
Make sure you have nodejs installed. We use npm to manage the dependencies, so we strongly recommend you to use it. After that, navigate into the project directory and run npm install
to resolve all dependencies.
- Tasks CRUD
- Users CRUD
- Task sorting
- Task limiting for pagination
- User profiles
- Image uploads
- JWT authentication
- Password hashing using slow hashing techniques for advanced security purposes.
- Login from multiple devices
- Auto resize and cropping of user avatars
- Sending out welcome emails to every signed up user
- Sending out cancellation follow up emails to every user who wants to delete their account
If you haven't installed Docker already, then you can get it from here. After installing it, create an account in Docker and copy the username.
This API part of the application is already dockerized. You can pull it directly from docker hub:
docker pull alpha037/atlas-task-manager_api:latest
Since this application needs to talk to a database, so, you can either create your own mongodb database (cloud/native) or you can use the docker-compose.yml file to spin up a mongodb instance along with the entire application.
- For Development:
- Using Docker: If you want to use Docker for your development environment, then you can just execute the following command and it will spin up two docker containers (one for the api and the other for the db) along with a persisted volumes directory. This will use the
dev.docker.env
file. See the example file.docker-compose up --build
- Without Using Docker: However, if you don't want to use docker, then you can just execute the following command, provided that you have a mongodb instance running locally. This will use the
dev.env
file. See the example file.npm run start:dev
- Using Docker: If you want to use Docker for your development environment, then you can just execute the following command and it will spin up two docker containers (one for the api and the other for the db) along with a persisted volumes directory. This will use the
- For Production: For your production environment, the API talks to the mongodb atlas db instance. In that case, you can run the following command. This will use the
prod.env
file. See the example file.npm run start:prod
Note: All the API endpoints are prefixed by /v1/ for better versioning. Ex: BASE_URL/v1/users
.
POST Endpoints:
Endpoint | Verb | Description |
---|---|---|
/users | POST | Signing up users |
/tasks | POST | Creating tasks for users |
/users/login | POST | Logging in users |
/users/logout | POST | Logging out users |
/users/logoutAll | POST | Logging out all user sessions from multiple devices |
/users/me/avatar | POST | Uploading user avatar |
GET Endpoints:
Endpoint | Verb | Description | Query Params |
---|---|---|---|
/users/me | GET | Getting user profile | |
/tasks | GET | Getting user tasks |
|
/tasks/:id | GET | Getting a specific user task (need to provide a task id) | |
/users/:id/avatar | GET | Getting user avatar (need to provide a user id) |
PATCH Endpoints:
Endpoint | Verb | Description |
---|---|---|
/users/me | PATCH | Updating user profile |
/tasks/:id | PATCH | Updating user task (need to provide a task id) |
DELETE Endpoints:
Endpoint | Verb | Description |
---|---|---|
/users/me | DELETE | Deleting user profile |
/users/me/avatar | DELETE | Deleting user avatar |
/tasks/:id | DELETE | Deleting user task (need to provide a task id) |
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. For more details, check out the contributing guidelines.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
). - Commit your Changes (
git commit -m 'Add some AmazingFeature'
). - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request.
Distributed under GNU AGPL 3.0. See LICENSE for more information.
Shubhranil Dutta - contact@shubhranil.com
Project Link: https://github.com/alpha037/atlas-task-manager