File size: 861 Bytes
b1c6f23
 
 
 
 
 
 
 
 
c2037a2
17847d4
c2037a2
 
 
 
62b327e
c2037a2
62b327e
17847d4
 
62b327e
c2037a2
 
 
62b327e
c2037a2
62b327e
c2037a2
 
 
 
 
 
62b327e
17847d4
c2037a2
17847d4
c2037a2
 
 
17847d4
62b327e
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
---
title: AutoForm Backend
emoji: 📝
colorFrom: purple
colorTo: indigo
sdk: docker
pinned: false
---

# AutoForm Backend

FastAPI backend for AutoForm - AI-powered form builder.

## Local Development

```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
```

## Environment Variables

Create a `.env` file in the `backend/` directory:

```env
DEFAULT_MODEL=openai/gpt-4o-mini
OPENAI_API_KEY=your_key_here
DATABASE_URL=sqlite:///./app.db
JWT_SECRET=your-secret-key
FRONTEND_URL=http://localhost:5173
SESSION_SECRET=your-session-secret
```

## API Documentation

Once running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc

## DeploymentSee `DEPLOY_HF.md` for instructions on deploying to Hugging Face Spaces.