Skip to content

GGORG0/MapKom

Repository files navigation

Contributors Forks Stargazers Issues License


About The Project

This is an all-in-one (soon™) app for all your public transport needs in Wrocław, Poland. (and maybe more cities later on!)

(back to top)

Features

There is still a lot to do, but once it is all finished, I guarantee you'll love this app! Stay tuned for updates!

  • 📱 Runs natively on Android, iOS (currently broken) and the web
  • 👀 Beautiful Material Design 3 and Material You look
  • 🗺️ Smooth and snappy vector map (no black squares while scrolling around!)
  • 🦀 Blazingly fast backend, written in Rust
  • 🧩 An extensible and modular design, allowing for easy addition of new cities
  • 🛰️ Real-time location and heading markers for public transport vehicles, updated every 5 seconds and streamed to you instantly
  • 🛡️ Redundant location sources to ensure reliability, because Wrocław is known for breaking one while leaving the others working
  • 🧭 Routing between stops, with transfer support and live updates along your journey
  • 📈 Live route view for each vehicle
  • 🕑 Vehicle delay calculation and stop arrival time prediction
  • 📜 Schedule viewer
  • 🚏 A list of upcoming arrivals/departures at a stop
  • 📍 Location marker filtering by line and vehicle model for a clearer map view
  • 🚍️ Explore vehicle information, specs and photos
  • 🔎 Vehicle, line and stop search
  • 💬 More?

(back to top)

Built With

  • React.js
  • Expo
  • Material Design 3
  • MapLibre
  • OpenStreetMap
  • Socket.IO
  • Rust
  • Swagger & OpenAPI

(back to top)

Working Locally

This project is separated into two parts: the backend (Rust) and the frontend (React Native/Expo).

If you use VSCode, you can open the mapkom.code-workspace workspace for ease of use.

Backend

  1. Install Rust
  2. Clone the repo and go into the mapkom_server directory.
    git clone https://github.com/GGORG0/MapKom.git
    cd mapkom_server/
  3. Run the project with
    cargo run

Frontend

Note: This project will not run in Expo Go. You will have to use a development build.

Note: This project's web version will not build in development mode, failing with Object prototype may only be an Object or null: undefined. You need to pass the --no-dev flag to Expo to build it correctly. This is because MapLibre-React-Native would still be built in dev mode (because of bundler optimizations being disabled), and fail loading the native modules.

  1. Install the prerequisites:

  2. Clone the repo and go into the mapkom_client directory.

    git clone https://github.com/GGORG0/MapKom.git
    cd mapkom_client/
  3. Install npm dependencies

    yarn install
  4. Generate the native files

    yarn expo prebuild --clean
  5. Connect your device and run the project

    # For Android
    yarn expo run:android
    
    # For iOS
    yarn expo run:ios
    
    # For Web, see note above
    yarn expo start --web --no-dev
  6. You can also run the Metro bundler (development server) by itself if you don't want to recompile/reinstall the app

    yarn expo start -d
  7. Build a production-optimized release

    # For Android
    cd android
    ./gradlew assembleRelease
    adb install app/build/outputs/apk/release/app-release.apk
    
    # For iOS - idk, figure it out :)
    
    # For Web
    yarn expo export -p web
    yarn expo serve # or just serve the files in dist/ manually, it's all statically bundled

(back to top)

Contributing

Any contributions you make, like a small feature addition, support for a new city or new translations, would be greatly appreciated.

If you have any suggestions you'd like to see implemented, please make a feature request.

Don't forget to give the project a star if you enjoyed it. Thanks!

Translating

This project uses react-i18next. The translation files are stored in mapkom_client/lib/i18n/*.json.

You can use the amazing i18n-ally VSCode extension to help you with translating the project easily. You'll need to open the mapkom.code-workspace workspace to get all the correct settings applied.

There will be Weblate support coming soon!

Adding support for a new city

MapKom uses a modular architecture to allow you to more-or-less easily add support for a new city.

Every city has its backend code in the cities directory. You can search for wroclaw in the entire project to see roughly what you need to implement to add a new city.

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the GNU GPL v3 license. See LICENSE for more information.

(back to top)

Contact

GGORG - [email protected]

More contact options (Matrix preferred) can be found on my website.

You can also create an issue or discussion for topics that can be discussed publicly, like feature or city requests.

(back to top)