Multi‑modal AI playground (text, image generation & editing, video, music, TTS) – currently a frontend prototype migrated from Google AI Studio. Backend services (auth, queue, persistence, Drive integration) are NOT yet implemented; see docs/PRD.md for target architecture.
- Vite + React 19
- TypeScript
- Google Generative AI SDK (
@google/genai) - Tailwind CDN (runtime injected)
- pnpm (package manager)
├─ index.html
├─ pnpm-lock.yaml
├─ package.json
├─ tsconfig.json
├─ vite.config.ts
├─ .env.local # Place GEMINI_API_KEY here (not committed)
└─ src/
├─ main.tsx # App entry
├─ App.tsx
├─ types.ts # Domain & model enums
├─ constants.tsx # Model metadata, quotas, costs
├─ services/
│ └─ geminiService.ts # Parsing, enhancement, execution logic (to be modularized)
├─ context/ # App / Permission / Toast providers
├─ components/
│ ├─ chat/ # Per‑modality prompt inputs
│ ├─ workspace/ # Generation controls & output display
│ ├─ settings/ # Settings & analytics UI
│ └─ shared/ # Reusable UI (selectors, toasts, enhancer)
├─ hooks/
└─ ...
Authoritative product & execution docs:
docs/PRD.md– Product requirements (versioned, includes implementation status matrix)docs/ROADMAP.md– Delivery phases & execution plandocs/frontend-polish.md– Archived historical polish snapshot
Always update those files (not this README) for feature scope changes.
Imports may use the alias @ which resolves to src/ (e.g. import { MODEL_DETAILS } from '@/constants';).
- Node.js (LTS recommended)
- pnpm installed globally:
npm i -g pnpmpnpm installCreate a .env.local file at the project root and add your GEMINI_API_KEY to it. See .env.example for a template.
The value is injected at build time into process.env.API_KEY / process.env.GEMINI_API_KEY via vite.config.ts.
pnpm dev
```,
Open <http://localhost:3000>
### 4. Build for Production
```bash
pnpm build
pnpm preview| Concern | Module | Notes |
|---|---|---|
| Prompt Parsing | src/services/geminiService.ts |
Runs client-side (to be migrated server-side) |
| Prompt Enhancement | geminiService.enhancePrompt / components/shared/PromptEnhancer.tsx |
Client-side call (will move server-side) |
| Job Execution | processJob |
Client-simulated generation; will become queued worker flow |
| UI Modality Inputs | components/chat/*Prompt.tsx |
Each model family has tailored UX |
| Generation Controls | components/workspace/*GeneratorControls.tsx |
Parameters: temperature, aspect ratio, styles, etc. |
| Analytics & Quotas | Local simulation only | Real generation counters & quota dashboard planned R1 (backend) |
Prototype intentionally violates several target security controls:
- API key embedded in client bundle (to be removed in R1 backend)
- No OAuth / Google Drive integration yet
- User API keys (if any) stored in
localStorageunencrypted (placeholder UI only) - No persistent job queue; jobs processed sequentially in-browser
- Generation quotas shown are simulated; real counters & enforcement arrive with backend
Do NOT deploy this version publicly. Use only for internal design & UI iteration.
| Script | Purpose |
|---|---|
pnpm dev |
Start Vite dev server |
pnpm build |
Production build |
pnpm preview |
Preview dist build |
| Issue | Fix |
|---|---|
| 404 on startup | Ensure entry script points to /src/main.tsx in index.html |
| Env not read | Confirm .env.local exists & restart dev server |
| Import path errors | Verify alias in tsconfig.json & vite.config.ts matches @ -> src |
The forthcoming backend will be implemented fully (no long-lived mocks) with:
- Firestore persistence (projects, jobs, generation counters)
- Pub/Sub + worker for async generation
- Structured Cloud Logging lifecycle events (see PRD §3.14)
- Optional containerization (Docker not required for local dev)
When updating feature scope or release planning, modify the PRD / Roadmap rather than expanding this README.
Internal / TBD
Maintained by the Jami team.