Skip to content

aialvi/nextjs-nodejs-project-manager

Repository files navigation

Project Manager

A production-grade, microservices-based project management tool inspired by Linear and Jira. Built with Node.js, Express, Next.js 15, PostgreSQL, Redis, and Socket.io.

Features

  • Kanban Board - Drag-and-drop task management with dnd-kit
  • Real-time Updates - Socket.io for live collaboration
  • AI-Powered - Claude API for task description and subtask generation
  • Notifications - Email and in-app notifications
  • Activity Feed - Audit log with infinite scroll
  • RBAC - Role-based access control (admin, member, viewer)
  • Metrics - Prometheus + Grafana monitoring

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         Nginx (443)                             │
└──────────────────────────────┬──────────────────────────────────┘
                               │
        ┌──────────────────────┼──────────────────────┐
        │                      │                      │
        ▼                      ▼                      ▼
┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  Next.js 15  │     │ API Gateway  │     │  Socket.io   │
│    (Web)     │────▶│   (Port 80)  │────▶│  (Realtime)  │
│    Port 3005 │     │    Port 80   │     │   Port 3004  │
└──────────────┘     └──────┬───────┘     └──────────────┘
                            │
        ┌───────────────────┼───────────────────┐
        │                   │                   │
        ▼                   ▼                   ▼
┌──────────────┐   ┌──────────────┐   ┌──────────────┐
│ Auth Service │   │Task Service  │   │ AI Service   │
│   Port 3001  │   │  Port 3002   │   │  Port 3003   │
└──────┬───────┘   └──────┬───────┘   └──────────────┘
       │                   │
       ▼                   ▼
┌──────────────┐   ┌──────────────┐
│  PostgreSQL  │   │    Redis     │
│   Port 5432  │   │   Port 6379  │
└──────────────┘   └──────────────┘

Services

Service Port Description
api-gateway 3000 Reverse proxy with rate limiting
auth-service 3001 Authentication, JWT, RBAC
task-service 3002 Tasks, projects, labels
ai-service 3003 Claude AI integration
realtime-worker 3004 Socket.io server
notification-worker 3005 Email notifications
audit-worker 3006 Activity logging
web 3005 Next.js 15 frontend

Tech Stack

Backend

  • Node.js 20 + TypeScript
  • Express.js - Web framework
  • PostgreSQL + Prisma - Database
  • Redis - Cache, sessions, queues, pub/sub
  • Socket.io - Real-time communication
  • BullMQ - Job queues
  • JWT - Authentication
  • Prometheus - Metrics

Frontend

  • Next.js 15 - React framework
  • TypeScript
  • TanStack Query v5 - Data fetching
  • shadcn/ui - UI components
  • Tailwind CSS - Styling
  • dnd-kit - Drag and drop
  • Zod - Validation

Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • pnpm (optional)

1. Clone the repository

git clone <repository-url>
cd project-management

2. Copy environment files

cp .env.example .env

3. Start with Docker Compose

docker-compose up -d

This starts all services including PostgreSQL, Redis, Prometheus, and Grafana.

4. Access the application

Development

Running services locally

# Install dependencies
pnpm install

# Start PostgreSQL and Redis
docker-compose up postgres redis -d

# Run services (each in separate terminal)
pnpm --filter api-gateway dev
pnpm --filter auth-service dev
pnpm --filter task-service dev
pnpm --filter ai-service dev
pnpm --filter web dev

Database migrations

cd services/auth-service
pnpm prisma:migrate

cd ../task-service
pnpm prisma:migrate

Seeding the database

cd services/auth-service
pnpm prisma db seed

Testing

# Run tests for a service
cd services/auth-service
pnpm test

# Run tests with coverage
pnpm test:coverage

Environment Variables

Variable Description Default
POSTGRES_USER PostgreSQL user projectmanager
POSTGRES_PASSWORD PostgreSQL password -
POSTGRES_DB PostgreSQL database projectmanager
REDIS_PASSWORD Redis password -
JWT_ACCESS_SECRET JWT access token secret -
JWT_REFRESH_SECRET JWT refresh token secret -
ANTHROPIC_API_KEY Claude API key -
SMTP_HOST SMTP server for emails -

Monitoring

All services expose a /metrics endpoint for Prometheus scraping.

Grafana Dashboard: Import monitoring/grafana-dashboard.json

  • Request rate, latency, errors
  • Authentication events
  • Cache hit/miss ratio
  • AI token usage
  • CPU, memory per service

Production Deployment

  1. Build Docker images
docker-compose build
  1. Set strong secrets
JWT_ACCESS_SECRET=$(openssl rand -base64 32)
JWT_REFRESH_SECRET=$(openssl rand -base64 32)
  1. Configure reverse proxy (nginx included)

  2. Enable HTTPS with Let's Encrypt or similar

License

MIT

About

A production-grade, microservices-based project management tool built with Node.js, Express, Next.js, PostgreSQL, Redis, and Socket.io. Features real-time collaboration, BullMQ event workers, Kanban boards, and AI assistance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors