Skip to content

gooduru-vineeth/task-board

Repository files navigation

πŸ“‹ Task Board Application

A modern, full-stack task board application built with Next.js 15, React 19, TypeScript, and PostgreSQL. This application provides a beautiful and intuitive interface for managing tasks, boards, and columns with drag-and-drop functionality.

Next.js React TypeScript Drizzle ORM

✨ Features

  • πŸ” Authentication System: JWT-based authentication with secure password hashing
  • πŸ“Š Multiple Boards: Create and manage multiple task boards
  • πŸ“ Task Management: Create, edit, and delete tasks with descriptions
  • βœ… Subtasks: Break down tasks into smaller, manageable subtasks
  • 🎨 Customizable Columns: Create custom columns with different colors
  • πŸ–±οΈ Drag & Drop: Intuitive drag-and-drop interface for task management
  • πŸŒ“ Dark Mode: Built-in dark mode support with next-themes
  • πŸ“± Responsive Design: Fully responsive UI that works on all devices
  • πŸš€ Server Actions: Utilizes Next.js 15 server actions for optimal performance
  • 🎯 Type-Safe: Full TypeScript support throughout the application

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • React 19 - Latest React with concurrent features
  • TypeScript 5 - Type-safe JavaScript
  • Tailwind CSS 4 - Utility-first CSS framework
  • Radix UI - Accessible component primitives
  • dnd-kit - Modern drag-and-drop toolkit
  • React Hook Form - Performant form validation
  • Zod - TypeScript-first schema validation
  • Sonner - Beautiful toast notifications
  • Lucide React - Icon library

Backend

  • Next.js API Routes - RESTful API endpoints
  • Drizzle ORM - TypeScript ORM for PostgreSQL
  • PostgreSQL - Relational database
  • JWT - JSON Web Tokens for authentication
  • bcryptjs - Password hashing
  • Pino - Fast JSON logger

Architecture Pattern

  • Repository Pattern - Data access layer abstraction
  • Controller Pattern - Business logic separation
  • Service Layer - Reusable business logic
  • Type-Safe API - End-to-end type safety

πŸ“ Project Structure

task-board/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ actions/                  # Server actions
β”‚   β”‚   └── auth.ts              # Authentication actions
β”‚   β”œβ”€β”€ api/                     # API routes
β”‚   β”‚   β”œβ”€β”€ boards/              # Board endpoints
β”‚   β”‚   β”œβ”€β”€ columns/             # Column endpoints
β”‚   β”‚   β”œβ”€β”€ tasks/               # Task endpoints
β”‚   β”‚   └── subtasks/            # Subtask endpoints
β”‚   β”œβ”€β”€ auth/                    # Authentication pages
β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   └── register/
β”‚   β”œβ”€β”€ dashboard/               # Main dashboard
β”‚   β”œβ”€β”€ layout.tsx               # Root layout
β”‚   └── page.tsx                 # Home page
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ dashboard/               # Dashboard-specific components
β”‚   β”‚   β”œβ”€β”€ board-view.tsx
β”‚   β”‚   β”œβ”€β”€ column-view.tsx
β”‚   β”‚   β”œβ”€β”€ header.tsx
β”‚   β”‚   β”œβ”€β”€ sidebar.tsx
β”‚   β”‚   └── task-card.tsx
β”‚   β”œβ”€β”€ modals/                  # Modal dialogs
β”‚   β”‚   β”œβ”€β”€ board-modal.tsx
β”‚   β”‚   β”œβ”€β”€ column-modal.tsx
β”‚   β”‚   β”œβ”€β”€ task-modal.tsx
β”‚   β”‚   β”œβ”€β”€ task-details-modal.tsx
β”‚   β”‚   └── delete-modal.tsx
β”‚   β”œβ”€β”€ ui/                      # Reusable UI components
β”‚   └── providers.tsx            # App providers
β”œβ”€β”€ controllers/                  # Business logic controllers
β”‚   β”œβ”€β”€ board.controller.ts
β”‚   β”œβ”€β”€ column.controller.ts
β”‚   β”œβ”€β”€ task.controller.ts
β”‚   β”œβ”€β”€ subtask.controller.ts
β”‚   └── index.ts
β”œβ”€β”€ repositories/                 # Data access layer
β”‚   β”œβ”€β”€ board.repository.ts
β”‚   β”œβ”€β”€ column.repository.ts
β”‚   β”œβ”€β”€ task.repository.ts
β”‚   β”œβ”€β”€ subtask.repository.ts
β”‚   └── user.repository.ts
β”œβ”€β”€ db/                          # Database configuration
β”‚   β”œβ”€β”€ schemas/                 # Database schemas
β”‚   β”‚   β”œβ”€β”€ users.schema.ts
β”‚   β”‚   β”œβ”€β”€ boards.schema.ts
β”‚   β”‚   β”œβ”€β”€ columns.schema.ts
β”‚   β”‚   β”œβ”€β”€ tasks.schema.ts
β”‚   β”‚   β”œβ”€β”€ subtasks.schema.ts
β”‚   β”‚   β”œβ”€β”€ relations.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ schema.ts               # Schema exports
β”‚   └── index.ts                # Database connection
β”œβ”€β”€ hooks/                       # Custom React hooks
β”‚   β”œβ”€β”€ use-boards.ts
β”‚   β”œβ”€β”€ use-columns.ts
β”‚   β”œβ”€β”€ use-tasks.ts
β”‚   └── use-subtasks.ts
β”œβ”€β”€ lib/                        # Utility libraries
β”‚   β”œβ”€β”€ auth.ts                 # Server-side auth
β”‚   β”œβ”€β”€ auth-client.ts          # Client-side auth
β”‚   β”œβ”€β”€ jwt.ts                  # JWT utilities
β”‚   β”œβ”€β”€ logger.ts               # Logging utilities
β”‚   β”œβ”€β”€ types.ts                # TypeScript types
β”‚   β”œβ”€β”€ utils.ts                # Helper functions
β”‚   └── validations.ts          # Zod schemas
β”œβ”€β”€ scripts/                    # Utility scripts
β”‚   └── seed.ts                # Database seeding
β”œβ”€β”€ drizzle.config.ts          # Drizzle ORM config
β”œβ”€β”€ middleware.ts              # Next.js middleware
β”œβ”€β”€ next.config.ts             # Next.js configuration
β”œβ”€β”€ package.json               # Dependencies
β”œβ”€β”€ tailwind.config.ts         # Tailwind configuration
└── tsconfig.json              # TypeScript configuration

