How 1711shashank/taskboards-app works
Project Type and Purpose
• Full-stack task management application
• Next.js 15 with built-in API routes serving as backend
• Client-side UI built with React, TypeScript and Tailwind CSS
• State management via Redux Toolkit
• Authentication using JWT and bcryptjs
• In-memory JSON storage for boards and tasks
Main Components
• Frontend (Client)
– Next.js App (pages under src/app)
– React components (src/components)
– Redux store (src/store) with authSlice, boardSlice, taskSlice
– UI modals, task lists, board cards, notifications
• API Layer (Server-side in Next.js)
– src/app/api/auth/login/route.ts
– src/app/api/auth/register/route.ts
– src/app/api/boards/route.ts and nested board/task routes
• Data Store
– In-memory JSON defined in src/lib/data.ts
• Auth Mechanism
– bcryptjs for hashing passwords
– JWT tokens issued at login/register
– Protected routes checking JWT
• External/Dev Tools
– ESLint, Tailwind CSS, PostCSS, Next.js config, shell scripts
Interactions and Data Flow
1. User opens browser → Next.js renders pages (SSR/CSR)
2. UI dispatches Redux action (e.g., login, fetch boards)
3. Redux middleware calls Next.js API route (/api/auth/login or /api/boards)
4. API route handler validates JWT or credentials, reads/writes src/lib/data.ts
5. Handler returns JSON response (data or error)
6. Redux reducer updates store → UI re-renders
Architectural Patterns and Design Principles
• Client-Server separation: UI vs API endpoints
• Single-page-app (SPA) like behavior using Next.js and Redux
• Serverless API functions (each file in src/app/api is an isolated handler)
• Layered design: UI → State → API → Data store
• Protected routes using middleware or hooks