A modern, production-ready SaaS dashboard application with multi-tenant architecture, billing integration, and Google API integrations.
YustBoard is a fully-featured SaaS dashboard application built with Next.js 15, TypeScript, and PostgreSQL. It includes complete multi-tenant architecture, Stripe billing integration, RBAC system, and various dashboard widgets with Google API integrations.
- β Multi-Tenant Architecture - Complete organization management with RBAC
- β Stripe Billing - 4-tier subscription plans with usage tracking
- β Authentication - NextAuth.js with Google OAuth & credentials
- β Email System - Automated notifications via Resend
- β Dashboard Widgets - Timeline, Gmail, Calendar, Weather, News, Banking, Files
- β Organization Branding - Custom logos and color schemes
- β Team Collaboration - Invite system with role management
- β High Performance - React Query caching, HTTP caching, optimized database queries
- β Production Ready - 88 passing tests, CI/CD pipeline, monitoring
| Category | Status | Details |
|---|---|---|
| Tests | β 88/88 passing | All unit tests pass |
| Lint | β 0 errors | Clean code, no warnings |
| TypeScript | β 0 errors | Strict type checking |
| Build | β Success | 75 routes generated |
| Coverage | Critical paths tested | |
| Production | β Ready | See Production Readiness |
- Node.js 18.x or higher
- PostgreSQL database (Neon/Supabase recommended)
- Google Cloud account (for Gmail/Calendar features)
- Stripe account (for billing features)
- Clone the repository
git clone https://github.com/yustinTR/yustboard.git
cd yustboard- Install dependencies
npm install- Configure environment variables
Create a .env.local file:
# Database (Neon/Supabase)
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret_here # Generate: openssl rand -base64 32
# Google OAuth (Optional)
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
# Stripe Billing
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Email (Resend)
RESEND_API_KEY=re_...
RESEND_FROM_EMAIL=[email protected]
# APIs (Optional)
NEWS_API_KEY=your_news_api_key
OPENWEATHER_API_KEY=your_weather_api_key- Setup database
npx prisma generate
npx prisma db push- Run development server
npm run devVisit http://localhost:3000 π
All documentation is located in the docs/ folder:
| Document | Description |
|---|---|
| CLAUDE.md | Development guidelines for AI assistants & contributors |
| PRODUCTION-READINESS.md | Complete production readiness report & checklist |
| PERFORMANCE-OPTIMIZATIONS.md | Performance optimizations & benchmarks (85-90% API reduction) |
| DEPLOYMENT.md | Multi-layer CI/CD pipeline & deployment strategy |
| TESTING.md | Testing infrastructure & guidelines (7 test types) |
| STORYBOOK-TESTING.md | Component testing with Storybook |
| SAAS-ROADMAP.md | SaaS transformation roadmap & progress |
| CI-CD-SETUP.md | GitHub Actions workflows configuration |
Before making any changes:
- Development Guidelines (CLAUDE.md) - Pre-commit requirements, code standards
- Production Readiness Report - Current status, deployment checklist
For deployment:
- Deployment Guide - GitHub Actions + Vercel strategy
- Production Readiness - Environment checklist
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run typecheck # TypeScript type checkingnpm run test:unit # Run unit tests (88 tests)
npm run test:coverage # Run with coverage report
npm run test:e2e # Run E2E tests (Playwright)# Run ALL before committing:
npm run test:unit # Must pass (88 tests)
npm run lint # Must pass (0 errors)
npm run typecheck # Must pass
npm run build # Must passnpm run storybook # Start Storybook dev server
npm run build-storybook # Build Storybook staticyustboard/
βββ app/ # Next.js App Router
β βββ api/ # API routes (65+ endpoints)
β βββ dashboard/ # Dashboard pages & widgets
β βββ (auth)/ # Auth pages (login, register, etc.)
β βββ onboarding/ # Organization onboarding flow
βββ components/ # React components
β βββ ui/ # Base UI components
β βββ dashboard/ # Dashboard-specific components
β βββ molecules/ # Composite components
β βββ billing/ # Billing components
βββ lib/ # Core libraries
β βββ auth/ # Authentication logic
β βββ database/ # Prisma client
β βββ email/ # Email service (Resend)
β βββ notifications/ # Notification system
β βββ permissions/ # RBAC system
β βββ stripe/ # Stripe billing
βββ prisma/ # Database schema & migrations
βββ docs/ # All documentation
βββ .github/workflows/ # CI/CD pipelines
βββ tests/ # Test files
- Framework: Next.js 15.5.2 (App Router)
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS (Glass morphism design)
- UI Components: Custom glass morphism components
- State: React Server Components + Client Components
- Caching: React Query (TanStack Query) for client-side caching
- Database: PostgreSQL (Neon/Supabase)
- ORM: Prisma 6.15.0
- Authentication: NextAuth.js (Google OAuth + Credentials)
- Email: Resend with React Email templates
- Billing: Stripe (4 subscription tiers)
- Storage: Supabase Storage (avatars, logos)
- Hosting: Vercel
- CI/CD: GitHub Actions (4 workflows)
- Monitoring: Health check endpoint
- Security: RBAC, CSRF protection, security headers
- Performance: HTTP caching, database indexing, code splitting
- Unit Tests: Vitest (88 tests)
- E2E Tests: Playwright
- Component Testing: Storybook
- Linting: ESLint (0 errors)
- Type Checking: TypeScript strict mode
- β HTTP Caching - Cache-Control headers on 10+ API routes (60-80% API reduction)
- β React Query - Client-side caching with automatic deduplication (85-90% fewer duplicate requests)
- β Database Indexing - 13 strategic indexes (40-70% faster queries)
- β Code Splitting - Dynamic imports for heavy components (9% bundle reduction)
- β Image Optimization - Next.js Image with WebP conversion & lazy loading
- β Batch Operations - Optimized database writes (12x faster)
- β Stale-While-Revalidate - Instant responses with background updates
Expected Lighthouse Score: 85-95 (Performance)
See Performance Optimizations for detailed benchmarks.
- β bcryptjs password hashing (tested)
- β NextAuth.js session management
- β RBAC with 4 roles (OWNER, ADMIN, MEMBER, VIEWER)
- β Multi-tenant database isolation
- β Security headers (XSS, CSRF, Frame protection)
- β Environment validation
- β SQL injection protection (Prisma ORM)
- β Secret scanning (TruffleHog in CI/CD)
- Organization management
- User onboarding flow (2-step wizard)
- RBAC system (29 permission tests)
- Team invitations with email
- Notification system
- Stripe integration (FREE, STARTER, PRO, ENTERPRISE)
- Organization branding (logos, colors)
- Usage tracking & limits
- Subscription management
- Customer portal
- Timeline (social posts with comments & likes)
- Gmail integration
- Google Calendar sync
- Weather widget
- News aggregator
- Banking transactions (via Gmail parsing)
- File management (Google Drive)
- Announcements system
The project includes a complete CI/CD pipeline with GitHub Actions:
- Quality Gate - Type check, lint, tests, build
- Security Scanning - NPM audit, CodeQL, secret scan
- Performance Monitoring - Lighthouse CI
- Automated Preview - Every PR gets a preview URL
See Deployment Guide for detailed instructions.
Required for production:
- β
DATABASE_URL(Neon/Supabase) - β
DIRECT_URL(Direct connection) - β
NEXTAUTH_URL(Production domain) - β
NEXTAUTH_SECRET(Strong random secret) - β
STRIPE_SECRET_KEY(Live mode) - β
STRIPE_WEBHOOK_SECRET(Production webhook) - β
RESEND_API_KEY(Production key) - β
RESEND_FROM_EMAIL(Verified domain)
Optional:
β οΈ GOOGLE_CLIENT_ID(For Gmail/Calendar)β οΈ GOOGLE_CLIENT_SECRETβ οΈ NEWS_API_KEYβ οΈ OPENWEATHER_API_KEY
88 unit tests covering critical functionality:
β lib/auth/auth-utils.test.ts (7 tests) # Authentication
β lib/email/resend.test.ts (12 tests) # Email service
β lib/notifications/create.test.ts (12 tests) # Notifications
β lib/permissions/check.test.ts (29 tests) # RBAC
β lib/stripe/config.test.ts (28 tests) # BillingRun tests:
npm run test:unit # All tests
npm run test:coverage # With coverage reportSee SAAS-ROADMAP.md for:
- β Completed features (Phases 1.1-2.2)
- π In progress features
- π Planned features (Team collaboration, Admin dashboard, Marketing website)
Before committing, run:
npm run test:unit # 88 tests must pass
npm run lint # 0 errors required
npm run typecheck # Must pass
npm run build # Must succeedSee Development Guidelines for detailed standards.
- β
TypeScript strict mode (no
anytypes) - β ESLint compliance (0 errors, 0 warnings)
- β Glass morphism design system
- β Component-based architecture
- β Comprehensive testing
Build Failures
rm -rf .next node_modules
npm install
npm run buildDatabase Issues
npx prisma generate
npx prisma db pushVercel Deployment Fails
- Check environment variables are set
- Verify DATABASE_URL is accessible
- Check build logs for specific errors
- Try redeploying (sometimes transient issues)
See Deployment Guide for more troubleshooting.
This project is private and proprietary.
Lead Developer: Yustin Troost AI Assistant: Claude Code (Anthropic)
For issues or questions:
- Check Documentation
- Review Production Readiness Report
- Check GitHub Issues
Status: β Production Ready | Version: 1.0.0 | Last Updated: 2025-10-20