Skip to content

Mumma6/orion-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

77 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Orion Kit

Production-ready SaaS template with authentication, payments, analytics, and everything a modern project needs. Perfect for learning modern fullโ€‘stack development or starting your next project.

Docs โ€ข Getting Started โ€ข Architecture โ€ข Blog

If this saves you time, please โญ the repo.

๐ŸŽฏ What's Included

Apps:

  • ๐ŸŒ Landing Page (web) โ€” Marketing site
  • ๐Ÿ“Š Dashboard (app) โ€” Admin app with tasks, billing, analytics & TanStack Query
  • ๐Ÿ”Œ Serverless API (api) โ€” Next.js 15 Route Handlers with Zod validation
  • ๐Ÿ“š Documentation (docs) โ€” Astroโ€‘powered docs with Starlight

Features:

  • โšก Monorepo โ€” Turborepo for fast builds and caching
  • ๐Ÿ” Authentication โ€” Custom JWT with protected routes & bcrypt
  • ๐Ÿ—„๏ธ Database โ€” Neon Postgres + Drizzle ORM with drizzleโ€‘zod
  • ๐Ÿ”„ Data Fetching โ€” TanStack Query with optimistic updates
  • ๐Ÿ’ณ Payments โ€” Stripe subscriptions + webhooks
  • ๐Ÿ“ง Email โ€” Resend with React Email templates
  • ๐ŸŽจ UI โ€” shadcn/ui + Tailwind CSS v4 + Radix UI primitives
  • ๐Ÿ“Š Analytics โ€” PostHog tracking + Axiom logging
  • โš™๏ธ Jobs โ€” Serverless cron by default; Trigger.dev background tasks
  • ๐Ÿงช Testing โ€” Vitest unit tests + Playwright E2E
  • ๐Ÿ“ Forms โ€” React Hook Form + Zod validation
  • ๐ŸŒ— Theming โ€” Dark mode with nextโ€‘themes

Typeโ€‘safe stack: Database Schema โ†’ Autoโ€‘generated Types โ†’ Shared Packages โ†’ API โ†’ Frontend

Why this structure

  • Separation of concerns โ€” clear boundaries between UI, domain, and data reduce coupling and increase clarity.
  • Layered & modular โ€” features are encapsulated in layers/modules, making refactors and tech swaps low-risk.
  • Monorepo with shared packages โ€” reusable types/utilities/components drive consistency and avoid duplication.
  • End-to-end type safety โ€” a single source of truth for models cuts errors and surfaces issues at compile time.
  • Portability & future-proofing โ€” parts can be moved, replaced, or scaled without disrupting the rest.
  • Developer experience & speed โ€” monorepo caching, one-command flows, and a predictable layout.
  • Testability & observability โ€” isolated interfaces make unit/E2E testing and logging/monitoring straightforward.
  • Team-friendly ownership โ€” clear package boundaries enable independent changes without blocking others.

โšก Quick Start

# 1) Use this template or clone
git clone https://github.com/YOUR-USERNAME/your-project-name
cd your-project-name
pnpm install

# 2) Set up environment variables (see below)

# 3) Initialize database
pnpm db:push

# 4) Start everything
pnpm dev

Optional: Rename โ€œorion-kitโ€ to your own project name in package.json, docs, env files, and the repo name.

Apps running:

๐Ÿ”ง What You Need

Required accounts (all have generous free tiers):

Service Purpose Free Tier
Neon Database 0.5GB
Stripe Payments No fees
Resend Email 3k emails
PostHog Analytics 1M events
Axiom Logging 500MB/mo

๐Ÿ› ๏ธ Environment Setup

1. Create .env.local files:

cp apps/app/.env.example apps/app/.env.local
cp apps/api/.env.example apps/api/.env.local
cp packages/database/.env.example packages/database/.env

2. Add your API keys (get them from the services above):

apps/app/.env.local:

# API
NEXT_PUBLIC_API_URL=http://localhost:3002

# PostHog
NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com

# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

apps/api/.env.local:

# Database
DATABASE_URL=postgresql://...

# JWT Authentication
AUTH_JWT_SECRET=your-jwt-secret-key-here

# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Email (Resend)
RESEND_API_KEY=re_...
FROM_EMAIL=onboarding@resend.dev

# Axiom
AXIOM_TOKEN=xaat-...
AXIOM_DATASET=orion

packages/database/.env:

DATABASE_URL=postgresql://...

๐Ÿ“ฆ Monorepo Structure

App Port Description
web 3000 Marketing landing page
app 3001 Dashboard application
api 3002 API backend
docs 3004 Documentation
Package Description
@workspace/auth JWT authentication + user management
@workspace/database Drizzle ORM + Neon + Zod schemas
@workspace/email Resend + React Email templates
@workspace/types Shared TypeScript types
@workspace/ui shadcn/ui + Radix UI components
@workspace/payment Stripe payments + subscriptions
@workspace/analytics PostHog tracking + Vercel Analytics
@workspace/observability Axiom logging + Web Vitals
@workspace/jobs Trigger.dev background jobs

๐Ÿ—๏ธ Architecture

Typeโ€‘safe monorepo with endโ€‘toโ€‘end types. Database schema generates Zod schemas which flow through shared types to API and frontend.

  • Flow: Database โ†’ Zod Validation โ†’ Types โ†’ API Routes โ†’ TanStack Query hooks
  • Single source of truth: Zod/Drizzle schemas validate on server and provide types on client
  • Flexibility: Swap API framework/ORM/UI without breaking contracts
  • Benefit: Change schema โ†’ get compileโ€‘time errors across the stack

๐Ÿš€ Commands

pnpm dev               # Start all apps
pnpm db:push           # Push database schema
pnpm db:studio         # Open database GUI
pnpm test              # Run tests
pnpm build             # Build for production

๐Ÿ“š Documentation

For more inโ€‘depth documentation and explanations, please see the official documentation site: https://orion-kit-docs.vercel.app/

๐Ÿ“ License

MIT


Built with โค๏ธ for developers

About

๐Ÿš€ Production-ready SaaS boilerplate with Next.js 15, TypeScript, and modern tools. Get from zero to deployed in minutes with authentication, payments, database, email, analytics, and more. Perfect for startups and developers who want to ship fast.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors