Brainstorm is a modern, AI-powered ideation platform that gamifies the brainstorming process. By combining a "Tinder-style" card interface with advanced Large Language Model (LLM) analysis, it helps users rapidly explore, categorize, and filter creative ideas.
!NOTE This application is designed as a local-first development prototype. While it supports powerful AI integration, it currently stores sensitive data (API keys) in local storage and is intended for personal or internal use.
Brainstorm is built on the Bun runtime for high-performance development and execution.
localhost:8080 if using the default local provider.Clone the repository and install dependencies:
# Clone the repository (if not already done)
git clone <repository-url>
cd brainstorm
# Install dependencies using Bun
bun install
Brainstorm operates as a Single Page Application (SPA) served via Vite.
To start the development server with hot-module replacement (HMR):
bun run dev
The application will be accessible at http://localhost:5173.
To build the application for production deployment:
bun run build
This generates a static output in the dist/ directory, optimized for performance.
Brainstorm uses a multi-stage AI pipeline to process user input:
The core interaction model is a physics-based card stack:
src/config/index.ts.The application maintains state locally, allowing you to close and reopen the browser without losing your conceptual progress. It tracks:
The system is architected to support multiple AI backends, managed via updateable configuration:
Brainstorm uses Zod for strict runtime validation. Below are the core data structures used throughout the application.
Represents a single generated concept.
{
id: string; // UUID
title: string; // Concise headline
description: string; // Detailed explanation
categories: string[]; // Association tags
timestamp: number; // Creation epoch
}
The specific structure persisted to storage.
{
id: string;
input: {
text: string; // > 10 chars
timestamp: number;
} | null;
categories: Category[];
ideaPool: IdeaCard[]; // Cards waiting to be swiped
likedIdeas: IdeaCard[]; // Swiped Right
dismissedIdeas: IdeaCard[]; // Swiped Left
currentIndex: number;
}
Configuration object for connecting to different backends.
{
type: 'bitnet' | 'openrouter' | 'gemini' | 'ionet';
endpoint: string; // Must be a valid URL
apiKey?: string; // Optional for local models
enabled: boolean;
}
Global application settings are defined in src/config/index.ts. These control AI behavior, UI mechanics, and provider details.
| Category | Key | Default | Description |
|---|---|---|---|
| Providers | providers.bitnet.endpoint | http://localhost:8080 | URL for the local BitNet instance. |
providers.bitnet.enabled | true | Whether the BitNet provider is active by default. | |
providers.openrouter.endpoint | https://openrouter.ai/api/v1 | OpenRouter API endpoint. | |
| Swipe | swipe.threshold | 100 | Pixels a card must be dragged to trigger a swipe. |
swipe.velocityThreshold | 0.3 | Speed required to trigger a swipe on release. | |
swipe.rotationMultiplier | 0.1 | How much the card rotates while dragging. | |
| Animation | animation.swipeDuration | 350 | ms duration for the swipe exit animation. |
| Ideas | ideas.defaultPerCategory | 15 | Target number of ideas to generate per category. |
!IMPORTANT The
configobject is currently hardcoded in the source. To change provider endpoints or thresholds, you must modifysrc/config/index.tsand rebuild the application.
UserInputSchema) before processing prevents injection vectors or malformed state.localhost:5173.While Brainstorm is primarily a web application, it provides a set of CLI commands for development lifecycle management.
bun devStarts the Vite development server.
Usage Output:
$ bun dev
Vite v6.0.5 ready in 345 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
bun buildCompiles the application for production. This runs TypeScript compilation (tsc) followed by Vite's build process.
Usage Output:
$ bun build
$ tsc && vite build
vite v6.0.5 building for production...
✓ 45 modules transformed.
dist/index.html 0.45 kB │ gzip: 0.30 kB
dist/assets/index-D5z7s1h2.css 4.12 kB │ gzip: 1.32 kB
dist/assets/index-C8w9q0p1.js 22.45 kB │ gzip: 8.12 kB
✓ built in 1.45s
bun run typecheckRuns the TypeScript compiler in noEmit mode to verify type safety across the entire project without generating output files.
Usage Output:
$ bun run typecheck
$ tsc --noEmit
# (No output indicates success. Errors will list specific files and lines)
src/services/ai/bitnet-provider.ts:12:5 - error TS2322: Type 'string' is not assignable to type 'number'.