Giter Site home page Giter Site logo

citybikeapp's Introduction

City Bike App

An app that I created to try out what I could do with some open data. This is an app that lists HSL city bike journeys and stations. Every journey and station also has a details page for more information. Journeys can be sorted and filtered by journey duration and distance covered. Stations and journeys may also be searched by station name.

Test it!

You can test the app on Expo Go, please find it here: https://expo.dev/@mir4ha/citybike-app?serviceType=classic&distribution=expo-go

Screenshots

Tech Stack

The backend is build with NodeJs and Express, with PostgreSQL as a database with Sequelize ORM.
The frontend is build using React Native with Expo framework. IPhone (iOS) was used for testing the app durning development.

Run the project locally

Backend

  • Install Nodejs and npm => https://nodejs.org/en/download/
  • Clone the repository and move to the directory .\CityBikeApp\citybike-backend\
  • Create .env file and add a PostgreSQL database URL in a variable called DATABASE_URL=address
  • Run 'npm install' to install all dependencies.
  • I was using Fly.io, here in order to connect to the Fly Postgres database forward the server port to your local system with fly proxy: fly proxy 5432 -a postgres-app-name. For a psql shell: fly postgres connect -a postgres-app-name
  • Now you're set and can run the backend with command: 'npm start' for production mode or 'npm run dev' to run it with nodemon in development mode.
  • To run the tests you need to add a test database url to the .env file in a variable called TEST_DATABASE_URL=address an Run 'npm test'.

Frontend

  • Move to the directory .\CityBikeApp\citybike-front and run 'npm install' to install all dependencies.
  • Run: 'npx expo start' to run the Expo project.
  • Copy the IP address between the exp:// and :, for example 192.168.1.130 and add port 3001, in format http://<IP_ADDRESS>:3001 . Make sure to add that URL in the BiketripDetails.jsx 'export const Url = 'http://192.168.1.130:3001''.
  • To see the project running, you'll need to have the Expo Go App on your mobile device. Once you have it scan the QR code with Expo Go (Android) or the Camera app (iOS) and open the project in the app.

To Do

  • Overall still working on things.

Features to add

  • A feature to add data.
  • A station location map.
  • Testing frontend.

The data

The journey data is owned by City Bike Finland and can be found at HSL open data: https://www.hsl.fi/en/hsl/open-data
The station data can be found at Avoin Data: https://www.avoindata.fi/data/en_GB/dataset/hsl-n-kaupunkipyoraasemat/resource/a23eef3a-cc40-4608-8aa2-c730d17e8902

citybikeapp's People

Contributors

mir4h 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.