An enterprise-grade, full-stack AI photo enhancement web application orchestrating LLaMA-3, BLIP, and ESRGAN models.
Key Features • Tech Stack • Installation • Evaluation Framework
Lumina Web is a production-ready application that allows users to seamlessly upload, automatically categorize, and geometrically enhance their photographs using state-of-the-art AI. The system dynamically routes images through a network of Replicate models to upscale, denoise, color grade, or fix low-light photography.
The application utilizes a sleek, responsive, glass-morphic Tailwind CSS frontend heavily inspired by modern macOS design paradigms.
- 🔐 Secure OAuth Authentication: Google OAuth via Passport.js & PostgreSQL.
- ✨ AI Suite:
Real-ESRGAN(Upscaling),CodeFormer(Restoration), andNight-Enhancement. - 🧠 Smart Albums: Salesforce BLIP & Meta LLaMA-3 intelligently auto-tag and group images.
- 💳 Subscription Gateway: Interactive pricing modal mapped to user limits.
- ☁️ Permanent Cloud Storage: Images proxied securely to Cloudinary with automatic watermarking.
- 📊 Admin Dashboard: Secure
/admin.htmltracking real-time KPIs and system telemetry.
- Frontend: Vanilla HTML5, JavaScript (ES6+), Tailwind CSS, PostCSS
- Backend: Node.js, Express.js (REST API)
- Database: PostgreSQL (via
pgpool),connect-pg-simple(Session Store) - Authentication: Passport.js (Google Strategy)
- Cloud Storage: Cloudinary API
- AI Provider: Replicate API
- Data Science (IQA): Python 3, OpenCV, pandas, scikit-image, ReportLab
To clone and run this application locally, you'll need Git and Node.js (which comes with npm) installed on your computer.
git clone https://github.com/yourusername/Lumina.git
cd Luminanpm installEnsure you have a local or cloud instance of PostgreSQL running. Create a new database named lumina.
Run the automated setup scripts to inject the secure UUID-based schema:
node db/setup.js
node db/migrate_eval.jsCreate a .env file in the root directory and populate it with your confidential API Keys:
# Server
PORT=3000
SESSION_SECRET=your_super_secret_string
# PostgreSQL Database
DATABASE_URL=postgresql://postgres:YOUR_PASSWORD@localhost:5432/lumina
# OAuth Integration
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
OAUTH_CALLBACK_URL=http://localhost:3000/auth/google/callback
# APIs
REPLICATE_API_TOKEN=your_replicate_token
CLOUDINARY_URL=cloudinary://YOUR_KEY:YOUR_SECRET@YOUR_CLOUD_NAME# Starts the server via nodemon on localhost:3000
npm startLumina features a robust telemetry and Image Quality Assessment (IQA) backend.
The backend inherently measures the latency (processing_time_ms) of every Replicate API call. Additionally, users can leave subjective feedback via a Thumbs Up/Down widget on the Frontend slider.
You can mathematically score the AI generations against geometric and spatial distortion properties. Ensure you have installed the Python dependencies:
pip install -r scripts/requirements.txtRun the Evaluator:
python scripts/eval_quality.pyCompile PDF Report:
python scripts/generate_report.pyNote: For security reasons, the
/admin.htmldashboard natively redirects users away unless their PostgreSQLusersrow has theis_adminboolean precisely set to TRUE.