A modern task management application with both web and desktop interfaces built with Go, PostgreSQL, and NATS messaging.
- Dual Interface: Web application and native desktop app
- Modern UI: Clean, responsive design with Fyne desktop framework
- Real-time Updates: NATS-powered messaging for instant sync
- Secure Authentication: JWT-based authentication system
- Task Management: Create, update, and organize tasks
- Docker Support: Full containerization for easy deployment
- Database: PostgreSQL for reliable data storage
- Go: 1.24 or higher
- PostgreSQL: 16 or higher
- NATS Server: 2.9 or higher
- Docker: 20.10 or higher (for containerized deployment)
- Task: Task runner for development tasks
# Install Task (if not already installed)
go install github.com/go-task/task/v3/cmd/task@latest
# Clone and set up
git clone <repository-url>
cd task-hub
# Create environment file (required)
cat > .env << EOF
PORT=8080
NATS_URL=nats://localhost:4222
JWT_SECRET=your_jwt_secret_key_at_least_32_characters
DB_HOST=localhost
DB_PORT=5432
DB_USER=taskhub
DB_PASSWORD=dev_password
DB_NAME=taskhub
EOF
# Start development services (PostgreSQL + NATS)
task run
# Run web version locally
task run-web
# Run desktop version locally
task run-desktop# Start all services with Docker Compose
task run
# Or directly with docker-compose
docker compose up -d# Install dependencies
go mod download
# Start PostgreSQL and NATS
docker run --name taskhub-postgres -e POSTGRES_USER=taskhub -e POSTGRES_PASSWORD=dev_password -e POSTGRES_DB=taskhub -p 5432:5432 -d postgres:16-alpine
docker run --name taskhub-nats -p 4222:4222 -d nats:2.9-alpine
# Run web application
go run cmd/main.go
# Run desktop application
go run cmd/desktop/main.gotask-hub/
βββ cmd/ # Application entry points
β βββ main.go # Web application
β βββ desktop/ # Desktop application
β βββ main.go # Desktop app entry point
βββ internal/ # Private application code
β βββ app/ # Application services (auth, tasks, etc.)
β βββ desktop/ # Desktop UI components and themes
β βββ domains/ # Domain models and business logic
β βββ gateway/ # External service integration
β βββ handler/ # HTTP handlers
βββ pkg/ # Public library code
β βββ base/entity/ # Base entity types
β βββ db/ # Database configuration
β βββ logger/ # Logging utilities
β βββ middleware/ # HTTP middleware
β βββ nats/ # NATS messaging
β βββ utils/ # Utility functions
βββ web/ # Web assets
β βββ static/ # CSS, JS, images
β βββ templates/ # HTML templates
βββ config/ # Configuration management
βββ docs/ # Documentation
βββ Taskfile.yml # Task runner configuration
βββ docker-compose.yml # Docker services
βββ Dockerfile # Web app container
βββ README.md
- Built with standard Go net/http and html/template
- HTMX for dynamic interactions
- Responsive CSS design
- RESTful API endpoints
- Built with Fyne cross-platform framework
- Modern Material Design-inspired theme
- Native desktop experience
- Same backend services as web version
The project uses Task for development automation. Available commands:
# Build and deployment
task build # Build web Docker image
task build-desktop # Build desktop Docker image
# Running applications
task run # Run web version with Docker
task run-web # Run web version locally
task run-desktop # Run desktop version locally
# Docker management
task down # Stop all services
task clean # Clean Docker images, volumes, containersPOST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/tasks- List user tasksPOST /api/tasks- Create new taskPUT /api/tasks/{id}- Update taskDELETE /api/tasks/{id}- Delete task
GET /- Dashboard (authenticated)GET /login- Login pageGET /register- Registration page
Create a .env file in the project root:
# Server
PORT=8080
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USER=taskhub
DB_PASSWORD=your_password
DB_NAME=taskhub
# Authentication
JWT_SECRET=your_jwt_secret_key_at_least_32_characters
# NATS
NATS_URL=nats://localhost:4222# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...The desktop application includes:
- Modern Theme: Indigo-based color scheme with proper contrast
- Enhanced Forms: Better layout, icons, and placeholders
- Responsive Design: Proper window sizing and scaling
- Professional Layout: Card-based components with visual hierarchy
- Native Experience: Platform-specific optimizations
# Build production images
docker build -t task-hub:latest .
docker build -f Dockerfile.desktop -t task-hub-desktop:latest .
# Deploy with Docker Compose
docker compose -f docker-compose.yml up -d# Start development environment
task run
# Run desktop app (native)
task run-desktop- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run tests and ensure they pass
- Submit a pull request
- Development Guide - Comprehensive development documentation
- API Documentation - API endpoint reference
- Architecture - System architecture overview
- Deployment - Deployment guide
-
Desktop app won't start on Mac M3/M4
- The desktop app runs natively (not in Docker) on Mac for proper GUI support
- Use
task run-desktopwhich starts services in Docker but runs the app natively
-
Database connection errors
- Ensure PostgreSQL is running:
docker ps | grep postgres - Check
.envconfiguration matches database settings
- Ensure PostgreSQL is running:
-
NATS connection issues
- Verify NATS is running:
docker ps | grep nats - Check NATS URL configuration
- Verify NATS is running:
For more troubleshooting, see the Development Guide.
This project is licensed under the MIT License - see the LICENSE file for details.
Task Hub - Modern task management for teams and individuals.