Bikeramp is a tracking system for bike couriers. Deployed version is available under https://bikeramp-nestjs.herokuapp.com.
In order to run server locally, you need to follow these steps:
- Create
env/development.envfile 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- Run:
npm run start:dev- 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.50date- date of delivery, e.g. "2022-08-27"
- GET
/api/trips
Returns all tracked trips ordered by date.
- GET
api/stats/weekly
Returns how many kilometers did the courier ride during current week and how much money he received for the rides.
- GET
api/stats/monthlyReturns a summary of ride distances from current month, grouped by day.
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