# Project Setup

After this guide you'll understand what `init.py` configured, where configuration lives, and how to onboard a teammate.

## What `init.py` does

You run `init.py` once during [Quick Start](https://docs.fastsvelte.dev/index.md). It:

- prompts for your app name, mode (`b2c` / `b2b`), and database;
- generates the `.env` files across `backend/`, `frontend/`, `landing/`, and `backend/db/`;
- starts Docker PostgreSQL and runs migrations (with seed data);
- installs backend (`uv`) and frontend/landing (`npm`) dependencies;
- generates the type-safe API client (see [Type-Safe API Client](https://docs.fastsvelte.dev/guides/orval/index.md)).

Pass `--dry-run` to preview without making changes. In development the email provider defaults to `stub`, so nothing is sent — verification and invitation links appear as `[STUB EMAIL]` blocks in the backend logs (see [Transactional Email](https://docs.fastsvelte.dev/features/email/index.md)). Once setup works, you can safely delete `init.py`; it's only needed once.

## Onboarding teammates

**Only the first developer runs `init.py`.** Everyone else starts from your committed, pre-configured repository.

1. **Push to your own repository:**

   ```bash
   git remote add origin git@github.com:your-org/your-project.git
   git push -u origin main
   ```

1. **Teammates clone and configure:**

   - Clone your repository (not the FastSvelte template).
   - Install the [prerequisites](https://docs.fastsvelte.dev/index.md) (uv, Node.js 22+, Docker).
   - Create `.env` files by copying each `.env.example` (`backend/`, `frontend/`, `landing/`, `backend/db/`).
   - Start the database: `docker compose -f backend/docker-compose.yml up db -d`
   - Run migrations: `cd backend/db && ./sqitch.sh dev deploy`
   - Install deps: `uv sync` in `backend/`, `npm install` in `frontend/` and `landing/`
   - Create a local admin: `cd backend && uv run scripts/create_admin.py`

Never commit `.env` files

They contain secrets and are gitignored. Share values through a secure channel (1Password, Doppler, a shared secrets manager).

See [Configuration](https://docs.fastsvelte.dev/reference/configuration/index.md) for the full variable reference.
