Premium luxury asset tracking platform with AI-powered blog, deal scoring, and natural language search.
- 🤖 AI Blog Platform - GPT-4 powered content generation with full SEO optimization
- 📊 Deal Scoring System - Automated 5-factor algorithm to find the best deals
- 🔍 Natural Language Search - Search using plain English: "rolex submariner under 10k"
- ⚡ Performance Optimized - Response caching, lazy loading, <200ms API responses
- 🔒 Secure - Row-level security, input validation, rate limiting
- 📈 Monitoring - Built-in performance tracking and error monitoring
./scripts/setup.shThis interactive wizard will:
- Install dependencies
- Configure API credentials
- Set up database with Supabase CLI
- Generate 20 SEO blog posts
- Run tests
- Start development servers
Setup time: ~20 minutes
# Backend
npm install
# Frontend
cd the-hub
npm install
cd ..Easy way:
./scripts/setupCredentials.shManual way:
Create .env:
NODE_ENV=development
PORT=3000
OPENAI_API_KEY=sk-your-key-here
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-keyCreate the-hub/.env:
VITE_API_URL=http://localhost:3000
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key📖 Detailed guide: CREDENTIALS_SETUP.md
With Supabase CLI:
# Install CLI
brew install supabase/tap/supabase # macOS
npm install -g supabase # Linux/WSL
# Link project
supabase link --project-ref your-project-id
# Apply schema
./scripts/setupDatabase.shWithout CLI:
- Go to Supabase Dashboard → SQL Editor
- Copy contents of
database/blog_schema.sql - Paste and run
node scripts/generateBlogPosts.jsGenerates 20 blog posts (~10 minutes, ~$2 OpenAI cost)
# Terminal 1 - Backend
npm run dev
# Terminal 2 - Frontend
cd the-hub
npm run devVisit:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- Blog: http://localhost:5173/blog
- Admin: http://localhost:5173/admin
the-hub/
├── src/ # Backend
│ ├── api/ # Express API routes
│ │ ├── server.js # Main server
│ │ ├── blog.js # Blog endpoints
│ │ ├── blogSSR.js # Server-side rendering
│ │ ├── naturalSearch.js # AI search
│ │ └── sitemap.js # SEO sitemap
│ ├── services/
│ │ ├── openai/ # AI services
│ │ │ ├── blogGenerator.js # Blog content generation
│ │ │ └── queryParser.js # NL search parser
│ │ ├── ai/
│ │ │ └── dealScorer.js # Deal scoring algorithm
│ │ ├── performanceMonitor.js
│ │ └── imageOptimization.js
│ ├── db/
│ │ ├── supabase.js # Database client
│ │ └── blogQueries.js # Blog queries
│ ├── middleware/
│ │ ├── caching.js # Response cache
│ │ └── crawlerDetection.js # SEO crawler detection
│ └── schedulers/
│ └── dealScoringScheduler.js
│
├── the-hub/ # Frontend (React + TypeScript)
│ ├── src/
│ │ ├── pages/
│ │ │ ├── Blog.tsx # Blog index
│ │ │ ├── BlogPost.tsx # Post detail
│ │ │ ├── BlogEditor.tsx # Rich editor
│ │ │ └── AdminSettings.tsx
│ │ ├── components/
│ │ │ ├── blog/ # Blog components
│ │ │ ├── admin/ # Admin dashboards
│ │ │ ├── listings/ # AI search
│ │ │ └── common/ # Shared components
│ │ └── services/
│ │ └── blog.ts # API client
│ └── dist/ # Build output
│
├── database/
│ └── blog_schema.sql # Database schema
│
├── scripts/
│ ├── setup.sh # Master setup wizard
│ ├── setupCredentials.sh # Credential config
│ ├── setupDatabase.sh # Database setup
│ ├── generateBlogPosts.js # Content generation
│ ├── securityAudit.js # Security scan
│ └── performanceBenchmark.js # Performance test
│
├── tests/
│ ├── api/ # Backend tests
│ └── frontend/ # React component tests
│
└── docs/ # Documentation
├── CREDENTIALS_SETUP.md
├── QUICK_START.md
├── TESTING_GUIDE.md
└── FINAL_DEPLOYMENT_GUIDE.md
# Run all tests
npm test
# Backend only
npm run test:api
# Frontend only
cd the-hub && npm run test
# Security audit
node scripts/securityAudit.js
# Performance benchmark
node scripts/performanceBenchmark.js
# With coverage
npm run test:coverage📖 Full guide: TESTING_GUIDE.md
./scripts/deploy.sh production- Frontend: Vercel (free tier)
- Backend: Railway ($5/month)
- Database: Supabase (free tier)
- Total cost: ~$20-50/month
📖 Step-by-step guide: FINAL_DEPLOYMENT_GUIDE.md
| Service | Tier | Monthly Cost |
|---|---|---|
| Supabase | Free | $0 |
| Railway (Backend) | Hobby | $5 |
| Vercel (Frontend) | Free | $0 |
| OpenAI API | Usage-based | $13-42 |
| Total | $18-47/month |
OpenAI Breakdown:
- Blog generation (50 posts): $5
- Natural language search (1000 queries): $5
- Deal scoring with AI (1000 items): $10
- Monthly variation: $13-42
- Quick Start - 5-minute setup guide
- Credentials Setup - Complete API configuration
- Testing Guide - Testing procedures
- Performance Optimization - Speed optimization
- Implementation Summary - Architecture overview
- Deployment Checklist - Pre-launch checklist
- Final Deployment Guide - Production deployment
- Security Audit - Security best practices
- AI Features - AI capabilities documentation
Content Generation:
- GPT-4 powered blog posts
- Context-rich prompts with market data
- Structured output (title, content, SEO metadata)
- Bulk generation (20 posts in 15 minutes)
SEO Optimization:
- Server-side rendering for crawlers
- Schema.org Article markup
- Open Graph + Twitter Cards
- Dynamic sitemap.xml
- RSS feed (XML + JSON)
Rich Editor:
- Live Markdown preview
- AI content generation
- Image upload
- Draft/publish workflow
Algorithm:
- 5-factor weighted scoring (0-100)
- Price vs Market (40%)
- Condition (20%)
- Seller Reputation (15%)
- Listing Quality (15%)
- Rarity/Demand (10%)
Features:
- Automated hourly scheduler
- Real-time WebSocket updates
- Admin control panel
- Hot Deal badges (🔥 90-100, 💰 75-89)
Capabilities:
- Parse queries: "rolex submariner under 10k"
- Extract: brand, model, price range, condition
- Categories: watches, cars, sneakers
- Interpreted filters display
- Cost-effective (GPT-3.5 Turbo)
# Setup
./scripts/setup.sh # Interactive setup wizard
./scripts/setupCredentials.sh # Configure API keys
./scripts/setupDatabase.sh # Set up database
# Content
node scripts/generateBlogPosts.js # Generate 20 blog posts
# Testing
./scripts/runTests.sh # Run all tests
node scripts/securityAudit.js # Security scan
node scripts/performanceBenchmark.js # Performance test
# Deployment
./scripts/deploy.sh production # Deploy to productionBackend (.env):
NODE_ENV=development
PORT=3000
OPENAI_API_KEY=sk-...
SUPABASE_URL=https://...
SUPABASE_SERVICE_ROLE_KEY=...
ENABLE_DEAL_SCORING_SCHEDULER=true
DEAL_SCORING_INTERVAL_MINUTES=60Frontend (the-hub/.env):
VITE_API_URL=http://localhost:3000
VITE_SUPABASE_URL=https://...
VITE_SUPABASE_ANON_KEY=...
VITE_GA_MEASUREMENT_ID=G-... # OptionalTargets:
- API response time: <200ms average
- Page load time: <2s
- Lighthouse score: 90+
- Cache hit rate: >60%
- Uptime: 99.9%
Optimization:
- Response caching (2-10 min TTL)
- Image lazy loading
- Code splitting
- Database indexing
- CDN delivery
Features:
- Row-level security (RLS)
- Input validation
- XSS protection (DOMPurify)
- SQL injection prevention (parameterized queries)
- Rate limiting (60 req/min)
- CORS configuration
- Security headers
Audit:
node scripts/securityAudit.js"OpenAI client not available"
# Check API key is set
grep OPENAI_API_KEY .env
# Test connection
node -e "require('dotenv').config(); const client = require('./src/services/openai/client'); console.log('Available:', client.isAvailable());""Supabase not available"
# Verify credentials
node -e "require('dotenv').config(); const supabase = require('./src/db/supabase'); console.log('Available:', supabase.isAvailable());"
# Check database connection
supabase db pingPort already in use
# Find process
lsof -ti:3000
# Kill process
lsof -ti:3000 | xargs kill -9Tests failing
# Install test dependencies
npm install --include=dev
# Clear cache
rm -rf node_modules/.cache- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
ISC
- 📖 Documentation: See
docs/folder - 🐛 Issues: GitHub Issues
- 💡 Questions: Check QUICK_START.md first
Version: 1.0.0 Status: Production Ready ✅ Last Updated: January 24, 2026
Features Complete:
- ✅ AI Blog Platform
- ✅ Deal Scoring System
- ✅ Natural Language Search
- ✅ Performance Optimization
- ✅ Security Hardening
- ✅ Comprehensive Testing
- ✅ Production Documentation
Ready to launch! 🚀
Start with: ./scripts/setup.sh