Cloud Accounts Setup
Orion Kit uses cloud services for database, payments, and monitoring. Authentication is handled by our custom JWT system (no external dependencies!).
Service | What It Does | Used Where | Free Tier | Setup Time |
---|---|---|---|---|
Neon | Postgres database | API + Database schema | 0.5GB | 2 min |
Stripe | Subscription payments | Billing page | No fees | 5 min |
Resend | Transactional emails | Welcome emails | 3k emails | 2 min |
Axiom | Structured logging | API error tracking | 500MB/month | 2 min |
PostHog | Product analytics | User behavior | 1M events/mo | 2 min |
Vercel | Hosting | Production deploy | Unlimited | 1 min |
🔐 Authentication (Custom JWT)
Section titled “🔐 Authentication (Custom JWT)”Orion Kit uses a custom JWT-based authentication system - no external auth provider needed!
Add to your API app (.env.local
):
AUTH_JWT_SECRET=your-super-secret-key-min-32-characters-long
NEXT_PUBLIC_APP_URL=http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3002
DATABASE_URL=postgresql://...
That’s it! No external accounts needed.
🗄️ Neon (2 minutes)
Section titled “🗄️ Neon (2 minutes)”Serverless Postgres database with autoscaling and generous free tier.
Quick Setup
Section titled “Quick Setup”- Create Account: neon.tech → Sign up with GitHub
- Create Project: Click “Create Project” → Copy Pooled Connection URL
- Add to .env files:
# packages/database/.env # apps/api/.env.local # apps/studio/.env.local DATABASE_URL=postgresql://user:password@host.neon.tech/neondb?sslmode=require
- Initialize:
pnpm db:push
- Verify:
pnpm db:studio
→ Opens https://local.drizzle.studio
💳 Stripe (5 minutes)
Section titled “💳 Stripe (5 minutes)”Handles subscription payments, billing, and customer management.
Quick Setup
Section titled “Quick Setup”-
Create Account: stripe.com → Sign up → Enable Test Mode
-
Create Products: Products → Add Product → Pro ($19/month) + Enterprise ($49/month) → Copy Price IDs
-
Get API Keys: Developers → API Keys → Copy publishable + secret keys
-
Add to .env files:
# apps/api/.env.local STRIPE_SECRET_KEY=sk_test_... STRIPE_PRICE_ID_PRO=price_... STRIPE_PRICE_ID_ENTERPRISE=price_... # apps/app/.env.local NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
-
Setup Webhooks:
stripe listen --forward-to localhost:3002/webhooks/stripe
→ Copy webhook secret -
Test: Visit
/dashboard/billing
→ Use test card4242 4242 4242 4242
📧 Resend (2 minutes)
Section titled “📧 Resend (2 minutes)”Transactional emails with beautiful React Email templates.
Quick Setup
Section titled “Quick Setup”- Create Account: resend.com → Sign up
- Get API Key: Dashboard → API Keys → Create API Key → Copy key
- Add to .env:
# apps/api/.env.local RESEND_API_KEY=re_... FROM_EMAIL=onboarding@resend.dev
- Test: Register new user → Check email for welcome message
📈 Axiom (2 minutes)
Section titled “📈 Axiom (2 minutes)”Serverless logging platform for structured logs, errors, and performance metrics.
Quick Setup
Section titled “Quick Setup”- Create Account: axiom.co → Sign up
- Create Dataset: Dashboard → Datasets → Create Dataset → Name:
orion-logs
- Get API Token: Settings → API Tokens → Create Token → Ingest Only → Copy token
- Add to .env:
# apps/api/.env.local AXIOM_TOKEN=xaat-... AXIOM_DATASET=orion-logs
- Test: Make API request → Visit axiom.co → Check logs
📊 PostHog (2 minutes)
Section titled “📊 PostHog (2 minutes)”Open-source product analytics platform for tracking user events and page views.
Quick Setup
Section titled “Quick Setup”- Create Account: posthog.com → Sign up
- Get API Keys: Dashboard → Project Settings → Copy API Key + Host URL
- Add to .env files:
# apps/web/.env.local + apps/app/.env.local NEXT_PUBLIC_POSTHOG_KEY=phc_... NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
- Test: Visit app → Navigate pages → Check posthog.com → Web Analytics
⚡ Trigger.dev (Optional)
Section titled “⚡ Trigger.dev (Optional)”Background jobs and scheduled tasks without managing infrastructure.
Quick Setup
Section titled “Quick Setup”- Create Account: trigger.dev → Sign up → Create project
- Get API Key: Project dashboard → Environments → Copy Development API Key
- Add to .env:
# packages/jobs/.env TRIGGER_API_KEY=tr_dev_... TRIGGER_API_URL=https://api.trigger.dev
- Test:
cd packages/jobs && pnpm trigger:dev
→ Check dashboard
▲ Vercel (1 minute)
Section titled “▲ Vercel (1 minute)”Deployment platform for Next.js apps with serverless hosting and automatic deployments.
How It’s Used
Section titled “How It’s Used”- Three apps deployed:
web
(marketing),app
(dashboard),api
(backend) - Automatic deployments: Push to
main
branch = production deploy - Environment variables: Set in Vercel dashboard for each app
See the Deployment Guide for complete instructions.
🎉 You’re Done!
Section titled “🎉 You’re Done!”Total setup time: ~15 minutes for all services
Next steps: