Code Monkey home page Code Monkey logo

book-a-dev-api's Introduction

Book-a-dev-api

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)

Project structure:

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!

Built With

  • 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 ๐Ÿ’ช

Link to API Documentation

To view the available endpoints visit our https://book-a-dev-api.herokuapp.com/api-docs/index.html

Link to FrontEnd app

The projects Front end can be found here

Hosting services

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:

Run project on your local machine follow these steps

  1. Clone the project git clone https://github.com/maxthestranger/book-a-dev-api.git

  2. navigate to the project directory cd book-a-dev-api

  3. Install all dependancies of the project bundle install

Setup your database:

  1. Create the database rails db:create

  2. Load all the project schema rails db:schema:load

  3. Migrate the project rails db:migrate

  4. Load project seed data rails db:seed

  5. Start your rails server and run it on port 8080 rails s -p 8080

  6. To check the API endpoints locally visit http://localhost:3000/api-docs

Testing the project online

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.

1. Sign up

Endpoints for signing up is POST api/v1/users sample data for signing up:

{
   "name":"mujomba",
   "username":"mja",    
   "email": "[email protected]",
   "password": "222111"
}

2. Sign in

Endpoint for signing in is POST api/v1/login. Sample login (with a valid user)

{
   "email": "[email protected]",
   "password": "222111"
}

3. List all developers

Endpoint for listing all developers is GET api/v1/developers. Responds with JSON data

4. Creating a developer

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" 
 }

5. List a Reservation

Endpoints for listing the reservations for a specific user is GET api/v1/users/:user_id/reservations/.

6. Create a new reservation for a specific user

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" 
}

Run tests

rspec

Authors

๐Ÿ‘ค Nemwel Boniface

๐Ÿ‘ค Isaka Lumato

๐Ÿ‘ค Emmanuel Allan

๐Ÿ‘ค Ciragane Nicole

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Acknowledgements

Original design idea by Murat Korkmaz on Behance.Murat Korkmaz on Behance

Show your support

Give a โญ๏ธ if you like this project!

๐Ÿ“ License

This project is MIT licensed.

book-a-dev-api's People

Contributors

nemwel-boniface avatar isaka-lumato avatar

Stargazers

 avatar

Forkers

isaka-lumato

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.