Getting Started
The Brunago API is in development. Some endpoints or data may change.
Quick Links
- Payment Integration - Complete guide for integrating Stripe payments
- Testimony Workflow - Understanding testimony states and lifecycle
- Authentication - How to authenticate API requests
API Base URL
All endpoint paths in this documentation are relative to:
https://api.brunago.sk/api/v1Allowed Origins (CORS)
Browser requests are accepted from the frontend origin configured on the backend (FRONTEND_URL), from any https://*.brunago.sk origin and — outside production — from http(s)://localhost on any port. Cloudflare Pages preview domains (*.pages.dev) are not allowed. CORS headers are only sent for /api/* paths. The rate-limit headers X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After are exposed to the browser.
Running the API Locally
Prerequisites
- Docker with Compose
- Free ports: 80 (API), 5432 (PostgreSQL), 6379 (Redis), 8108 (Typesense), 9000/9001 (RustFS S3 API/console), 3000 (Gotenberg), 8025/1025 (Mailpit UI/SMTP)
Steps
git clone git@github.com:brunagosk/brunago-backend.git
cd brunago-backend
cp .env.example .env
docker compose up -d
docker compose exec app composer setup # composer install, key:generate, migrate
docker compose exec app php artisan rustfs:setup # creates the local S3 bucketSet FRONTEND_URL in .env to your frontend origin (CORS), and APP_SANDBOX=true to enable the sandbox endpoints.
Optionally create a test client and a test expert — requires a Stripe test secret key (sk_test_…) in .env; the password of both users is secret:
docker compose exec app php artisan app:create-test-usersAccess Points
- API —
http://localhost(e.g.http://localhost/api/v1/testimonies/purposes) - Mailpit (local email inbox, see Email Testing) —
http://localhost:8025 - RustFS console (S3-compatible storage) —
http://localhost:9001, credentialsbrunago/password - Typesense —
http://localhost:8108
Services
- App — Laravel Octane on FrankenPHP;
php artisan devruns the HTTP server, the queue worker and the log tail - PostgreSQL 18 — main database (5432)
- Redis — cache and queues (6379)
- Typesense 30.1 — full-text search (8108)
- RustFS — S3-compatible storage for testimony and invoice PDFs (9000, console 9001)
- Gotenberg — PDF rendering for invoices (3000)
- Mailpit — catches all outgoing email (SMTP 1025, UI 8025)
Executing Commands
Run Artisan and Composer inside the app container:
docker compose exec app php artisan route:list
docker compose exec app composer testFollow the logs with docker compose logs -f app. If docker compose exec app … reports service "app" is not running, start it again with docker compose up -d app.