A full-stack distributed task management system built with Go microservices backend and Next.js frontend.
┌─────────────┐
│ Client │
└──────┬──────┘
│
▼
┌─────────────────┐
│ API Gateway │ (Port 8080)
└────────┬─────────┘
│
┌────┴────┬──────────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌──────────────┐
│ Task │ │ User │ │ Notification │
│Service │ │Service │ │ Service │
│ :8081 │ │ :8082 │ │ :8083 │
└───┬────┘ └───┬────┘ └──────┬───────┘
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌──────────────┐
│Task DB│ │User DB │ │Notification │
│ :5433 │ │ :5434 │ │ DB :5435 │
└────────┘ └────────┘ └──────────────┘
- API Gateway (
cmd/api-gateway/) - Port 8080 - Task Service (
cmd/task-service/) - Port 8081 - User Service (
cmd/user-service/) - Port 8082 - Notification Service (
cmd/notification-service/) - Port 8083 - Project Service (
cmd/project-service/) - Port 8084 - Team Service (
cmd/team-service/) - Port 8085 - Document Service (
cmd/document-service/) - Port 8086 - Chat Service (
cmd/chat-service/) - Port 8087
Backend:
- Go 1.21+
- PostgreSQL 15
- Gin-Gonic
- Docker & Docker Compose
Frontend:
- Next.js 16
- TypeScript
- React 19
- Tailwind CSS
- shadcn/ui
TaskAPP/
├── cmd/ # Microservices entry points
├── internal/ # Service logic (handler, service, repository)
├── pkg/ # Shared packages (database, config, middleware)
├── taskapp/ # Next.js frontend
├── docker-compose.yml
└── Dockerfile.*
-
Start all services:
docker-compose up --build
-
Verify services:
docker-compose ps
-
Check logs:
docker-compose logs -f [service-name]
-
Set environment variables (see
env.example) -
Run services:
go run cmd/task-service/main.go go run cmd/user-service/main.go go run cmd/notification-service/main.go go run cmd/api-gateway/main.go
-
Navigate to frontend:
cd taskapp npm install -
Set environment variables: Create
.env.local:NEXT_PUBLIC_API_URL=http://localhost:8080 -
Run development server:
npm run dev
All requests go through the API Gateway at http://localhost:8080.
POST /users/register- Register new userPOST /users/login- User loginGET /users- Get all usersGET /users/:id- Get user by ID
GET /tasks- Get all tasksGET /tasks/:id- Get task by IDPOST /tasks- Create taskPUT /tasks/:id- Update taskDELETE /tasks/:id- Delete task
POST /notifications- Create notificationGET /notifications/:userId- Get notifications by user
GET /health- Service health status
Tasks:
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
status VARCHAR(50) NOT NULL DEFAULT 'pending',
user_id INTEGER NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);Users:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(100) NOT NULL UNIQUE,
email VARCHAR(255) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);Notifications:
CREATE TABLE notifications (
id SERIAL PRIMARY KEY,
user_id INTEGER NOT NULL,
message TEXT NOT NULL,
task_id INTEGER,
read BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);Build services:
go build -o bin/task-service ./cmd/task-service
go build -o bin/user-service ./cmd/user-service
go build -o bin/notification-service ./cmd/notification-service
go build -o bin/api-gateway ./cmd/api-gatewayRun tests:
go test ./...Stop services:
docker-compose down- Port conflicts: Change PORT environment variable
- Database errors: Verify PostgreSQL is running and credentials are correct
- Service unreachable: Check Docker network configuration