File size: 4,488 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# AudioForge Setup Verification Checklist

Use this checklist to verify your AudioForge installation is correct and ready to run.

## βœ… Pre-Flight Checks

### Backend

- [ ] Python 3.11+ installed (`python --version`)
- [ ] Virtual environment created and activated
- [ ] Dependencies installed (`uv pip install -e ".[dev]"`)
- [ ] `.env` file exists (copied from `.env.example`)
- [ ] Storage directories exist (`storage/audio/{music,vocals,mixed,mastered}`)
- [ ] PostgreSQL running and accessible
- [ ] Redis running (optional but recommended)
- [ ] Database initialized (`python scripts/init_db.py`)

### Frontend

- [ ] Node.js 20+ installed (`node --version`)
- [ ] Dependencies installed (`pnpm install`)
- [ ] `.env.local` exists with `NEXT_PUBLIC_API_URL`
- [ ] No build errors (`pnpm build` succeeds)

## βœ… Runtime Checks

### Backend Health

```bash

# Should return: {"status":"healthy","version":"0.1.0"}

curl http://localhost:8000/health

```

### Backend API Docs

```bash

# Should open Swagger UI

open http://localhost:8000/api/docs

```

### Frontend

```bash

# Should open AudioForge interface

open http://localhost:3000

```

### Database Connection

```bash

# Backend should connect without errors

# Check logs for: "database_initialized_successfully"

```

## βœ… Functional Tests

### Test Generation Flow

1. [ ] Open http://localhost:3000
2. [ ] Enter prompt: "A calm acoustic guitar melody"
3. [ ] Click "Generate Music"
4. [ ] See generation status change: pending β†’ processing β†’ completed
5. [ ] Audio file generated and playable

### Test API Directly

```bash

# Create generation

curl -X POST http://localhost:8000/api/v1/generations \

  -H "Content-Type: application/json" \

  -d '{"prompt": "Test music generation"}'



# Should return generation ID and status: "pending"

```

## βœ… Code Quality Checks

### Backend

```bash

cd backend



# Type checking

mypy app



# Linting

ruff check app



# Formatting

black --check app



# Tests

pytest tests/ -v

```

### Frontend

```bash

cd frontend



# Type checking

pnpm type-check



# Linting

pnpm lint



# Tests

pnpm test

```

## βœ… Performance Checks

- [ ] Backend starts in < 5 seconds
- [ ] Frontend builds in < 30 seconds
- [ ] API responses < 100ms (excluding generation)
- [ ] No memory leaks (check with `docker stats`)

## βœ… Security Checks

- [ ] `.env` not committed to git
- [ ] `SECRET_KEY` changed from default
- [ ] CORS configured correctly
- [ ] No sensitive data in logs

## βœ… Documentation Checks

- [ ] README.md complete
- [ ] SETUP.md complete
- [ ] ARCHITECTURE.md complete
- [ ] API docs accessible
- [ ] Code comments present

## Common Issues & Solutions

### Issue: Backend won't start

**Check:**
```bash

cd backend

python scripts/verify_setup.py

```

**Common causes:**
- Missing dependencies β†’ `uv pip install -e ".[dev]"`
- Database not running β†’ `docker-compose up -d postgres`
- Port 8000 in use β†’ Change port or stop conflicting service

### Issue: Frontend won't connect to backend

**Check:**
- `.env.local` has correct `NEXT_PUBLIC_API_URL`
- Backend is running on correct port
- CORS allows frontend origin

### Issue: Generation fails

**Check:**
- Models downloading (first time takes time)
- Sufficient disk space (~2GB for models)
- GPU/CUDA if using GPU mode
- Check backend logs for errors

### Issue: Database errors

**Check:**
- PostgreSQL running: `docker-compose ps` or `pg_isready`
- DATABASE_URL correct in `.env`

- Database exists: `createdb audioforge` if needed

- Migrations applied: `alembic upgrade head`



## Verification Script



Run automated verification:



```bash

# Backend

cd backend

python scripts/verify_setup.py

# Should show all βœ… checks
```



## Production Readiness



Before deploying to production:



- [ ] All tests passing

- [ ] Environment variables configured

- [ ] Database migrations applied

- [ ] Storage configured (S3 or persistent volume)

- [ ] Monitoring set up

- [ ] Logging configured

- [ ] Security review completed

- [ ] Performance tested

- [ ] Documentation updated



## Success Criteria



βœ… All checks pass

βœ… Backend responds to health check

βœ… Frontend loads without errors

βœ… Can create a generation

βœ… Generation completes successfully

βœ… Audio file is playable



If all checks pass, you're ready to go! πŸŽ‰