πŸš€ Quick Start

See QUICKSTART.md for detailed setup instructions.

Prerequisites

  • Node.js 20.x or higher
  • PostgreSQL 14.x or higher
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone <repository-url>
    cd task-board
  2. Install dependencies

    npm install
  3. Setup environment variables

    cp .env.example .env.local

    Edit .env.local and add your database URL:

    DATABASE_URL=postgresql://user:password@localhost:5432/taskboard
    JWT_SECRET=your-secret-key-here
  4. Setup database

    # Generate migrations
    npm run db:generate
    
    # Push schema to database
    npm run db:push
    
    # (Optional) Seed with sample data
    npm run db:seed
  5. Run development server

    npm run dev
  6. Open your browser Navigate to http://localhost:3000

πŸ“– Documentation

πŸ—οΈ Architecture Overview

This application follows a clean, layered architecture:

  1. Presentation Layer (Components & Pages)

    • React components with TypeScript
    • Custom hooks for state management
    • Form handling with React Hook Form
  2. API Layer (Next.js API Routes)

    • RESTful endpoints
    • Authentication middleware
    • Request validation with Zod
  3. Controller Layer

    • Business logic orchestration
    • Data transformation
    • Error handling
  4. Repository Layer

    • Database operations
    • Query abstraction
    • Data access patterns
  5. Database Layer

    • PostgreSQL with Drizzle ORM
    • Type-safe queries
    • Relational data modeling

For detailed architecture information, see ARCHITECTURE.md.

πŸ”’ Authentication

The application uses JWT (JSON Web Tokens) for authentication:

  • Server-side: Validates tokens in API routes
  • Client-side: Stores tokens in localStorage
  • Token expiration: 7 days
  • Password hashing: bcryptjs with salt rounds of 10

πŸ—„οΈ Database Schema

The database consists of 5 main tables:

  • users - User accounts
  • boards - Task boards
  • columns - Board columns
  • tasks - Tasks within columns
  • subtasks - Subtasks within tasks

All relationships are enforced at the database level with foreign keys and cascade deletes.

πŸ“ Available Scripts

npm run dev          # Start development server with Turbopack
npm run build        # Build for production
npm run start        # Start production server
npm run db:generate  # Generate Drizzle migrations
npm run db:migrate   # Run migrations
npm run db:push      # Push schema to database
npm run db:studio    # Open Drizzle Studio (database GUI)
npm run db:seed      # Seed database with sample data

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

πŸ“§ Support

For support, email gooduru.vineeth@gmail.com or open an issue in the repository.


Made with ❀️ using Next.js and React

About

A modern, full-stack task board application built with Next.js 15, React 19, TypeScript, and PostgreSQL. This application provides a beautiful and intuitive interface for managing tasks, boards, and columns with drag-and-drop functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors