A RESTful API for managing tasks and the users associated with it.
AGPL-3.0 License
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
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.
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.
dev.docker.env
file. See the example file.
docker-compose up --build
dev.env
file. See the example file.
npm run start:dev
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 | sortBy (key)createdAt (value): sorted by created time ASCcreatedAt_desc (value): sorted by created time DESCcompleted (key)true (value): only which are completedfalse (value): only which are NOT completedlimit (key)num (value): limited to num tasksskip (key, but must be used with limit)num (value): limiting and skipping for pagination |
/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.
git checkout -b feature/AmazingFeature
).git commit -m 'Add some AmazingFeature'
).git push origin feature/AmazingFeature
)Distributed under GNU AGPL 3.0. See LICENSE for more information.
Shubhranil Dutta - [email protected]
Project Link: https://github.com/alpha037/atlas-task-manager