Last Updated: 2026-03-15 | Version: 1.5.0 Status: Published
- Overview
- Frontend
- Backend
- Database & Cache
- Authentication
- DevOps & Infrastructure
- Third-party Services
- Development Tools
ProgressTracker is built with a modern, TypeScript-first stack optimized for developer experience, type safety, and Vercel deployment.
Why Next.js?
- Server-side rendering for SEO and performance
- App Router for nested layouts and streaming
- Built-in API routes (no separate backend needed)
- Vercel-optimized deployment
Why App Router (not Pages)?
- React Server Components for zero-JS UI
- Streaming and Suspense boundaries
- Simplified data fetching patterns
- Better TypeScript integration
- Concurrent features (useTransition, useDeferredValue)
- Automatic batching for performance
All code is strictly typed:
- No
anytypes in production code - Prisma auto-generates database types
- API response types shared between frontend and backend
- Utility-first CSS eliminates unused styles
- JIT mode for instant dev server updates
- Custom design tokens in
tailwind.config.ts - Dark mode support via
classstrategy
- Accessible, unstyled components
- Built on Radix UI primitives
- Customizable to match our design system
- Components copied into project (not a dependency)
- Client-side data fetching with automatic revalidation
- Stale-while-revalidate strategy
- Optimistic UI updates
- Error retry with exponential backoff
- Smooth page transitions
- Micro-animations for achievements/streaks
- Gesture-based interactions
- SVG-based charts (heatmap, line, bar)
- Responsive containers
- Custom tooltip components
Why not a separate Express server?
- Single deployment unit (simpler DevOps)
- Shared TypeScript types with frontend
- Vercel serverless functions auto-scaling
- No CORS configuration needed
Why Prisma?
- Auto-generated TypeScript client
- Type-safe queries (catch SQL errors at compile time)
- Migrations with version control
- Schema-as-code approach
// Type-safe query example
const user = await prisma.user.findUnique({
where: { email: 'user@example.com' },
include: { goals: true, achievements: true }
});
// user is fully typed!- Runtime schema validation for all API inputs
- Type inference for TypeScript types
- Clear error messages for invalid input
- Reliable job scheduling (replaces cron + queue)
- TypeScript-first job definitions
- Built-in retry logic and error handling
- Visual job monitoring dashboard
Why PostgreSQL?
- ACID transactions for financial data (billing)
- JSON support for flexible metadata
- Full-text search built-in
- Excellent Prisma support
- Mature ecosystem
Why Redis?
- Ultra-fast in-memory cache
- Rate limiting (sliding window)
- Session storage fallback
- Pub/Sub for real-time features (future)
Upstash specifically:
- Serverless-friendly (HTTP API, no persistent connection)
- Free tier for development
- Auto-scaling
- Battle-tested auth library for Next.js
- Built-in OAuth providers (GitHub, Google)
- Session management with JWT or database sessions
- CSRF protection built-in
- Password hashing (12 salt rounds)
- Pure JavaScript (no native dependencies)
- Works in all environments
- Time-based one-time passwords
- Custom implementation (no
otplibdependency issues) - QR code generation for authenticator apps
- Zero-config Next.js deployment
- Preview deployments for PRs
- Edge Network for global CDN
- Serverless function auto-scaling
- CI/CD pipeline (lint, type-check, test, build)
- Automated deployment on merge to main
- Dependency security scanning
- Error tracking and performance monitoring
- Source maps for readable stack traces
- Alert rules for critical errors
| Service | Purpose | SDK |
|---|---|---|
| Stripe | Payments & subscriptions | stripe |
| Brevo | Transactional email | @getbrevo/brevo |
| Supabase Storage | File storage (exports) | @supabase/supabase-js |
| Sentry | Error monitoring | @sentry/nextjs |
| Trigger.dev | Background jobs | @trigger.dev/sdk |
| Tool | Purpose |
|---|---|
| ESLint | Code linting |
| Prettier | Code formatting |
| Husky | Git hooks (pre-commit lint) |
| Jest | Unit and integration tests |
| Playwright | E2E tests |
| Prisma Studio | Database GUI |
| tsx | TypeScript script execution |