Skip to main content
MNNR/Documentation
πŸš€ Deployment

Production Deployment

Deploy your agent infrastructure to production with Vercel, Supabase, and enterprise-grade monitoring.

Infrastructure Stack

β–²
Vercel
Edge Runtime
⚑
Supabase
PostgreSQL
πŸ”΄
Redis
Rate Limiting
πŸ’³
Stripe
Payments
βš™οΈ
Step 1

Environment Setup

  • Database URL (Supabase PostgreSQL)
  • Stripe API keys (publishable + secret)
  • Redis connection string for rate limiting
  • Sentry DSN for error monitoring
  • MNNR API keys for agent services
Configuration
# .env.production
DATABASE_URL="postgresql://..."
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
REDIS_URL="redis://..."
SENTRY_DSN="https://..."
MNNR_API_KEY="mnnr_test_..."
πŸ—„οΈ
Step 2

Database Migration

  • Create Supabase project
  • Run schema migrations
  • Configure Row Level Security (RLS)
  • Set up agent_identities table
  • Create transaction indexes
Configuration
# Run migrations
npx prisma migrate deploy

# Seed agent economy tables
npx prisma db seed

# Verify RLS policies
supabase db diff --linked
πŸš€
Step 3

Vercel Deployment

  • Connect GitHub repository
  • Configure build settings (Next.js)
  • Set environment variables
  • Configure custom domain (mnnr.app)
  • Enable Edge Functions for APIs
Configuration
# vercel.json
{
  "framework": "nextjs",
  "regions": ["iad1", "sfo1", "fra1"],
  "functions": {
    "api/**/*.ts": {
      "maxDuration": 30
    }
  }
}
πŸ“Š
Step 4

Monitoring Setup

  • Sentry error monitoring
  • Performance monitoring (Web Vitals)
  • Database health checks
  • Agent transaction monitoring
  • Alert configuration (PagerDuty/Slack)
Configuration
// sentry.config.ts
Sentry.init({
  dsn: process.env.SENTRY_DSN,
  tracesSampleRate: 0.1,
  profilesSampleRate: 0.1,
  integrations: [
    new Sentry.BrowserTracing(),
  ],
});
πŸ”
Step 5

Security Hardening

  • Enable Redis rate limiting
  • Configure CORS policies
  • Set up SSL certificates (auto via Vercel)
  • Review API access controls
  • Enable audit logging
Configuration
// Rate limiting config
const rateLimiter = new RateLimiter({
  redis: redisClient,
  max: 100,
  windowMs: 60 * 1000,
  keyPrefix: 'rl:',
});

Pre-Deployment Checklist

Setup

βœ“
Environment variables configured
βœ“
Database schema deployed
βœ“
Stripe webhooks configured
βœ“
Domain SSL certificate active

Operations

βœ“
Monitoring tools configured
βœ“
Backup strategy in place
βœ“
Load testing completed
βœ“
Rollback plan documented

Post-Deployment Verification

πŸ₯

Health Check

GET /api/health
⚑

Performance

Run Lighthouse audit

πŸ”

Security

Verify SSL & headers

Need Deployment Help?

Our DevOps team can assist with custom deployment configurations.

πŸ“§ Contact DevOps