AI-powered decision support terminal for Defense, Medical, and Legal missions.
DarkDeck is a classified-style AI terminal that provides specialized mission decks:
- Alpha Deck: Multi-modal AI (text, vision, voice) with case preparation tools
- Defense Deck: Intelligence analysis, OSINT search, and tactical briefings
- Medical Deck: Clinical decision support, EHR integration, and diagnostic assistance
- 🎯 3 Specialized Mission Decks - Domain-specific AI workflows
- 🔐 Military-Grade Security - Rate limiting, HMAC sessions, constant-time auth
- 💳 Stripe Subscriptions - 3-tier pricing with usage enforcement
- 🎤 Voice Mode - Real-time OpenAI voice conversations
- 👁️ Vision Analysis - GPT-4 Vision for image interpretation
- 📊 Usage Tracking - Real-time limits with upgrade prompts
- 🌐 URL Fetching - Web content analysis for OSINT
- 📄 Document Import - Legal/medical transcript processing
- Node.js 18+
- pnpm 8+
- Stripe account (for payments)
- OpenAI API key
# Clone repository
git clone https://github.com/ehabhilfiger/darkgptalpha.git
cd darkgptv2
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys
# Run development server
pnpm devVisit http://localhost:3000
Required environment variables:
# OpenAI
OPENAI_API_KEY=sk-...
# Authentication
SESSION_SECRET=your-64-char-secret
LOGIN_PASSWORD=your-secure-password
# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_...
STRIPE_SECRET_KEY=sk_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_ELITE_PRICE_ID=price_...
NEXT_PUBLIC_STRIPE_PROFESSIONAL_PRICE_ID=price_...
NEXT_PUBLIC_STRIPE_STANDARD_PRICE_ID=price_...
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000- Day 1: Setup & Security - Authentication, rate limiting, disclaimers
- Day 2: Payments - Stripe integration, webhooks, billing
- Day 3: Subscriptions - Usage limits, upgrade modals, enforcement
- Comprehensive Audit - 30-metric analysis (6.1/10)
app/
├── api/ # API routes (OpenAI, Stripe, auth)
├── terminal/ # 3 mission decks (Alpha, Defense, Medical)
├── pricing/ # Subscription management
├── voice/ # Real-time voice mode
└── vision/ # Image analysis
components/
├── terminal/ # Deck UI components (rails, drawers, panels)
├── UpgradeModal.tsx # Subscription enforcement
├── UsageIndicator.tsx # Real-time usage tracking
└── BillingDashboard.tsx # Stripe customer portal
lib/
├── subscription.ts # Tier limits and access control
├── stripe.ts # Server-side Stripe SDK
└── ratelimit.ts # Redis-based rate limiting
| Tier | Price | Alpha Deck | Defense Deck | Medical Deck | Interactions/mo |
|---|---|---|---|---|---|
| Standard | $29 | ✅ | ❌ | ❌ | 100 |
| Professional | $99 | ✅ | ✅ | ❌ | 500 |
| Elite | $299 | ✅ | ✅ | ✅ | Unlimited |
- ✅ HTTPS-only cookies with httpOnly + secure flags
- ✅ HMAC session tokens (SHA-256)
- ✅ Constant-time password comparison
- ✅ Rate limiting (10 login attempts/min, 60 API calls/min)
- ✅ Stripe webhook signature verification
- ✅ Legal disclaimers and Terms of Service
- ✅ Error tracking with Sentry (privacy-safe, no PII)
⚠️ Client-side subscription checks (needs server-side middleware)
- ✅ Sentry: Real-time error tracking with session replay
- ✅ PostHog: User analytics and behavior tracking
- ⏳ UptimeRobot: 24/7 uptime monitoring (manual setup required)
- ⏳ Status Page: Public transparency (setup after UptimeRobot)
See MONITORING_SETUP_GUIDE.md for configuration.
# Lint
pnpm lint
# Type check
pnpm tsc --noEmit
# Build
pnpm build
# Battle test decks
node scripts/battleTestDecks.mjs- Set production environment variables in Vercel/Railway
- Configure Stripe webhook endpoint:
https://yourdomain.com/api/stripe/webhook - Test webhook locally:
stripe listen --forward-to localhost:3000/api/stripe/webhook - Deploy:
vercel --prodorgit push(auto-deploy)
Overall Score: 6.1/10 (70% launch-ready)
✅ Authentication & security
✅ Stripe 3-tier subscriptions
✅ Usage tracking & limits
✅ 3 specialized AI decks
✅ Voice and Vision modes
✅ PostHog analytics integration
✅ Sentry error tracking
❌ No database (using session storage - blocks scalability)
❌ No automated tests (1/10 - regression risk)
⏳ No uptime monitoring (UptimeRobot manual setup needed)
- Day 4: Supabase database migration (users, subscriptions, messages)
- Day 5: Jest + React Testing Library setup
- Week 2: Analytics (PostHog), monitoring (Sentry), CI/CD
See COMPREHENSIVE_AUDIT_REPORT.md for full analysis.
This is a private alpha project. Contact @ehabhilfiger for access.
Proprietary - All Rights Reserved
Built with Next.js 15, OpenAI GPT-4, Stripe, and Tailwind CSS.