- 📖 About the Project
- 💻 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 📝 License
Undertakings is a is an API for a task management application where users can create, update, and delete tasks.
Frontend Repository: Undertakings
Backend
Database
- User Authentication
- CRUD Operations on Tasks
Base URL: https://undertakings-5fbcc97dce19.herokuapp.com/api/v1
Authentication: Obtain a token by sending a POST request to /users/sign_in
with the user's email and password. Use the token in the Authorization
header of subsequent requests.
Authentication
-
POST /users
- Creates a new user
- Sample request body:
{ "name": "John Doe", "email": "johndoe@example.com", "password": "password", "password_confirmation": "password" }
-
POST /users/sign_in
- Logs in a user
- Sample request body:
{ "email": "johndoe@example.com", "password": "password" }
-
DELETE /users/{user_id}
- Deletes a user
- Requires authentication
Tasks
-
GET /users/{user_id}/tasks
- Gets all tasks
- Requires authentication
-
POST /users/{user_id}/tasks
- Creates a new task
- Requires authentication
- Sample request body:
{ "title": "Task Title", "description": "Task Description", "due_date": "2023-06-19 18:30:00", "completed": false }
-
GET /users/{user_id}/tasks/{task_id}
- Gets a task
- Requires authentication
-
PUT /users/{user_id}/tasks/{task_id}
- Updates a task
- Requires authentication
- Sample request body:
{ "title": "Task Title", "description": "Task Description", "due_date": "2023-06-19 18:30:00", "completed": false }
-
DELETE /users/{user_id}/tasks/{task_id}
- Deletes a task
- Requires authentication
To get a local copy up and running, follow these steps.
In order to run this project you need:
- Ruby
- Rails(7)
- PostgreSQL
Clone this repository to your desired folder:
cd my-folder
git clone git@github.com:yuvenalmash/undertakings.git
Run the following command to create the database:
rails db:create
rails db:migrate
Install this project with:
cd undertakings
bundle install
To run the project, execute the following command:
rails server
To run tests, run the following command:
rspec
This project is deployed on Heroku.
👤 Yuvenal Njoroge
- GitHub: @yuvenalmash
- Twitter: @YuvenalNjoroge
- LinkedIn: Yuvenal Njoroge
- Add user profile
- Add user avatar
- Add user settings
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project, give it a ⭐️!
This project is MIT licensed.