Skip to content

tahosinx/hocks-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 HOCKS AI

Next-Generation AI Platform β€” Powered by Google Gemini

Live Demo Firebase Gemini License

πŸ“– Deep Dive

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.


🎬 Preview

πŸ’¬ AI Chat
Real-time streaming conversations
πŸ–ΌοΈ Image Analysis
Vision-powered image understanding
πŸŽ₯ Video Analysis
Intelligent video comprehension
🌐 Website Generator
Instant site creation from prompts

✨ Features

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

πŸ—οΈ Architecture

+-----------------------------------------------------+
|                  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  |
+-----------------------------------------------------+

πŸš€ Tech Stack

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

⚑ Quick Start

Prerequisites

Setup

# 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 deploy

Environment Variables

Copy .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_id

πŸ“ Project Structure

hocks-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

πŸ”’ Security

  • 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

🌐 Live Deployment

URL Description
hocks.app Custom domain (primary)
hocks-ai.web.app Firebase default URL

πŸ‘¨β€πŸ’» Author

Built with ❀️ by x-tahosin

GitHub


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


⭐ Star this repo if you find it useful!

About

HOCKS AI - Premium 4D Cinematic AI Platform | Multi-modal AI assistant with chat, image analysis, video analysis, and website generation

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors