Development setup¶
Clone¶
Tools¶
| Part | You need |
|---|---|
core/ |
JDK 17 (Temurin recommended). Gradle comes with the wrapper (./gradlew). |
app/ |
JDK 17 + Android SDK (platform 35, build-tools 35.0.0). Android Studio Ladybug or newer is easiest. |
backend/ |
Python 3.12, and Docker for the full stack. |
mac/ |
macOS 13+, Xcode 15+ (Swift 5.9). |
docs/ |
Python 3 and pip install mkdocs-material. |
- File > Open and choose the repository folder.
- Let Gradle sync. Android Studio installs the SDK parts it needs.
- Pick the
apprun configuration and a device with USB debugging on.
Backend¶
cd backend
python3.12 -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
python -m pytest -q
# run the server without Docker (needs a broker on localhost:1883, or MQTT_ENABLED=0)
MQTT_ENABLED=0 python -m swarm_server.main
# or the full stack
docker compose up --build
Mac app¶
Open mac/Package.swift in Xcode to work in the IDE.
Docs site¶
pip install mkdocs-material
mkdocs serve # http://127.0.0.1:8000, reloads on save
mkdocs build --strict # what CI runs
The site is in docs/, the menu is in mkdocs.yml.
Testing on a device¶
- Turn on USB debugging (Developer options).
- Turn off Wi-Fi scan throttling on test phones.
- For RTT, use a phone and access points that support 802.11mc (check Live > Traffic > Details).
adb logcat -s SwarmLinkshows the MQTT link log.