> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learnway.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Local Development Setup

> Step-by-step instructions for running the development environment, seeding demo data, and testing features locally.

# Local Development Setup

Follow this walkthrough to spin up a fully isolated local development stack.

***

## 1. Setup Services via Docker

```bash theme={null}
# Start PostgreSQL & Redis
docker run -d --name learnway-postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=learnway postgres:15
docker run -d --name learnway-redis -p 6379:6379 redis:7
```

***

## 2. Install & Run Migrations

```bash theme={null}
npm install
npm run migration:run:dev
```

***

## 3. Seed Complete Test Account & Admin

```bash theme={null}
# Seed default admin (admin@learnway.xyz / Admin123!)
npm run seed:admin:dev

# Setup complete test user with enrolled courses, streak, and XP
npm run setup-user:dev
```

***

## 4. Run the Dev Server

```bash theme={null}
npm run start:dev
```

Open `http://localhost:3000/api/v2/docs` to test endpoints via Swagger!
