The backend API service for the Black Rock Ranger Secret Clubhouse. It is a Laravel 12 application (PHP, Octane, Sanctum) serving a JSON API. The frontend lives in ranger-clubhouse-web.
The authoritative versions are in composer.json and the Dockerfile; the list below may lag behind them.
- Git
- PHP >= 8.4 with the extensions listed in
composer.json - Composer >= 2.8
- MariaDB >= 10.5
git clone https://github.com/burningmantech/ranger-clubhouse-apithis repositorycd ranger-clubhouse-apicomposer install- Copy
.env.clubhouseto.envand set the configuration appropriately - Create the MySQL/MariaDB database
rangers. The accountrangerswill need appropriate permissions to access it. - Load the data:
- Normal path: ask the Ranger Tech Team for a redacted database and import it.
- From scratch:
php artisan migrate:freshloads an empty schema. Note this creates no login account, so the redacted database is the usual way to get a working dev setup.
php artisan servestarts the backend onhttp://127.0.0.1:8000.- See the ranger-clubhouse-web
READMEfor how to start the frontend.
Hitting the server in a browser returns the plain-text message
Ranger Clubhouse API Server — this service is an API, so there is no web UI to see here.
php artisan test --compactruns the feature test suite (uses the.env.testingconfig)../bin/test_unitruns the suite against a throwaway MariaDB Docker container.
The deployed artifact is a Docker image built from the Dockerfile. Helper scripts in bin/
wrap the common commands (they set DOCKER_BUILDKIT=1, which the Dockerfile requires).
./bin/build— build the image, taggedranger-clubhouse-api:dev../bin/run— run the image, publishing container port 80 on host port 8000. It reads.env.dockerif present, otherwise.env. Logs go to stdout; Ctrl-C stops it../bin/shell— open anashshell in the running container (docker exec).
If you change code and want it reflected in the container, rebuild (./bin/build) and
re-run (./bin/run).