Tech Stack
NextShip is built with a modern, production-ready technology stack.
Core Framework
| Technology | Version | Purpose |
|---|
| Next.js | 16.x | React full-stack framework |
| React | 19.x | UI library |
| TypeScript | 5.x | Type safety |
| pnpm | 9.x | Package manager |
Frontend
UI & Styling
- Tailwind CSS v4 - Atomic CSS with JIT compilation
- shadcn/ui - Accessible, customizable components based on Radix UI
- Lucide React - Beautiful icon library
- Framer Motion - Declarative animations
State Management
| Library | Purpose |
|---|
| TanStack Query | Server state (API data caching) |
| Zustand | Client state (UI state, preferences) |
| nuqs | URL state (filters, pagination) |
Backend
Database
- Drizzle ORM - Lightweight, type-safe SQL ORM
- Neon - Serverless PostgreSQL with branching
Why Drizzle over Prisma?
- No Rust engine, lighter weight
- SQL-like syntax, lower learning curve
- Complete type inference without generation
- Edge runtime compatible
Authentication
- Better Auth - Modern auth library designed for Next.js
- OAuth (Google, GitHub)
- Email/password
- Magic links
- Two-factor authentication
- Fully type-safe
Authorization (RBAC)
- Casbin - Powerful, flexible access control
- Role hierarchy (superadmin > admin > user)
- Policy-based permissions
- Dynamic policy management
- Admin UI for permission management
Payments
| Provider | Features |
|---|
| Stripe | Subscriptions, one-time payments, customer portal |
| Creem | Alternative payment provider, same features |
Configurable via PAYMENT_PROVIDER environment variable.
Credits System
- SKU-based credit packages
- Usage tracking per API call
- Balance management with transactions
Email
- Resend - Email delivery service
- React Email - Build emails with React components
File Storage
- Cloudflare R2 or AWS S3 - Object storage
- Presigned URLs for secure uploads
- Image optimization support
AI Gateway
- API proxy for AI services (OpenAI, Anthropic, etc.)
- Credit-based billing per request
- Usage logging and analytics
- Rate limiting
API Layer
| Technology | Purpose |
|---|
| Server Actions | Type-safe server mutations |
| Zod | Schema validation |
| API Routes | REST endpoints for external APIs |
Infrastructure
| Service | Purpose |
|---|
| Vercel | Hosting and deployment |
| Neon | Serverless PostgreSQL |
| Cloudflare R2 | File storage |
| Resend | Email delivery |
Development Tools
- Biome - Fast linter and formatter (replaces ESLint + Prettier)
- Drizzle Kit - Database migrations and studio
- Velite - MDX content processing
- TypeScript - Static type checking
Logging
- Pino - Fast, structured logging
- next-logger - Next.js log interception
- pino-pretty - Development log formatting