How pixyglee/yorby works
Project type and purpose
• This is a full-stack, multi-tenant web application (“Yorby”) built with Next.js 15 (App Router) in TypeScript.
• It serves both B2B (AI-powered recruitment, candidate screening) and B2C (job-seeker mock interviews) use cases.
• It integrates real-time voice/video interviews, AI analysis, database storage, authentication, payments, and monitoring.
File structure
• nextjs/: the main Next.js application
• app/ → nested App Router routes (pages, layouts, server/client components)
• app/api/ → Next.js API Routes (serverless functions)
• components/, lib/, utils/, context/, hooks/ → shared UI, helper modules, React contexts
• public/ → static assets (demo videos, PDFs)
• supabase/ → Supabase migrations and email templates
• config files: next.config.ts, tailwind.config.js, sentry configs, vercel.json
• supabase/: local Supabase project configuration
• migrations/ → SQL scripts defining schema, RLS policies
• templates/ → email templates for auth flows
• CI/CD in .github/workflows
README for architectural insights
• Tech stack overview: Next.js, TypeScript, Tailwind, shadcn/ui
• Database: Supabase (PostgreSQL) with Row-Level-Security
• AI: Google AI SDK, OpenAI
• Real-time: LiveKit
• Video storage: Mux
• Speech transcription: Deepgram
• Payments: Stripe
• Monitoring/analytics: Sentry, PostHog, Axiom
• Multi-language support (i18n)
a. Main components
• Client (Web Browser)
• Next.js Application (deployed to Vercel or similar)
• Frontend: SSR/CSR React pages (App Router)
• Backend: API Routes (app/api/*) & Edge Functions
• Database & Storage
• Supabase (PostgreSQL + Storage buckets + Auth + Edge Functions)
• Real-time & Media
• LiveKit server (voice/video rooms)
• Mux (recording, playback)
• AI & Speech Services
• OpenAI/Google AI endpoints
• Deepgram transcription API
• Payments & Webhooks
• Stripe API + webhook receivers
• Monitoring & Analytics
• Sentry, PostHog, Axiom
b. Relationships & data flows
• Browser ↔ Next.js (HTTP for SSR + REST for client navigation)
• Browser ↔ LiveKit (WebSocket for real-time voice/video sessions)
• Next.js API ↔ Supabase (RPC/SQL calls via supabase client)
• Next.js API ↔ AI services (HTTPS calls to OpenAI/Google AI/Deepgram)
• Next.js API ↔ Stripe (HTTPS calls + webhook endpoints)
• Supabase Triggers/Webhooks → Next.js Edge Functions for async processing
• Next.js ↔ Mux (HTTPS to upload/retrieve video assets)
c. Architectural patterns & design principles
• App Router with nested layouts for domain-driven routing
• API Route Layer co-located with frontend code for domain logic
• Context Providers for global state (Auth, Onboarding, Multi-Tenant)
• Modular folder structure (apply, auth, dashboard, recruiting, etc.)
• RLS in Supabase for multi-tenant and role-based access
• Server/Client components mixing for performance and SEO
d. Key technologies/frameworks
• Next.js 15, React 19, TypeScript
• Tailwind CSS, shadcn/ui
• Supabase (Database, Auth, Storage, Edge Functions)
• LiveKit, Mux
• Deepgram, OpenAI, Google AI SDK
• Stripe, PostHog, Sentry, Axiom