/taxi24

This is backend service for Taxi 24

Primary LanguageJavaScript

TAXI 24

Maintainability TAXI_24

Overview

A simple taxi 24 that carries out various taxi management task, show casing the following functinalities:

  1. DRIVER CRUD
  2. TRIPS CRUD
  3. Riders CRUD

1. 🚀 Getting Started

1.1 Prerequisites

To get started, ensure that you have NodeJS installed on your local machine:

  • Yarn

1.2. Run locally

  • Clone repository or clone your own fork

    git clone git@github.com:Kibetchirchir/taxi24.git
  • Make a duplicate of .env.example and rename to .env, then configure your credentials.

  • Install dependencies by running yarn on your terminal.

  • Build the application by running yarn build

  • Two npm scripts are availiable to spin up the app server:

    • yarn start spin up the server without watching for any file changes
    • yarn dev:start watches for any file changes and reloads the server

1.3. Test Locally

To test or consume api locally, you can make use of Postman or Insomnia

1.4. Running Test

Test specs are implemented using jest .

Two npm scripts are available to run the test suite:

  1. yarn test - Performs a single full test suite run, including instanbul code coverage reporting. Summary coverage reports are written to stdout, and detailed HTML reports are available in /coverage/index.html

2. 🔒 Authentication

// todo

3. 🔖 API Versioning

The second part of the URI specifies the API version you wish to access in the format v{version_number}. For example, version 1 of the API (most current) is accessible via:

  http://localhost:3000/api/v1

3. 💚 HTTP Response Codes

Each response will be returned with one of the following HTTP status codes:

  • 200 OK The request was successful
  • 400 Bad Request There was a problem with the request (security, malformed)
  • 401 Unauthorized The supplied API credentials are invalid
  • 403 Forbidden The credentials provided do not have permissions to access the requested resource
  • 404 Not Found An attempt was made to access a resource that does not exist in the API
  • 500 Server Error An error on the server occurred

4. 🔖 Resources

4.1. Authentication

// todo

4.2. API Routes

URI HTTP Method Description
**/api/v1/drivers POST Get and POST drivers
**/api/v1/riders POST Get and POST riders
**/api/v1/trips POST Get and POST trips

5. 📝 License

This project is open-sourced software licensed under the MIT license.