SurveySim is an open-source web application for simulating survey respondents with LLMs.
It helps teams turn raw questionnaires into structured survey schemas, define target populations, run large-scale mock response batches, and review the results through reports and exports.
SurveySim is designed for product teams, UX researchers, and operations teams who want a fast way to pressure-test questionnaires and response patterns before launching research workflows at scale.
It combines survey structuring, participant modeling, simulation runs, and reporting in one workspace instead of spreading them across scripts and ad hoc tools.
- OpenAI-compatible LLM provider configuration
- Participant template builder with rule-based audience modeling
- Raw survey import and structured extraction workflow
- Batch simulation for identity, persona, and survey response generation
- Run monitoring, retry flow, reporting, and export tools
- Full-stack TypeScript monorepo with shared schemas
Configure OpenAI-compatible providers, set defaults, and tune request limits in one place.
Define target audience dimensions, draft AI-assisted rules, and refine weighted distributions in the visual editor.
Paste raw questionnaire text, choose an extraction model, and prepare a structured survey import from a single intake screen.
Track participant generation progress, inspect execution logs, and review identity-level state while a simulation batch is running.
Review response distributions, open-text samples, matrix summaries, and export-ready analytics from a completed run.
Generate a clean printable summary page for completed runs, including top-level metrics and question-by-question result snapshots.
- Frontend: React, Vite, TypeScript, Ant Design
- Backend: Fastify, Prisma, TypeScript
- Database: SQLite by default
- Shared package: Zod schemas and DTOs
frontend/ React application
backend/ Fastify API, Prisma schema, SQLite runtime
shared/ Shared types, DTOs, and validation schemas
- Node.js 20+
- pnpm 10+
pnpm installCopy the example environment file:
cp backend/.env.example backend/.envAt minimum, set:
JWT_SECRET=replace-with-a-strong-secretpnpm db:generate
pnpm db:pushpnpm dev- Frontend:
http://localhost:5173 - Backend API:
http://localhost:3123
pnpm buildRun the backend after build:
pnpm --filter @surveysim/backend startUseful workspace commands:
pnpm dev
pnpm build
pnpm lint
pnpm test
pnpm db:generate
pnpm db:push
pnpm db:studioAdd one or more OpenAI-compatible LLM endpoints, test connectivity, and choose a default provider for downstream tasks.
Build reusable audience templates with demographic and behavioral rules, weighted distributions, and scoped overrides.
Paste raw questionnaire text or upload text files, then review structured extraction results before saving.
Create a simulation batch by selecting a participant template, a survey, and an LLM configuration.
Inspect run progress, review generated responses, compare runs, and export results as JSON, CSV, or HTML.
SurveySim can be deployed as a single backend process that also serves the built frontend assets.
- Linux server
- Node.js 20+
- pnpm 10+
- PM2 for process management
- Nginx for reverse proxy
git clone <your-repo-url> /srv/surveysim
cd /srv/surveysim
pnpm install --frozen-lockfile
cp backend/.env.example backend/.env
pnpm db:generate
pnpm db:push
pnpm build
cd backend
pm2 start dist/index.js --name surveysimserver {
listen 80;
server_name your-domain.com;
client_max_body_size 50m;
location / {
proxy_pass http://127.0.0.1:3123;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}By default, SurveySim stores runtime data in:
backend/dev.dbbackend/storage/runtime/backend/.env
If you are using SQLite in production, make sure these files are backed up.
Issues and pull requests are welcome.
If you plan to make a larger change, open an issue first so the direction can be discussed before implementation.
- Improve import robustness for more questionnaire formats
- Expand reporting and comparison capabilities
- Add more observability around long-running generation tasks
- Support alternative production database backends
This project is licensed under the GNU General Public License v3.0.
See the LICENSE file for the full text.





