How zulkifli-dev/full-stack-school works
Project type and purpose
• This is a full-stack Next.js 13 web application serving as a School Management Dashboard (“Lama Dev School Management Dashboard”).
• It uses the App Router (src/app/…), a React component library (src/components/…), Prisma ORM (prisma/), and Docker for containerization.
File structure
• Top-level Docker files: Dockerfile, docker-compose.yml
• Configuration: ESLint, TypeScript (tsconfig.json), Tailwind, PostCSS, Next.js (next.config.mjs)
• Database schema & ORM: prisma/schema.prisma, migrations, seeds
• Application code:
• Frontend / Server components: src/app/… – pages for admin, teacher, student, parent, authentication
• Reusable UI components: src/components/…
• Shared logic: src/lib/…
• Middleware: src/middleware.ts (likely auth enforcement)
• No explicit microservices – a monolithic container comprising frontend and API.
README
• Confirms a Next.js development server (npm run dev) at port 3000
• No separate service descriptions, implying a single Next.js service connecting to a database.
Main components
a. Client Browser
b. Next.js Application Server
• App Router handling routes in src/app
• Server Components (data fetching + Prisma calls)
• Client Components (interactive UI from src/components)
• Middleware (auth checks)
c. Prisma ORM Layer (src/lib/prisma.ts)
d. PostgreSQL database (defined in docker-compose.yml)
e. (Optional) Authentication provider—e.g., NextAuth.js or custom sign-in page under src/app/[[...sign-in]]
f. Docker Network (orchestration between app and database)
Relationships and data flows
• Browser → HTTP request → Next.js Server
• Next.js Server → Middleware → Route Handler / Server Component → Prisma Client
• Prisma Client → SQL queries → PostgreSQL
• Database → query results → Prisma → Server Component → React Component → Browser
• Docker Compose network connects the Next.js container and the database container
Architectural patterns and design principles
• Monolith with a clear frontend/backend boundary provided by Next.js
• Component-based UI (atomic and form components under src/components)
• Database migrations and seeding via Prisma
• CSS utility classes via Tailwind
• Optional code-split by user role routes ((dashboard)/(admin), (teacher), (student), (parent))
Technologies and frameworks
• Next.js 13 (App Router, Server Components)
• React + TypeScript
• Prisma ORM + PostgreSQL
• Tailwind CSS, PostCSS
• Docker & docker-compose
• ESLint, tsconfig
Detailed breakdown of components
• Client Browser (HTTP + WebSocket if used in future)
• Next.js App Container
• App Router & Page Structure (src/app)
• UI Library (src/components)
• Shared logic (src/lib)
• Middleware (src/middleware.ts)
• Prisma ORM
• PostgreSQL Database
• Docker Compose Network