Intelligent web application for generating structured "dummy" data using Generative AI. Define data schemas and let AI create realistic, validated data.
- Frontend: Vue 3 (Composition API) + Vite, PrimeVue, Tailwind CSS, Pinia
- Backend: Node.js + Express, OpenAI API (currently the only supported provider)
- Validation: Zod, Ajv
- Package Manager: pnpm
datasynth/
├── frontend/ # Vue 3 + Vite application
├── backend/ # Node.js + Express API
├── shared/ # Shared types and utilities
└── package.json # Root workspace configuration
You do not need Apache, Laragon, or any local vhost setup for normal development.
- Node.js 18+
- pnpm 8+
pnpm installThe backend uses a project-local backend/.env file via dotenv, so you do not need a global OPENAI_API_KEY.
Copy backend/.env.example to backend/.env, then add your own OPENAI_API_KEY.
If you are on Windows, you can also use the helper script:
.\setup-env.ps1PowerShell:
Copy-Item backend/.env.example backend/.envmacOS/Linux:
cp backend/.env.example backend/.envFor day-to-day development, use the Vite and Node dev servers. Apache or Nginx is not needed for this mode.
pnpm devOpen the frontend on http://localhost:5173.
If generation fails, check that backend/.env exists and OPENAI_API_KEY is set.
Frontend only:
pnpm dev:frontendBackend only:
pnpm dev:backendLocal URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3000 - Health check:
http://localhost:3000/api/health
Notes:
- The frontend uses the Vite dev server in local development.
/apirequests are proxied to the backend automatically.- Apache or Nginx is only needed for a production-style deployment setup, not for normal local development.
pnpm buildThis produces the frontend build in frontend/dist.
This section is optional and is only useful if you want to mimic the production hosting arrangement locally.
The normal deployment shape for this app is:
- Apache or Nginx serves the static frontend from
frontend/dist - The backend runs as a separate Node process
- The web server reverse-proxies
/apito the backend
That gives you a single public origin such as http://datasynth.test/ for both the UI and API.
Build the frontend:
pnpm buildStart the backend:
pnpm --filter backend startThen point your Apache vhost at C:/laragon/www/datasynth/frontend/dist and proxy /api to http://localhost:3000/api.
Example vhost:
<VirtualHost *:80>
ServerName datasynth.test
DocumentRoot "C:/laragon/www/datasynth/frontend/dist"
<Directory "C:/laragon/www/datasynth/frontend/dist">
AllowOverride All
Require all granted
FallbackResource /index.html
</Directory>
ProxyPreserveHost On
ProxyPass /api http://localhost:3000/api
ProxyPassReverse /api http://localhost:3000/api
</VirtualHost>Make sure the Apache proxy modules are enabled if they are not already:
proxy_moduleproxy_http_module
After restarting Apache, open http://datasynth.test/.
OPENAI_API_KEY- Required for data generation. The backend can still start without it.OPENAI_ORG_ID- Optional: Organization IDPORT- Server port (default: 3000)NODE_ENV- Environment (development | production)FRONTEND_URL- Optional: Allowed frontend origin when not using same-origin proxyingRATE_LIMIT_MAX_REQUESTS- Requests allowed per rate-limit window (default: 100)RATE_LIMIT_WINDOW_MS- Rate-limit window in milliseconds (default: 60000)MAX_ITEMS_PER_CHUNK- Max items per chunk (default: 50)MAX_CONCURRENT_CHUNKS- Parallel chunk limit (default: 5)CHUNK_TIMEOUT_MS- Timeout per chunk in milliseconds (default: 30000)MAX_COST_PER_REQUEST- Reserved for future cost controls; currently not enforcedENABLE_COST_TRACKING- Reserved for future cost tracking; currently not enforced
VITE_API_BASE_URL- Optional override for the API base URL (default:/api)
This is a monorepo using pnpm workspaces. Each package (frontend, backend, shared) is independent but can share dependencies.
The internal schema model includes groundwork for nested object and array fields, but nested schema editing is not currently exposed in the UI.
The backend automatically selects the most cost-effective OpenAI model based on your schema content, with automatic fallback chains for reliability.
Model selection is determined by analyzing field prompts:
| Tier | Triggered By | Model Chain |
|---|---|---|
| premium | Creative keywords (biography, story, narrative, paragraph >1) | gpt-5.2 → gpt-4o |
| standard | HTML content or string fields | gpt-5-nano → gpt-5-mini → gpt-4o-mini → gpt-4o |
| saver | Everything else (numbers, booleans) | Same as standard |
If the preferred model is unavailable or fails, the system automatically tries the next model in the chain. Only models supporting structured outputs (json_schema) are included.
- Selection logic:
backend/src/config/openai.js-selectModel() - Fallback handling:
backend/src/config/openai.js-generateWithFallback() - System prompt building:
backend/src/services/promptBuilder.js
MIT