Skip to content

This is the back-end part of the program that provides the API to the react front-end. The app is about booking a counseling session.

Notifications You must be signed in to change notification settings

DanielMitiku/book-a-counseling-session-backend

Repository files navigation

Booking a Counseling Session Backend

This is an app that helps you book a counseling session with experts in many areas. It is the backend of a react app. It is an api only app which serves the requests of react app. The front-end of the app can be found here.

Built with

  • Ruby on Rails
  • Rails JSON API
  • JWT
  • Postgresql

Demo

🔥 Demo

Screenshot

RESTful endpoints

Endpoint Functionality
POST /signup Create User
POST /auth/login Login Users
GET /users Get Users
GET /users/:id Get User
PUT /users/:id Update User
DELETE /users/:id Delete User
GET /users/:user_id/appointments Get Users Appointments
POST /users/:user_id/appointments Create Users Appointments
GET /users/:user_id/appointments/:id Get an appointment
PUT /users/:user_id/appointments/:id Update an appointment Users
DELETE /users/:user_id/appointments/:id Delete an appointment Users
GET /counselings Get Counselings
GET /counseligs/:id Get Counseling
PUT /counselings/:id Update Counseling
DELETE /counselings/:id Delete Counseling

Get Started

Clone the repo to your local machine

    git clone https://github.com/DanielMitiku/book-a-counseling-session-backend.git
    cd book-a-counseling-session-backend
  • Please install Postgres db in your computer and add the appropriate config to the config/database.yml file

Install gems packages, migrate database and start development server

    bundle install
    rails db:create
    rails db:migrate
    rails s

Examples

  • You can use any tool to make requests to the server. In this example, I used httpie.
  • To login and receive JWToken as a response, pass your email and password as shown below:
    http :4000/auth/login email=your_email password=your_password
  • To get the appointments of a user:
    http :4000/users/:user_id/appointments Authorization:'Auth_token'

Current Features

  • RESTful API as shown in the above table
  • User authentication using JWT
  • User authorization
  • Users can book/remove appointments
  • Admins can remove users' appointments
  • Admins can add/remove sessions users will book
  • Admins can remove users ...

Features you can add

  • API versioning
  • making each user have its own timezone ...

Author

🤝 Contributing

  • Contributions, issues and feature requests are welcome!

  • Feel free to create PR.

Show your support

  • Give a ⭐️ if you like this project and follow me on Github for more projects like this.

📝 License

  • This project is MIT licensed.

About

This is the back-end part of the program that provides the API to the react front-end. The app is about booking a counseling session.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published