File size: 2,514 Bytes
09fa60b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# AudioForge Quick Start Guide

Get AudioForge running in 5 minutes!

## Option 1: Docker Compose (Fastest) ⚡

```bash

# Clone the repository (if not already done)

cd AudioForge



# Start everything

docker-compose up -d



# Wait for services to start (30-60 seconds)

docker-compose logs -f



# When you see "Application startup complete", open:

# Frontend: http://localhost:3000

# API Docs: http://localhost:8000/api/docs

```

That's it! 🎉

## Option 2: Manual Setup

### Step 1: Backend (2 minutes)

```bash

cd backend



# Windows PowerShell

.\scripts\setup.ps1



# Linux/macOS

chmod +x scripts/setup.sh

./scripts/setup.sh



# Or manually:

python -m venv .venv

.venv\Scripts\activate  # Windows

# source .venv/bin/activate  # Linux/macOS

pip install uv

uv pip install -e ".[dev]"

cp .env.example .env

```

**Start PostgreSQL & Redis:**
```bash

# Using Docker (easiest)

docker-compose up -d postgres redis



# Or install locally and start services

```

**Initialize Database:**
```bash

python scripts/init_db.py

```

**Start Backend:**
```bash

uvicorn app.main:app --reload

```

Backend running at http://localhost:8000 ✅

### Step 2: Frontend (1 minute)

```bash

cd frontend

pnpm install  # or: npm install

echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local

pnpm dev

```

Frontend running at http://localhost:3000 ✅

## Test It Works

1. Open http://localhost:3000
2. Enter a prompt: "An upbeat electronic dance track"
3. Click "Generate Music"
4. Wait for generation (may take 1-2 minutes first time as models download)

## Troubleshooting

**Backend won't start?**
```bash

cd backend

python scripts/verify_setup.py

```

**Database connection error?**
- Check PostgreSQL is running: `docker-compose ps`
- Verify DATABASE_URL in `.env`



**Frontend can't connect to backend?**

- Check NEXT_PUBLIC_API_URL in `.env.local`
- Ensure backend is running on port 8000

**Models downloading slowly?**
- First generation downloads MusicGen models (~2GB)
- Subsequent generations are faster
- Set `MUSICGEN_DEVICE=cpu` in `.env` if no GPU

## Next Steps

- Read [SETUP.md](SETUP.md) for detailed setup
- Read [ARCHITECTURE.md](ARCHITECTURE.md) for system design
- Read [CONTRIBUTING.md](CONTRIBUTING.md) for development

## Need Help?

- Check logs: `docker-compose logs -f` or backend console
- API docs: http://localhost:8000/api/docs
- Verify setup: `python backend/scripts/verify_setup.py`