Frontend Architecture
TalentG’s frontend is built with modern React patterns using Next.js 16 App Router, providing a scalable and maintainable codebase.Technology Stack
Core Technologies
- Next.js 16: React framework with App Router
- React 19: UI library with concurrent features
- TypeScript: Type-safe development
- TailwindCSS: Utility-first CSS framework
- RizzUI: Component library for consistent design
State Management
- Jotai: Atomic state management
- React Hook Form: Form state management
- Zod: Schema validation
- TanStack Query: Server state management
Development Tools
- ESLint: Code linting
- Prettier: Code formatting
- Husky: Git hooks
- TypeScript: Type checking
Loading States (Skeleton Standard)
- Use the single Shadcn-based skeleton primitive at
apps/isomorphic/src/components/ui/skeleton.tsx; do not import skeletons from other libraries. - For page-level fallbacks, prefer
PageSkeletonvariants inapps/isomorphic/src/components/ui/page-skeleton.tsxinstead of ad-hoc layouts. - Keep suspense fallbacks lightweight: reserve skeletons for initial data fetch and avoid stacking spinners plus skeletons together.
Standardized Tables (Loading, Caching, Errors)
- The source of truth is
apps/isomorphic/src/components/ui/table-standardized.tsx; loading defaults to the shared table skeleton (spinner only whenloadingStyle="spinner"is set). - Server tables should pass
manualPaginationwithpage/total/onPageChange/onPageSizeChange, pluscacheKey/cacheTtlMs/refreshOnMountwhen usinguseServerTableData. - Surface failures via
errorMessage+onRetryto use the unified error state; avoid bespoke error divs. - Search is debounced by default (250 ms) via
searchValue/onSearchChange; external filters can render alongside the built-in search without re-styling.
Project Structure
Component Architecture
Component Hierarchy
Component Patterns
1. Compound Components
2. Custom Hooks
3. Form Components
State Management
Jotai Atoms
Server State with TanStack Query
Styling Guidelines
TailwindCSS Configuration
Component Styling
Performance Optimization
Code Splitting
Image Optimization
Memoization
Testing Strategy
Component Testing
Integration Testing
Development Workflow
Local Development
Code Quality
- ESLint: Enforces coding standards
- Prettier: Ensures consistent formatting
- Husky: Pre-commit hooks for quality checks
- TypeScript: Compile-time type checking
Git Workflow
- Create feature branch from
main - Make changes with proper commits
- Run quality checks before push
- Create pull request for review
- Merge after approval and CI passes
Admin Interview Prep Hub
The Admin Interview Prep Hub is a specialized dashboard section that provides admins with tools and insights for managing interview preparation activities. It was adapted from the/interview-questions page UI to create a professional, TalentG-branded experience.
Architecture
Location:apps/isomorphic/src/components/dashboard/admin/interview-prep/
Components:
AdminInterviewPrepHub: Main container component with grid layoutInterviewHeroBanner: Promotional banner for interview prep programsRecentlyAccessedQuestionSets: Grid of recently used interview question setsInterviewCategoriesGrid: Category browser for different interview typesFeaturedInterviewTracks: Highlighted interview preparation tracksInterviewEngagementStats: Analytics dashboard for interview activityTopInterviewCoaches: List of top-performing interview mentorsSavedInterviewFlows: User’s saved interview practice templatesUpcomingInterviewEvents: Calendar of scheduled interview sessions
apps/isomorphic/src/data/interview-prep-data.tsx - Contains mock data for interview-related content
Integration
The hub is conditionally rendered inDashboardContent for users with the admin role:
Customization
To customize the mock data and content:- Update Mock Data: Modify
interview-prep-data.tsxwith real data structures - Connect to Database: Replace static data imports with Supabase queries
- Add Real Functionality: Implement actual interview session management, coach assignments, etc.
- Update Links: Change route links from placeholder URLs to actual TalentG admin routes
Future Enhancements
- Real-time Data: Connect to live interview analytics and session data
- Interactive Sessions: Implement actual interview practice functionality
- Coach Management: Add admin tools for managing interview coaches
- Session Scheduling: Integrate with calendar systems for interview events
- Performance Tracking: Add detailed analytics for interview preparation metrics