How realaashishly/pingpanda works
Main System Components
a) Client Layer:
• Next.js Frontend (src/app directory)
• Landing Pages ((landing) route)
• Authentication Pages ((auth) route)
• Dashboard Interface (dashboard route)
b) API Layer:
• Next.js API Routes (src/app/api)
• API Version Management (v1 endpoints)
• tRPC Server (src/server)
c) Service Layer:
• Authentication Service (Clerk integration)
• Event Monitoring Service
• Discord Notification Service (src/app/lib/discord-client.ts)
• Database Service (Prisma/PostgreSQL)
Component Relationships
a) Frontend to Backend:
• Client → API Routes
• Client → tRPC Procedures
• Authentication Flow → Clerk
b) Backend Services:
• API Routes → Event Monitoring
• Event Monitoring → Discord Notifications
• API Routes → Database Layer
Specific Implementation Details
Architectural patterns:
a) Next.js App Router Structure:
• Routes by feature ((auth), (landing), dashboard)
• API routes separation
• Server components architecture
b) Data Flow:
• Client requests → API/tRPC → Database
• Event triggers → Discord notifications
Key Technical Elements to Highlight
• Next.js App Router architecture
• tRPC implementation (src/server)
• Prisma ORM integration
• Authentication flow with Clerk
• Real-time event monitoring system
• Discord notification pipeline
┌─ Client Layer ─────────────────────┐
• Next.js Frontend │
• React Components │
• TailwindCSS UI │
• ┬─┘
• ↕ │
┌─ API Layer ──────────────────────┤
• Next.js API Routes │
• tRPC Procedures │
• ┤
• ↕ │
┌─ Service Layer ───────────────────┤
• Event Monitoring │
• Discord Notifications │
• Authentication │
• ┤
• ↕ │
┌─ Data Layer ─────────────────────┘
• PostgreSQL │
• Prisma ORM │
• ┘