Production-ready database schema generation from plain-English app descriptions.
You describe the product. SchemaCraft returns a normalized schema (tables, columns, relationships, indexes) and export formats—so you can spend less time debating foreign keys and more time shipping.
- Schema generation: tables, columns, constraints, relationships, indexes
- Export formats: PostgreSQL, MySQL, Prisma, Drizzle
- Strict JSON output: predictable and easy to consume
- Deployable stack: FastAPI backend + Next.js frontend
Backend
- Python + FastAPI
- LLM provider via env vars: Groq or OpenAI
Frontend
- Next.js + React + TypeScript
- Tailwind CSS
- shadcn-style component structure (
src/components/ui)
.
├─ backend/
│ ├─ app/
│ │ ├─ main.py
│ │ ├─ config.py
│ │ ├─ routes/
│ │ └─ services/
│ └─ requirements.txt
└─ frontend/
├─ src/
├─ package.json
└─ next.config.ts
cd backend
python -m venv .venv
# Windows
.\.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000Helpful URLs:
- Health:
http://127.0.0.1:8000/api/health - Docs:
http://127.0.0.1:8000/docs
cd frontend
npm install
npm run devPick one provider (yes, one):
Groq
LLM_PROVIDER=groqGROQ_API_KEY=...
OpenAI
LLM_PROVIDER=openaiOPENAI_API_KEY=...
CORS (recommended JSON list):
CORS_ORIGINS=["http://localhost:3000"]
NEXT_PUBLIC_API_URL=http://127.0.0.1:8000(local)NEXT_PUBLIC_API_URL=https://<your-backend-service>.onrender.com(production)
SchemaCraft deploys cleanly on Render as two Web Services.
- Root Directory:
backend - Build Command:
pip install -r requirements.txt
- Start Command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Environment Variables:
LLM_PROVIDERand the matching API keyCORS_ORIGINS(see below)
- Root Directory:
frontend - Build Command:
npm ci && npm run build - Start Command:
npm run start
- Environment Variables:
NEXT_PUBLIC_API_URL=https://<your-backend-service>.onrender.com
Frontend URL:
https://schemacraf-31.onrender.com
Set this on the backend Render service:
CORS_ORIGINS=["https://schemacraf-31.onrender.com"]Note (because browsers are pedantic): Origins don’t include trailing slashes.
- Backend is missing the frontend origin in
CORS_ORIGINS - Use JSON list format:
CORS_ORIGINS=["https://schemacraf-31.onrender.com"]
NEXT_PUBLIC_API_URLis missing/wrong- Backend is down/sleeping (Render free tier likes naps)
- You didn’t set
GROQ_API_KEYorOPENAI_API_KEY - Or
LLM_PROVIDERdoesn’t match the key you set