How himarplupi/ascendia-himarpl works
Main System Components
a) Frontend Layer:
• Next.js Application (src/app directory)
• Components Layer (src/components)
• Client-side Utilities (src/hooks, src/lib)
b) API Layer:
• tRPC Router (src/server/api)
• API Routes (src/app/api)
c) Database Layer:
• Prisma ORM (prisma/schema.prisma)
Architectural Patterns to Highlight
a) Next.js App Router Architecture:
• Route hierarchy based on the file structure in src/app
• Dynamic routes ([type], [department])
• Relationship between pages and layouts
b) Component Architecture:
• Components into logical groups:
• UI Components (src/components/ui)
• Common Components (src/components/common)
• Feature-specific Components (about, news, dedication)
• Motion Components (animations)
c) API Architecture:
• tRPC implementation showing:
• Router definitions (department.ts, post.ts, user.ts)
• API endpoints
• Connection to Prisma/Database
Specific Implementation Details
a) State Management and Data Flow:
• tRPC client-server communication
• API routes and their interactions
• Database queries and mutations
b) Authentication Flow (if implemented)
• User sessions
• Protected routes
• Authorization checks