Code Monkey home page Code Monkey logo

book-a-dev's Introduction

BOOK A DEVELOPER

Full stack website for users to book developers for a project.

Built With

-Ruby -Ruby on Rails -PostgreSQL -Heroku

Getting Started

To get a local copy up and running follow these simple example steps. In your terminal, navigate to your current directory and run this code

git clone https://github.com/Graycemuthui/Book-a-dev.git

Then run:

cd Book-a-dev Open in your preferred text editor. Run code . to open VScode.

Setup

This guide assumes you have already installed the necessary dependencies to use a postgreSQL database and Ruby on Rails.

Change the ruby version in your gemfile to the version you have installed on your machine. Add your credentials to the database.yml file.

Run: bundle install npm install rails db:create rails db:migrate rails db:seed foreman start

API Endpoints

| Endpoint | Functionality |

To create a new developer, send a POST request to http://localhost:3000/api/v1/developers with the following body:

{ "name": "John Doe", "email": "[email protected]", "phone": "08012345678", "city": "Lagos", "bio": "I am a developer", "github": "kell", "photo": "https://res.cloudinary.com/kell/image/upload/v1570628989/developers/developer_1.jpg" }

To create a new booking, send a POST request to http://localhost:3000/api/v1/bookings with the following body:

{ "developer_id": 1, "date": "2019-10-10", "time": "10:00", "city": "Lagos" }

To get all developers, send a GET request to http://localhost:3000/api/v1/developers

The response will be an array of all developers.

` [

                            { name: 'Grayce', email: '[email protected]', phone: '+23498023432', city: 'Nairobi', bio: 'I am a Javascript developer',
                              github: 'https://github.com/Graycemuthui', photo: 'https://avatars.githubusercontent.com/u/95374858?v=4' },
                            { name: 'Rich', email: '[email protected]', phone: '+4343422322', city: 'Ghana', bio: 'I am a Java developer',
                              github: 'https://github.com/assadounto', photo: 'https://avatars.githubusercontent.com/u/95765079?v=4' },
                          ]`

To get all bookings, send a GET request to http://localhost:3000/api/v1/bookings

The response will be an array of all bookings.

` [

                            { developer_id: 1, date: '2021-10-10', time: '10:00', city: 'Nairobi' },
                            { developer_id: 2, date: '2021-10-10', time: '10:00', city: 'Nairobi' },
                          ]`

To delete a booking, send a DELETE request to http://localhost:3000/api/v1/bookings/:id

Example :

fetch(api/v1/bookings/${booking.id}, { method: "DELETE", headers: { "Content-Type": "application/json", }, });

To delete a developer, send a DELETE request to http://localhost:3000/api/v1/developers/:id

Example:

fetch(/api/v1/developers/${developer.id}, { method: "DELETE", headers: { "Content-Type": "application/json", }, })

Author1

πŸ‘€ K42

Author2

πŸ‘€ MICHAELMUNAVU83

Author3

πŸ‘€ GRAYCEMUTHUI

Author4

πŸ‘€ RICHMONDADU-KYERE

Author5

πŸ‘€ Said RaΕ‘inliΔ‡

Acknowledgments

The credits of the website design goes to Murat Korkmaz

Show your support

Give a star if you like this project!

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

πŸ“ License

This project is MIT licensed.

book-a-dev's People

Contributors

michaelmunavu83 avatar assadounto avatar graycemuthui avatar crystallinebutterfly avatar saidrasinlic avatar

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.