An AI focus group in under a minute. Describe a CV, a startup pitch or product copy, pick who is in the panel (investors, hiring managers, customers...) and see how a group of simulated people reacts: a consensus score, majority and minority views, recurring patterns, surprises and a concrete next step.
Personas are generated by a language model, so treat the output as a rehearsal for the real conversation, not as market research.
The /sim page has a precomputed example that loads instantly and calls no model, so you can see what a result looks like before configuring anything.
git clone https://github.com/GerardoLucero/crowdmind
cd crowdmind
npm install
cp .env.example .env.local # add GROQ_API_KEY and/or NVIDIA_NIM_API_KEY (both have free tiers)
npm run dev # http://localhost:3000/sim
npm test| Variable | Required | Purpose |
|---|---|---|
GROQ_API_KEY |
one of the two | Primary provider (console.groq.com, free tier) |
NVIDIA_NIM_API_KEY |
one of the two | Fallback provider (build.nvidia.com, free credits) |
GROQ_MODEL / NVIDIA_MODEL |
no | Emergency model override |
MODEL_CONFIG_URL |
no | URL of models.json, or off to use only the bundled copy |
Deploy on Vercel with the same two variables. There is no database: the server is stateless and the history of recent runs lives in the browser.
flowchart LR
U[Browser] -->|scenario, panel, size| A[POST /api/sim]
A -->|validate, rate limit| E[Simulation engine]
E -->|1 call| P1[Generate N personas]
E -->|N calls, 4 at a time| P2[Each persona reacts + sentiment]
E -->|1 call| P3[Synthesis]
P1 & P2 & P3 --> M{Provider cascade}
M -->|first| G[Groq]
M -->|fallback| N[NVIDIA NIM]
C[models.json on main] -.->|ordered model list| M
A -->|server-sent events| U
- Panel. One call generates N distinct personas for the chosen profile.
- Reactions. One call per persona returns the reaction, its sentiment and key points. They run four at a time to stay inside free-tier token limits, and each result streams to the page as it arrives.
- Synthesis. Sentiment numbers are computed in code (a mixed reaction counts as half a positive); one more call writes the consensus, dissent, patterns, surprises and recommendation.
- Stateless. Nothing is stored server side, so it deploys on Vercel's free tier and there is nothing to leak.
- Free providers with a cascade. Groq first, NVIDIA NIM as fallback; if a model is retired (HTTP 404/410) the next one in
models.jsonis tried. Editmodels.jsononmainto change models without a deploy. - Untrusted text is fenced. The scenario goes inside tags, look-alike tags are stripped, and model output is validated with zod. Provider errors never reach the client.
- Honest failure. If every persona fails the user gets a clear message; if only the synthesis fails the page says so and still shows the reactions.
- Bounded cost. Scenario capped at 4,000 characters, 3 to 12 personas, 6 runs per 30 minutes per IP (best effort, per instance).
The same engine is available to scripts and agents. Pass "stream": false to get one JSON document instead of an event stream.
curl -X POST http://localhost:3000/api/sim \
-H "Content-Type: application/json" \
-d '{"scenario":"Senior backend engineer, 9 years in payments...","n":8,"profileType":"hiring-managers","stream":false}'Profiles: hiring-managers, tech-leads, ctors, recruiters, peers, investors, customers, or a custom profileConfig with role, experience, industry and bias. GET /api/health reports whether a provider is configured, without calling any model.
- Unit tests (Vitest) for the engine, provider cascade, sanitizing and model config; type check and production build on every PR.
- A scheduled workflow probes every model in
models.jsondaily and sends a push notification if one stops answering. - Dependabot for npm and GitHub Actions;
npm auditclean. See SECURITY.md.
Open source, maintained in my spare time. If it was useful and you want to say thanks:
MIT, see LICENSE.