PromptForge is an AI-powered application builder that turns natural-language prompts into working web applications. It uses a distributed Spring Boot architecture and isolated Kubernetes preview environments to generate, store, and run projects securely.
Prompt, generate, preview, refine, and publish—all from one workspace.
- AI-assisted React application generation
- Live project previews using isolated Kubernetes runner pods
- Project and source-file management
- JWT-based authentication and authorization
- Real-time asynchronous processing with Apache Kafka
- S3-compatible project storage using MinIO
- Dynamic preview routing through Redis
- Automatic cleanup of expired preview environments
- Containerized microservices deployed to Google Kubernetes Engine
- Automated builds and deployments with GitHub Actions
┌──────────────────────┐
│ PromptForge UI │
└──────────┬───────────┘
│
┌──────────▼───────────┐
│ API Gateway │
└──────────┬───────────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
┌─────────▼─────────┐ ┌─────────▼────────┐ ┌──────────▼────────┐
│ Account Service │ │ Workspace Service│ │ Intelligence │
│ Auth and Accounts │ │ Projects/Previews│ │ Service │
└───────────────────┘ └────────┬─────────┘ └───────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
┌───────▼───────┐ ┌───────▼─────┐ ┌─────────▼───────┐
│ PostgreSQL │ │ MinIO │ │ Kafka / Redis │
│ │ │ File Store │ │ Events/Routing │
└───────────────┘ └─────────────┘ └─────────────────┘
│
┌──────────▼───────────┐
│ Kubernetes Preview │
│ Runner Pool │
└──────────┬───────────┘
│
┌──────────▼───────────┐
│ Wildcard Proxy │
│ *.previews.domain │
└──────────────────────┘
- A user requests a preview for a project.
- The workspace service claims an idle Kubernetes runner.
- Project files are synchronized from MinIO.
- Project dependencies are installed.
- Vite starts inside the isolated runner container.
- The service waits until the preview is healthy.
- Redis maps the project hostname to the runner pod.
- The wildcard proxy forwards HTTP and WebSocket traffic.
- Expired preview pods and routes are removed automatically.
The runner pool maintains two idle pods so new previews can start without waiting for Kubernetes to provision an entirely new environment.
| Area | Technology |
|---|---|
| Backend | Java 21, Spring Boot, Spring Cloud |
| Frontend projects | React, TypeScript, Vite |
| API routing | Spring Cloud Gateway |
| Service communication | REST, OpenFeign, Kafka |
| Authentication | Spring Security, JWT |
| Database | PostgreSQL, pgvector |
| Object storage | MinIO |
| Cache and preview routing | Redis |
| Service discovery | Netflix Eureka |
| Containers | Docker, Jib |
| Orchestration | Kubernetes, Google Kubernetes Engine |
| Reverse proxy | Node.js, http-proxy |
| CI/CD | GitHub Actions, Docker Hub |
Distributed-Lovable/
├── account-service/ # Authentication, accounts, and usage
├── api-gateway/ # External API gateway
├── common-lib/ # Shared security and common components
├── config-service/ # Centralized configuration
├── discovery-service/ # Service discovery
├── intelligence-service/ # AI generation and processing
├── workspace-service/ # Projects, files, and preview lifecycle
├── k8s/
│ ├── infra/ # Namespaces, ingress, policies, runner pool
│ ├── proxy/ # Wildcard preview proxy
│ ├── services/ # Application service deployments
│ └── stateful/ # PostgreSQL, Kafka, Redis, and MinIO
└── .github/workflows/ # Build and deployment workflows
Before running or deploying PromptForge, install:
- Java 21
- Maven, or use the included Maven wrappers
- Docker
- Kubernetes CLI (
kubectl) - Google Cloud CLI for GKE deployments
- Access to PostgreSQL, Kafka, Redis, and MinIO
- Required AI provider credentials
Each service contains its own Maven wrapper.
cd common-lib
./mvnw clean install -DskipTests
cd ../workspace-service
./mvnw clean packageUse the same process for the other Spring Boot services.
Confirm that kubectl points to the intended cluster:
kubectl config current-context
kubectl get namespacesApply the infrastructure and service manifests as required:
kubectl apply -f k8s/infra/
kubectl apply -f k8s/stateful/
kubectl apply -f k8s/services/
kubectl apply -f k8s/proxy/proxy-deployment.yamlCheck the deployments:
kubectl get pods -n lovable-core
kubectl get pods -n lovable-previews -L status,project-idCheck available and active runners:
kubectl get pods -n lovable-previews -L status,project-idFollow workspace preview logs:
kubectl logs deployment/workspace-service \
-n lovable-core \
--followThe expected baseline is two idle runner pods plus one busy pod for every active preview.
Runtime configuration is supplied through Kubernetes ConfigMaps, Secrets, and Spring Cloud Config.
Never commit credentials or local environment files. Sensitive values should be stored as Kubernetes Secrets or GitHub Actions secrets.
Examples include:
- Database passwords
- JWT signing keys
- MinIO credentials
- Docker registry credentials
- Google Cloud service-account configuration
- AI provider API keys
PromptForge includes:
- JWT authentication
- Service-level authorization
- Kubernetes RBAC
- Dedicated service accounts
- Namespace isolation
- Preview network policies
- TLS-enabled ingress
- Secret-based credential management
- Resource limits for preview containers
Preview environments should be treated as untrusted workloads and restricted from accessing internal services except where explicitly required.
The preview platform is designed with several cost safeguards:
- A fixed pool of two idle runners
- CPU and memory limits
- Automatic expiry of preview pods
- Redis route expiration
- Namespace-level visibility
- Configurable preview lifetime
For production environments, configure Google Cloud budget alerts and regularly review GKE, networking, logging, and monitoring costs.
PromptForge is under active development. APIs, deployment manifests, and preview behavior may change as the platform evolves.
Contributions, issues, and suggestions are welcome.
- Fork the repository.
- Create a feature branch.
- Make and test your changes.
- Commit with a clear message.
- Open a pull request.
Built by Deepak Jaiswar.