Getting started
This guide sets up a local development environment. For a production deployment, see Operations.
Prerequisites
Section titled “Prerequisites”- Docker & Docker Compose
- PHP 8.4+ and Composer (backend)
- Node.js 22+ and pnpm (mobile app, locker client, website)
- just (task runner, optional but recommended)
Clone the repository
Section titled “Clone the repository”git clone https://github.com/Open-Locker/Open-Locker.gitcd Open-LockerBackend
Section titled “Backend”cp locker-backend/.env.example locker-backend/.envConfigure at least the following in locker-backend/.env:
APP_URL— the backend’s URLDB_PASSWORD— database passwordMOSQ_HTTP_USER/MOSQ_HTTP_PASS— credentials for MQTT broker ↔ backend communication
Generate the MQTT broker configuration and start the stack:
just setup-mqtt # generates mosquitto.conf from the template
cd locker-backenddocker compose up -d # Postgres, Mosquitto, Redis, appphp artisan migrate --seedCreate the first admin user:
docker compose exec app php artisan filament:userThe admin panel is then available at <APP_URL>/admin. The primary dev loop
runs via Composer:
composer dev # server + queue + logs + Vite concurrentlycomposer test # testscomposer quality # format check + static analysis + testsMobile app
Section titled “Mobile app”cd mobile-apppnpm installpnpm start # Expo dev clientThe API client is generated from the running backend’s OpenAPI specification. After changing the API contract:
pnpm generate:api # backend must be runningBefore pushing: pnpm check (typecheck + lint + format + expo-doctor).
Locker client
Section titled “Locker client”cd locker-clientpnpm installpnpm dev # runs the client locallyThe client needs a config/locker-config.yml and a .env with a
PROVISIONING_TOKEN. Hardware details are listed in the
Bill of Materials.
Website
Section titled “Website”cd websitepnpm installpnpm dev # http://localhost:4321