Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 2.27 KB

File metadata and controls

81 lines (62 loc) · 2.27 KB

OpenMapper

Open-source mapping application for Switzerland with real-time traffic, routing, geocoding, and public transport -- built on Swiss government APIs.

Status: In active development

Architecture

Component Stack
Backend Go, chi router, WebSocket, slog
Web SvelteKit, Svelte 5, MapLibre GL, TailwindCSS v4, swisstopo tiles
Mobile Flutter, Riverpod, MapLibre GL
Routing OSRM (self-hosted, Switzerland OSM data)
Infra Podman devcontainers, GitHub Actions CI/CD

Data Sources

API Purpose
swisstopo GeoAdmin Geocoding, reverse geocoding
ASTRA DATEX-II Traffic incidents, roadworks
OJP 2.0 Public transport routing
GTFS-RT Real-time transit updates
OSRM Car/bike/foot routing
Nominatim Fallback geocoding (OSM)
GraphHopper Fallback routing
search.ch Fallback PT routing

Project Structure

backend/           Go API server
  cmd/server/      Entry point
  internal/
    client/        API clients (geoadmin, osrm, datexii, ojp, gtfsrt, ...)
    config/        Environment-based configuration
    handler/       HTTP handlers
    middleware/     CORS, logging, rate limiting
    model/         Domain types
    server/        Server setup and route wiring
    service/       Business logic, caching, background polling
    ws/            WebSocket hub for real-time traffic
web/               SvelteKit frontend
mobile/            Flutter app
.devcontainer/     Podman devcontainer configs + OSRM setup

Getting Started

Prerequisites

  • Go 1.23+
  • Node.js 22+ / pnpm
  • Podman (for devcontainers and OSRM)

Backend

cd backend
cp ../.env.example ../.env  # configure API keys
go build ./...
go test ./...
go run ./cmd/server

Web

cd web
pnpm install
pnpm dev

Devcontainer

The .devcontainer/ directory contains Podman Compose configs for the full development environment including a self-hosted OSRM instance with Swiss OSM data.

License

GPL-3.0