PromptForge turns a plain-English description of your idea into a fully scaffolded, production-ready SaaS application β complete with a database schema, REST API, authentication, and a React dashboard.
- Description
- Features
- Architecture
- Project Structure
- Quick Start
- Environment Variables
- API Overview
- Roadmap
- Contributing
- License
PromptForge is an AI-powered code generation platform. You describe your application in natural language and the platform:
- Parses your intent using Claude (Anthropic) into a structured JSON schema.
- Designs the data model and feature set automatically.
- Generates a working NestJS backend with Prisma ORM, full CRUD endpoints, and JWT authentication.
- Generates a Next.js frontend with a dashboard and all the necessary pages.
- Packages everything into a Docker image ready for deployment.
- Natural language to app β describe what you want in plain English
- Structured intent parsing β Claude converts your description to a validated JSON schema
- Full-stack code generation β NestJS API + Next.js frontend scaffolded in seconds
- Prisma ORM β type-safe database access with automatic migrations
- JWT Authentication β registration, login, and protected routes out of the box
- Admin dashboard β overview of generated apps and generation history
- Docker-ready β multi-stage Dockerfiles and a Compose file included
- Retry mechanism β automatic schema repair when the LLM output is invalid
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User (Browser) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β HTTP
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β Next.js Frontend :3000 β
β (App Router Β· Tailwind CSS Β· Radix UI) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β REST / JSON
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β NestJS Backend :3001 β
β β
β ββββββββββββββββ βββββββββββββββββ ββββββββββββββββ β
β β Auth Module β β Prompt Module β β Gen Module β β
β β (JWT/bcrypt)β β (Claude SDK) β β (code writer)β β
β ββββββββββββββββ ββββββββ¬βββββββββ ββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ β
β β ai-engine (shared library) β β
β β intent-parser prompt Β· retry prompt β β
β β app-schema validator Β· TypeScript types β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ β
β β Prisma ORM β PostgreSQL :5432 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β Anthropic Claude API (external) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Data flow for a new generation request:
User Prompt
β
βΌ
Intent Parser (Claude)
β
βΌ JSON
Schema Validator
β β invalid β Retry Prompt (Claude) β Schema Validator
β β valid
βΌ
System Designer
β
βΌ
Code Generator βββΊ Generated NestJS + Next.js source
β
βΌ
Docker Packager βββΊ Container image
PromptForge/
βββ backend/ NestJS API server
β βββ prisma/ Prisma schema & migrations
β βββ src/
β βββ auth/ JWT auth module
β βββ prompt/ Prompt parsing & generation logic
β βββ generator/ Code generator module
β βββ health/ Health check endpoint
β
βββ frontend/ Next.js 14 (App Router)
β βββ src/
β βββ app/ Route segments
β βββ components/ Shared UI components
β βββ generated/ Generated app previews
β
βββ ai-engine/ Shared AI utilities (no runtime deps)
β βββ prompts/
β β βββ intent-parser.prompt.ts
β β βββ retry.prompt.ts
β βββ schemas/
β β βββ app.schema.json JSON Schema (source of truth)
β βββ validators/
β βββ types.ts TypeScript types
β βββ app-schema.validator.ts
β
βββ docker/
β βββ docker-compose.yml
β βββ backend.Dockerfile
β βββ frontend.Dockerfile
β βββ .env.example
β
βββ scripts/
β βββ setup.sh First-time setup
β βββ dev.sh Start local dev servers
β βββ docker-start.sh Start via Docker Compose
β
βββ .env.example Root environment template
βββ .gitignore
βββ README.md
| Tool | Minimum version |
|---|---|
| Node.js | 20.x |
| npm | 9.x |
| PostgreSQL | 15+ (or Docker) |
| Docker | 24+ (optional) |
1. Clone and install
git clone https://github.com/your-org/promptforge.git
cd promptforge
bash scripts/setup.shThe setup script will:
- Verify prerequisites
- Copy
.env.exampleto.env - Run
npm cifor both backend and frontend - Run
prisma generate
2. Configure secrets
Open .env and fill in:
POSTGRES_PASSWORD=your_strong_password
JWT_SECRET=$(node -e "console.log(require('crypto').randomBytes(64).toString('hex'))")
ANTHROPIC_API_KEY=sk-ant-api03-...3. Start a PostgreSQL instance
# Using Docker (easiest):
docker run -d \
--name pf_postgres \
-e POSTGRES_USER=promptforge \
-e POSTGRES_PASSWORD=your_strong_password \
-e POSTGRES_DB=promptforge_db \
-p 5432:5432 \
postgres:16-alpine4. Run database migrations
cd backend
npx prisma migrate dev5. Start both servers
bash scripts/dev.sh| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend API | http://localhost:3001 |
1. Configure Docker environment
cp docker/.env.example docker/.env
# Edit docker/.env with your secrets2. Start all services
bash scripts/docker-start.shOr with a forced rebuild:
bash scripts/docker-start.sh --buildTo also start PgAdmin at http://localhost:5050:
bash scripts/docker-start.sh --with-pgadmin3. Stop all services
docker compose --project-directory docker down| Variable | Required | Description |
|---|---|---|
POSTGRES_USER |
Yes | PostgreSQL username |
POSTGRES_PASSWORD |
Yes | PostgreSQL password |
POSTGRES_DB |
Yes | PostgreSQL database name |
DATABASE_URL |
Yes | Full Prisma connection string |
JWT_SECRET |
Yes | Secret key for signing JWTs (64+ chars) |
ANTHROPIC_API_KEY |
Yes | Your Anthropic API key |
PORT |
No | Backend server port (default: 3001) |
NODE_ENV |
No | development or production |
NEXT_PUBLIC_API_URL |
Yes | Backend base URL seen by the browser |
Same variables as above, but DATABASE_URL should point to the postgres service name:
DATABASE_URL=postgresql://promptforge:password@postgres:5432/promptforge_db?schema=public
Additional optional Docker-only variables:
| Variable | Default | Description |
|---|---|---|
PGADMIN_DEFAULT_EMAIL |
admin@promptforge.dev |
PgAdmin login email |
PGADMIN_DEFAULT_PASSWORD |
pgadmin_secret |
PgAdmin login password |
All endpoints are prefixed with /api/v1. Authentication endpoints are public; all others require a valid Bearer token.
| Method | Path | Description |
|---|---|---|
POST |
/auth/register |
Register a new user |
POST |
/auth/login |
Login and receive a JWT |
GET |
/auth/me |
Get current user profile |
| Method | Path | Description |
|---|---|---|
POST |
/prompt/parse |
Parse a natural-language prompt into AppSchema JSON |
POST |
/prompt/generate |
Generate a full application from an AppSchema |
GET |
/prompt/history |
List past generation requests |
GET |
/prompt/:id |
Get a specific generation result |
| Method | Path | Description |
|---|---|---|
GET |
/health |
Service liveness check |
Example β parse a prompt:
curl -X POST http://localhost:3001/api/v1/prompt/parse \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"prompt": "Build a task manager with users and tasks"}'Response:
{
"app_name": "TaskManager",
"entities": [
{
"name": "User",
"fields": [
{ "name": "email", "type": "string", "required": true, "unique": true },
{ "name": "password", "type": "string", "required": true }
]
},
{
"name": "Task",
"fields": [
{ "name": "title", "type": "string", "required": true },
{ "name": "completed", "type": "boolean", "required": true },
{ "name": "userId", "type": "number", "required": true }
]
}
],
"features": ["auth", "crud", "api", "dashboard"]
}- Project boilerplate β NestJS + Next.js + Prisma
- JWT authentication
- AI engine β intent parser prompts and schema validator
- Docker multi-stage builds and Compose configuration
- Prompt parsing service (NestJS module with Claude SDK)
- Backend code generator (Prisma schema + NestJS CRUD modules)
- Frontend generator (Next.js pages + Tailwind components)
- Generation history dashboard
- One-click Docker deployment of generated apps
- Webhook notifications on generation complete
- Multi-user workspace support
- CLI tool (
npx promptforge generate "...")
Contributions are welcome. Please follow this workflow:
- Fork the repository and create a feature branch:
git checkout -b feature/my-feature - Make your changes and add tests where applicable.
- Ensure the build passes:
cd backend && npm run build && npm test - Commit using Conventional Commits:
feat: add retry prompt builder - Open a Pull Request with a clear description of what and why.
Please check open issues before starting work on a major feature to avoid duplicate effort.
MIT β Copyright 2025 PromptForge Contributors