Skip to content

RESTful API for a Task management application. Uses JWTs to secure the endpoints. Allows the user to create, read, update and delete the tasks

License

Notifications You must be signed in to change notification settings

yuvenalmash/undertakings

Repository files navigation


Undertakings

📗 Table of Contents

📖 Undertakings

Undertakings is a is an API for a task management application where users can create, update, and delete tasks.

Frontend Repository: Undertakings

🛠 Built With

Tech Stack

Backend
Database

Key Features

  • User Authentication
  • CRUD Operations on Tasks

API Documentation

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

🚀 Live Demo

Live Demo Link

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • Ruby
  • Rails(7)
  • PostgreSQL

Setup

Clone this repository to your desired folder:

  cd my-folder
  git clone git@github.com:yuvenalmash/undertakings.git

Setup Database

Run the following command to create the database:

  rails db:create
  rails db:migrate

Install

Install this project with:

  cd undertakings
  bundle install

Usage

To run the project, execute the following command:

  rails server

Run tests

To run tests, run the following command:

  rspec

Deployment

This project is deployed on Heroku.

(back to top)

👥 Authors

👤 Yuvenal Njoroge

(back to top)

🔭 Future Features

  • Add user profile
  • Add user avatar
  • Add user settings

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project, give it a ⭐️!

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

RESTful API for a Task management application. Uses JWTs to secure the endpoints. Allows the user to create, read, update and delete the tasks

Topics

Resources

License

Stars

Watchers

Forks