This project is one of 5 AI apps I shipped on Google's Gemini free tier. I wrote up the exact architecture, cost breakdown, and what breaks first in production:
$0/Month, 5 AI Apps, All on Gemini: Here's Exactly What the Free Tier Gives You (and What Breaks First) β on Dev.to
A sleek, production-ready AI platform featuring real-time streaming chat, image analysis, video intelligence, and instant website generation β all powered by cutting-edge Gemini models.
| π¬ AI Chat Real-time streaming conversations |
πΌοΈ Image Analysis Vision-powered image understanding |
| π₯ Video Analysis Intelligent video comprehension |
π Website Generator Instant site creation from prompts |
| Feature | Description | Model |
|---|---|---|
| π¬ AI Chat | Real-time streaming conversations with context memory | gemini-2.0-flash |
| πΌοΈ Image Analysis | Upload any image for detailed AI-powered analysis | gemini-2.0-flash |
| π₯ Video Analysis | Describe videos and get intelligent AI insights | gemini-2.0-flash |
| π Website Generator | Generate stunning, complete websites from text prompts | gemini-2.5-flash |
| π§ Memory System | Save context memories for personalized AI responses | Firestore |
| π Authentication | Secure email/password and Google sign-in | Firebase Auth |
| π Admin Dashboard | Analytics, feature toggles, and credit monitoring | Custom |
+-----------------------------------------------------+
| Client (Browser) |
| React SPA - Glassmorphism Dark UI |
+-----------------------------------------------------+
|
v
+-----------------------------------------------------+
| Firebase Hosting |
| hocks.app / hocks-ai.web.app |
+-----------------------------------------------------+
|
v
+-----------------------------------------------------+
| Firebase Cloud Functions |
| |
| +--------------+ +-------------+ +---------------+ |
| | streamChat | | analyzeImg | | generateCode | |
| | (SSE) | | (Vision) | | (Website Gen) | |
| +--------------+ +-------------+ +---------------+ |
| | | | |
| v v v |
| +-----------------------------------------------+ |
| | Google Gemini API (AI Engine) | |
| +-----------------------------------------------+ |
+-----------------------------------------------------+
|
v
+-----------------------------------------------------+
| Firestore | Auth | Storage | Secret Manager |
+-----------------------------------------------------+
| Layer | Technology |
|---|---|
| Frontend | React 18 Β· Vite Β· CSS3 (Glassmorphism) |
| Backend | Firebase Cloud Functions (Node.js 20) |
| AI Engine | Google Gemini 2.0 Flash Β· Gemini 2.5 Flash |
| Auth | Firebase Authentication (Email + Google) |
| Database | Cloud Firestore |
| Storage | Firebase Storage |
| Hosting | Firebase Hosting + Custom Domain |
| Security | Firebase Security Rules Β· Secret Manager |
- Node.js 20+
- Firebase CLI (
npm install -g firebase-tools) - A Google AI Studio API key
# Clone the repository
git clone https://github.com/x-tahosin/hocks-ai.git
cd hocks-ai
# Install dependencies
cd functions && npm install && cd ..
# Login to Firebase
firebase login
firebase use hocks-ai
# Set your Gemini API key as a secret
firebase functions:secrets:set GEMINI_API_KEY
# Deploy everything
firebase deployCopy .env.example to .env and fill in your Firebase config:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idhocks-ai/
βββ dist/ # Production build (deployed to Firebase Hosting)
β βββ index.html
β βββ assets/
βββ functions/ # Firebase Cloud Functions
β βββ index.js # All API endpoints (Gemini integration)
β βββ setup-admin.js # Admin initialization script
β βββ package.json
βββ firebase.json # Firebase configuration
βββ firestore.rules # Firestore security rules
βββ .env.example # Environment variable template
βββ index.html # Root HTML entry point
- API keys stored securely via Firebase Secret Manager
- Firestore rules enforce per-user data isolation
- Authentication required for all AI features
- Admin access controlled via custom claims + email verification
- No client-side API keys β all AI calls go through Cloud Functions
| URL | Description |
|---|---|
| hocks.app | Custom domain (primary) |
| hocks-ai.web.app | Firebase default URL |
Built with β€οΈ by x-tahosin
This project is licensed under the MIT License β see the LICENSE file for details.
β Star this repo if you find it useful!