This is a professional-grade, uncensored AI Image & Video generation studio built for power users. The application is called "Venice.ai Image Studio Pro" and is built with React 19, TypeScript, and Vite. It features multi-model support (Google Gemini and Venice.ai), local persistence with encryption, and a privacy-first architecture.
- Multi-Model Support: Seamlessly switch between Google Gemini (Flash/Pro) and Venice.ai models
- Image & Video Generation: Generate high-quality images and videos (via Veo)
- Local Privacy: History and settings stored locally with encryption
- Advanced Controls: Seed control, aspect ratios, negative prompts, and upscaling
- Secure Architecture: Client-side API key management
- Frontend: React 19, TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS (via CDN/Utility)
- Icons: Lucide React
- Testing: Vitest
- Linting: ESLint (Flat Config) + Prettier
- Dependencies: @google/genai, firebase, lucide-react, react, react-dom
.
├── .github/ # GitHub configuration
├── src/ # Source code
│ ├── assets/ # Static assets
│ ├── components/ # React UI components
│ ├── constants/ # Application constants
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API clients and storage helpers
│ ├── test/ # Test files
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── workers/ # Web Workers
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
├── .env.example # Environment variable example
├── index.html # HTML entry point
├── package.json # Project dependencies and scripts
├── vite.config.ts # Vite build configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.js # ESLint configuration
└── README.md # Project documentation
AuthScreen.tsx: Authentication screen with encrypted user dataImageGenScreen.tsx: Main image generation interfaceChatScreen.tsx: AI chat functionalityGallery.tsx: Image gallery with local storageSettingsScreen.tsx: Application settingsImageViewer.tsx: Modal for viewing generated contentControlPanel.tsx: Generation controls and parameters
veniceService.ts: Venice.ai API integrationgeminiService.ts: Google Gemini API integrationsecureStorage.ts: Encrypted local storage using IndexedDBcrypto.ts: Cryptographic utilities
npm install
cp .env.example .env.local
# Edit .env.local with your API keys
npm run devnpm run dev: Start the Vite dev server for local developmentnpm run build: Create a production build indist/npm run preview: Serve the production build locally for smoke checksnpm run lint: Run strict ESLint checksnpm run format: Auto-format with Prettiernpm run format:check: Verify formatting in CInpm run test: Run unit tests with Vitestnpm run preflight: Run typecheck, lint, test, and build checks
GEMINI_API_KEY: Google Gemini API keyVENICE_API_KEY: Venice.ai API key
- Use TypeScript with React functional components and hooks
- Strict typing is encouraged; avoid
anywhere possible - Use Tailwind CSS classes for styling
- Indentation follows 2 spaces
- File naming: PascalCase.tsx for components, camelCase.ts for helpers
- Formatting is enforced by Prettier; linting by ESLint
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- API keys are managed client-side and stored in environment variables
- User data is encrypted and stored locally using IndexedDB
- Strong password requirements recommended for encryption
- No server-side storage of user data
- Uses React hooks (useState, useEffect) for state management
- User data is stored in the main App component and passed down via props
- As the app grows, consider moving to Zustand or Jotai for better state management
- Implements IndexedDB for blob storage to resolve localStorage 5MB quota limits
- PBKDF2 key derivation is offloaded to Web Workers to prevent UI blocking
- Includes graceful quota error handling and automatic blob cleanup
- Supports both Google Gemini and Venice.ai APIs
- Handles both image and video generation (Veo for video)
- Includes error handling for API key issues and permission errors
- Unit tests use Vitest
- Follow existing patterns in the
src/test/directory - Keep test files near the code they validate (e.g.,
components/ComponentName.test.tsx) - Add end-to-end tests (Playwright/Cypress) to verify full user flows including storage persistence
- [DONE] UI flicker when gallery images load from IndexedDB - fixed with lazy loading
- [DONE] Password strength enforcement - implemented using zxcvbn
- [DONE] Optimistic updates - implemented for better UX
- [DONE] Service worker for PWA functionality - implemented
- [DONE] Gallery pagination for large collections - implemented
- [DONE] Data migration for old user formats - implemented
- [DONE] All
anytype warnings - replaced with proper TypeScript types - [DONE] React hooks dependency warnings - fixed with proper dependencies
- Consider state management solutions like Zustand or Jotai as the app grows
- Code splitting to reduce bundle size (~1.3MB)
- Full TypeScript strict mode compliance