Giter VIP home page Giter VIP logo

bikeramp-nestjs's Introduction

Bikeramp

Bikeramp is a tracking system for bike couriers. Deployed version is available under https://bikeramp-nestjs.herokuapp.com.

Run development server

In order to run server locally, you need to follow these steps:

  1. Create env/development.env file in config directory and set there following environment variables:
DATABASE_URL=postgres://user:password@host:port/db_name
GOOGLE_MAPS_ACCESS_KEY=YOUR_ACCESS_KEY
PORT=5000
  1. Run:
npm run start:dev

Routes

Trips

  1. POST /api/trips

Logs the trip and automatically calculates the distance between start and destination addresses.

Parameters:

  • start_address - start address, e.g.: "Plac Europejski 2, Warszawa, Polska"
  • destination_address - destination address, e.g.: "Plac Europejski 2, Warszawa, Polska"
  • price - package price, e.g.: 22.50
  • date - date of delivery, e.g. "2022-08-27"
  1. GET /api/trips

Returns all tracked trips ordered by date.

Stats

  1. GET api/stats/weekly

Returns how many kilometers did the courier ride during current week and how much money he received for the rides.

  1. GET api/stats/monthly Returns a summary of ride distances from current month, grouped by day.

Run E2E tests

In order for E2E tests to work properly env/test.env file must be created in the config directory. E2E tests use in memory sqlite database, but Google Maps access key must be provided:

GOOGLE_MAPS_ACCESS_KEY=YOUR_ACCESS_KEY

bikeramp-nestjs's People

Contributors

asiaziola avatar

Stargazers

Bima Putra Lamanda avatar

Watchers

 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.