Contributing
LibreScoot is open source and welcomes contributions. Most services are Go; the dashboard UI is Flutter/Dart. The Yocto build system assembles the full OS image.
Prerequisites
- Go 1.25+ for building MDB services
- Flutter SDK for working on scootui (dashboard UI)
- Docker for Yocto image builds
- Redis for local service testing
- A Linux host is recommended; WSL2 works for Go service development
Repository Structure
LibreScoot is spread across ~45 repositories in the librescoot GitHub organization. The main ones:
| Repo | Contents |
|---|---|
| librescoot/librescoot | Meta-repo: Yocto build system, Docker build script, release tooling |
| meta-librescoot | Yocto layer: recipes for all services and OS configuration |
| scootui | Flutter dashboard application |
| vehicle-service | Central vehicle state machine |
| redis-ipc | Shared Redis IPC library used by all Go services |
Each service is a self-contained Go module with its own git repository and version tag history.
Building a Go Service
Each service has a standard Makefile. Build targets:
make build # Cross-compile for ARM (target scooter hardware) make build-host # Build for your local machine (development/testing) make test # Run tests make lint # Run golangci-lint make fmt # Format code (gofmt)
Cross-compilation targets ARMv7 (both MDB and DBC are Cortex-A series):
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build ...
Deploying to a test scooter
# Build ARM binary make build # Copy to scooter (staging on /data, not /tmp) scp bin/my-service root@<mdb-ip>:/data/my-service-test # Swap and restart ssh root@<mdb-ip> "systemctl stop librescoot-my-service \ && cp /data/my-service-test /usr/bin/my-service \ && systemctl start librescoot-my-service" # Check logs ssh root@<mdb-ip> journalctl -u librescoot-my-service -f
LibreScoot services use the prefix
librescoot-: e.g. librescoot-alarm, librescoot-vehicle. Use lsc service list to see all running services.
Building the Dashboard (scootui)
scootui is a Flutter application targeting the DBC (Dashboard Computer).
# Install Flutter dependencies flutter pub get # Build for Linux (host testing) flutter build linux # The Yocto recipe handles cross-compilation for the imx6DL DBC
For UI development, you can run scootui on a desktop Linux machine. It reads from a local Redis instance; mock the relevant keys to simulate scooter state.
Yocto / Full Image Builds
Full OS image builds use Docker to ensure a reproducible environment.
# From librescoot/librescoot repo: ./build.sh
The Docker image handles all Yocto dependencies. Build output is a Mender .mender artifact for OTA delivery or a raw image for initial flash.
Individual packages can be rebuilt faster with bitbake <recipe-name> inside the build container. Most contributors only need this when changing meta-librescoot recipes or kernel configuration.
See Build Guide for full details.
Code Style
- Go: standard
gofmtformatting;golangci-lintfor linting - Dart/Flutter:
dart format - Commits: Conventional Commits (
feat:,fix:,chore:,refactor:, etc.) - Versioning: each service uses semantic versioning with git tags (
v0.1.0,v0.2.0, ...)
Submitting Changes
- Fork the relevant repository on GitHub
- Create a branch from
main - Make your changes; ensure
make testpasses - Open a pull request describing what and why
- Join Discord to discuss before large changes
Bug reports and feature requests go to librescoot/librescoot/issues.