MCPcopy Index your code
hub / github.com/asynkron/realtimemap-go

github.com/asynkron/realtimemap-go @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
239 symbols 376 edges 36 files 32 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Real-time Map

Real-time Map displays real-time positions of public transport vehicles in Helsinki. It's a showcase for Proto.Actor - an ultra-fast distributed actors solution for Go, C#, and Java/Kotlin.

This repository contains the Go version of the sample

The app features: * Real-time positions of vehicles. * Vehicle trails. * Geofencing notifications (vehicle entering and exiting the area). * Vehicles in geofencing areas per public transport company. * Horizontal scaling.

The goals of this app are: 1. Showing what Proto.Actor can do. 1. Presenting a semi-real-world use case of the distributed actor model. 1. Aiding people in learning how to use Proto.Actor.

Find more about Proto.Actor here.

image

Running the app

Prerequisites: 1. Go 1.18+ 1. node.js 17+

Configure Mapbox: 1. Create an account on Mapbox. 1. Copy a token from: main dashboard / access tokens / default public token. 1. Paste the token in frontend\src\config.ts.

Start Backend:

cd backend
go run main.go

Start frontend:

cd frontend
npm install
npm run serve

The app is available on localhost:8080.

How does it work?

Please refer to the .NET version README for a detailed description of the architecture.

Extension points exported contracts — how you extend this code

Vehicle (Interface)
Vehicle interfaces the services available to the Vehicle [1 implementers]
backend/grains/protos_protoactor.go
Configuration (Interface)
(no doc)
frontend/src/config.ts
Organization (Interface)
Organization interfaces the services available to the Organization [1 implementers]
backend/grains/protos_protoactor.go
PositionsDto (Interface)
(no doc)
frontend/src/hub.ts
SendPositions (FuncType)
(no doc)
backend/grains/user_actor.go
PositionDto (Interface)
(no doc)
frontend/src/hub.ts
SendNotification (FuncType)
(no doc)
backend/grains/user_actor.go
NotificationDto (Interface)
(no doc)
frontend/src/hub.ts

Core symbols most depended-on inside this repo

trySetGeoJsonSource
called by 4
frontend/src/components/map/mapUtils.ts
OnPosition
called by 4
backend/grains/protos_protoactor.go
drawCurrentlySelectedVehicleTrail
called by 2
frontend/src/components/map/vehicleTrailsLayer.ts
mapVehiclesToGeoJson
called by 2
frontend/src/components/map/vehicleStates.ts
getBoundsWithMargin
called by 2
frontend/src/components/map/boundsWithMargin.ts
Init
called by 2
backend/grains/protos_protoactor.go
Terminate
called by 2
backend/grains/protos_protoactor.go
ReceiveDefault
called by 2
backend/grains/protos_protoactor.go

Shape

Method 132
Function 59
Struct 32
Interface 13
FuncType 2
TypeAlias 1

Languages

Go79%
TypeScript21%

Modules by API surface

backend/grains/protos.pb.go104 symbols
backend/grains/protos_protoactor.go30 symbols
frontend/src/hub.ts17 symbols
backend/server/hub.go8 symbols
frontend/src/components/map/vehicleStates.ts7 symbols
backend/grains/organization_grain.go7 symbols
backend/grains/vehicle_grain.go6 symbols
backend/contract/contract.go6 symbols
frontend/src/components/map/geofencesLayer.ts5 symbols
frontend/src/components/geofencing/api-organization.ts5 symbols
backend/grains/user_actor.go5 symbols
backend/server/sever.go4 symbols

For agents

$ claude mcp add realtimemap-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page