This repository is a Ruby on Rails developed backend API only application named "book-a-dev-api". The purpose of the project is to automate the acquisition of technical talents by having a central location where some highly skilled developers can advertise themselves. The Application allows an authenticated user to log in to the system, get a list of all available developers who can be booked for a specified period of time and amount per hour. The developers' bio has the contact details, location, pricing per hour of the lawyer from which a user gets more insights. It also has dedicated pages to see a user's reservations and a reserve form. The project also has a Front end repository which can be viewed here (book-a-dev-ui)
For this project, we are a team of 4 awesome members namely, Isaka William, Emmanuel Allan, Nicole Ciragane, and Nemwel Boniface.
To succesfully execute the project, we subdivided ourselves into two groups having Emmanuel and Nicole working on the Front End and Isaac and Nemwel working on the back end.
To do this succesfully we created a Kanban board and subdivided the tasks among ourselves and executed the tasks according to the plan that we had. The kanban can be viewed here. To view the link to the kanban screenshot as it was originally, that can be viewed here
Enjoy!
- Ruby on rails v7.0.3
- Ruby v3 +
- PostgreSQL
- Rspec gem for project unit tests
- Rswag Gem for API documentation
- Postman for testing API endpoints
- Pair programming
- Definitely lots of love ❤️ and dedication 💪
To view the available endpoints visit our https://book-a-dev-api.herokuapp.com/api-docs/index.html
The projects Front end can be found here
The project is deployed on Heroku and is hosted on GitHub. To test the project, you can optionally use the hosted version base URL https://book-a-dev-api.herokuapp.com
or clone it locally into your local machine as explained below:
-
Clone the project
git clone https://github.com/maxthestranger/book-a-dev-api.git
-
navigate to the project directory
cd book-a-dev-api
-
Install all dependancies of the project
bundle install
-
Create the database
rails db:create
-
Load all the project schema
rails db:schema:load
-
Migrate the project
rails db:migrate
-
Load project seed data
rails db:seed
-
Start your rails server and run it on port 8080
rails s -p 8080
-
To check the API endpoints locally visit
http://localhost:3000/api-docs
The project base URL is https://book-a-dev-api.herokuapp.com/
. The API allows you to perform a number of operations namely, Signing up, signning in, Listing all developers, creating a developer, Listing all reservations for a user, Creating a reservation. Below I will elaborate on these with their endoints and where applicable provide sample data.
Endpoints for signing up is POST api/v1/users
sample data for signing up:
{
"name":"mujomba",
"username":"mja",
"email": "mja@gmail.com",
"password": "222111"
}
Endpoint for signing in is POST api/v1/login
. Sample login (with a valid user)
{
"email": "nemwelb@gmail.com",
"password": "222111"
}
Endpoint for listing all developers is GET api/v1/developers
. Responds with JSON data
Endpoint for creating a developer is POST api/v1/developers
. Sample data include:
{
"name": "Nemwel Boniface",
"icon": "https://avatars.githubusercontent.com/u/86318284?v=4",
"location": "Nairobi, Kenya",
"experience": "2",
"bio": "Some long text",
"hourly_rate": "25",
"tech_stack": "Rails, React, Redux, Ruby, PostgresQL",
"github": "https://github.com/Nemwel-Boniface",
"twitter": "https://twitter.com/nemwel_bonie",
"linkedin": "https://www.linkedin.com/in/nemwel-nyandoro/",
"available": "true",
"title": "Full-stack developer",
"phone": "0752245265",
"user_id": "1"
}
Endpoints for listing the reservations for a specific user is GET api/v1/users/:user_id/reservations/
.
Endpoints for creating a new reservation is POST api/v1/users/:user_id/reservations/
. Sample data include
{
"start_date": "2020-04-23",
"end_date": "2025-05-13",
"location": "mavurunza",
"developer_id": "2",
"user_id": "1"
}
rspec
👤 Nemwel Boniface
- GitHub: @Nemwel-Boniface
- Twitter: @nemwel_bonie
- LinkedIn: LinkedIn
👤 Isaka Lumato
- GitHub: @Isaka Lumato
- Twitter: @lumato_isaac
- LinkedIn: LinkedIn
👤 Emmanuel Allan
- GitHub: @Emmanuel Allan
- Twitter: @maxthestranger
- LinkedIn: LinkedIn
👤 Ciragane Nicole
- GitHub: @Ciragane Nicole
- Twitter: @ciraganeN
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Original design idea by Murat Korkmaz on Behance.Murat Korkmaz on Behance
Give a ⭐️ if you like this project!
This project is MIT licensed.