| src | ||
| .env.example | ||
| .gitignore | ||
| index.html | ||
| index.tsx | ||
| metadata.json | ||
| package.json | ||
| pnpm-workspace.yaml | ||
| postcss.config.cjs | ||
| README.md | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
| types.ts | ||
| vite.config.ts | ||
Run locally
Prerequisites: Node.js (16+ recommended)
-
Install dependencies:
npm install
-
Copy the example env and (optionally) add your Gemini API key:
cp .env.example .env
If you set
GEMINI_API_KEY, the project can be wired to a real image generation backend. For local development, if the key is empty the app will show a placeholder generated image so the UI remains usable. -
Start the dev server:
npm run dev
Run as an Electron app (local desktop)
-
Install dev dependencies (if not already done):
npm install
-
Start the app in Electron (dev):
npm run electron:dev
This runs Vite and then launches Electron pointed at the dev server. The renderer will use a preload bridge to ask the main process to perform avatar generation — you can extend the main process to call the @google/genai SDK safely.
Tailwind CSS and production
-
The app previously used the Tailwind CDN for convenience. For production we now build Tailwind locally using PostCSS (the project contains
tailwind.config.cjsandpostcss.config.cjs). -
To build for production (or package with Electron), run:
npm run build
-
If you need to customize Tailwind, edit
tailwind.config.cjsand your global styles insrc/styles.css.
Electron security note (CSP)
During development Electron warns about a permissive Content-Security-Policy (CSP). This is expected for dev, but before shipping an Electron app you must set a strict CSP and avoid unsafe-eval and unsafe-inline where possible. See: https://electronjs.org/docs/tutorial/security
Refactor notes
The repository was reorganized so renderer and electron-specific code live under src/:
src/renderer— React application and browser-only services/componentssrc/electron— main process, preload, and GenAI wrappersrc/shared— types and small shared artifacts
Vite alias @ now points to src/ so you can import shared files as @/shared/types.
Compatibility: root-level electron entry files were kept as small wrappers that forward to the src/electron files so existing scripts should still work.
If you want further adjustments (different folders or moving more files), tell me and I will apply them.