How redpangilinan/iotawise works
Main System Components
a. Client Layer:
• Next.js Frontend (app directory structure)
• PWA capabilities
• Authentication UI components
• Dashboard & Activity tracking interfaces
b. API Layer:
• Next.js API routes (/app/api/*)
• Authentication endpoints
• Activity management endpoints
• User management endpoints
c. Data Layer:
• Prisma ORM
• Neon PostgreSQL Database
Component Relationships
a. Frontend Components:
• Activity tracking components
• Dashboard components
• User components
• Charts and analytics
• Connection to the API layer
b. Authentication Flow:
• NextAuth.js integration
• Google Authentication provider
• Session management
c. Data Flow:
• API routes → Prisma ORM → Neon PostgreSQL
• Validation layer with Zod
Specific Implementation Details
Technical aspects:
a. Frontend Architecture:
• Route structure (/app directory)
• Authentication routes
• Dashboard and activity management routes
• Component hierarchy
b. API Structure:
• RESTful endpoints for activities
• User management endpoints
• Authentication endpoints