Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 1.59 KB

architecture.md

File metadata and controls

9 lines (7 loc) · 1.59 KB

Architecture

Architecture diagram of City Bike Journeys app City Bike Journeys is a full stack web application built using Typescript. The business logic of the application lives in the back end. On the first start of the application, the back end parses station and bike trip data from .csv files and seeds it to a PostgreSQL database. The back end offers an API with endpoints for stations, trips and the state of seeding of the database. The front end uses the endpoints to fetch data about trips and bike stations.

PostgreSQL database

Diagram of City Bike Journeys Database I wanted to create a database that would be flexible and easy to develop in the future. That's why I divided CityNames, StationNames and StationAddresses into separate tables. This way it is easy to add new languages in the future. Because of this, it was also easy to create API endpoints where the desired language was given as a parameter to the request.

The database is accessed using Sequelize, an ORM tool for Typescript. The models are defined in /backend/src/models and Sequelize uses these files to automatically create and maintain the necessary database tables.