Quick Start

Get the backend running locally in 5 minutes

Quick Start

Get the backend running locally in 5 minutes.

1. Clone and Configure

git clone <your-repo-url> my-backend
cd my-backend

Create your local environment file:

cp .env .env.local

Edit .env.local and set at minimum:

APP_SECRET=<generate-a-random-string>
JWT_PASSPHRASE=<generate-a-random-passphrase>
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
FIREBASE_PROJECT_ID=your-firebase-project-id

The .env file contains safe defaults and documentation for all variables. .env.local is gitignored and holds your actual secrets.

2. Start Docker

docker compose up -d

This starts 4 services:

ServiceURL / Port
PHP apphttp://localhost
PostgreSQLlocalhost:5432
Redislocalhost:6379
Mailpithttp://localhost:8025

3. Install Dependencies and Setup

# Enter the PHP container
docker compose exec php bash

# Install PHP dependencies
composer install

# Generate JWT signing keys
bin/console lexik:jwt:generate-keypair

# Run database migrations
bin/console doctrine:migrations:migrate --no-interaction

# Sync Stripe plans (creates products/prices in your Stripe account)
bin/console app:stripe:sync-plans

4. Verify

Test that the API is working:

curl http://localhost/api/v1/plans

You should get a JSON response with your Stripe plans.

Visit the API documentation at: http://localhost/api/doc

Next Steps