A comprehensive full-stack project and task management system built with modern web technologies. TaskFlow provides an intuitive interface for managing projects, tasks, team members, and business workflows.
- Overview
- Features
- Tech Stack
- Prerequisites
- Quick Start
- Project Structure
- Environment Configuration
- Development
- Docker Deployment
- Database
- API Documentation
- Roadmap
- Contributing
- License
TaskFlow is a full-stack application designed to streamline project and task management. It consists of:
- Frontend: A modern React application with TypeScript and Vite for fast development
- Backend: A robust Node.js API with Express.js and PostgreSQL
- Database: PostgreSQL for reliable data persistence
- Infrastructure: Docker Compose for easy deployment and development
- Project Management: Create, organize, and manage multiple projects
- Task Management: Full CRUD operations for tasks with detailed tracking
- User Assignment: Assign team members to tasks with role-based permissions
- Task History: Track changes and history of tasks over time
- Business Management: Organize tasks within business units
- Reports: Generate reports on task progress and team performance
- Calendar View: Visualize tasks and deadlines in a calendar interface
- Kanban Board: Drag-and-drop interface for task management
- Type Safety: Full TypeScript implementation across frontend and backend
- Authentication: JWT-based authentication with secure password hashing
- Security: Helmet, CORS, rate limiting, SQL injection prevention
- Validation: Zod schema validation and express-validator
- API Documentation: Swagger/OpenAPI documentation
- Logging: Structured logging with Winston
- Testing: Jest testing framework
- Code Quality: ESLint and Prettier integration
- Hot Reload: Development server with instant refresh
- Responsive Design: Mobile-friendly UI with Tailwind CSS
- React 19 - UI library
- TypeScript - Type-safe development
- Vite - Next generation build tool
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- React Router - Client-side routing
- React Hook Form - Form management
- Axios - HTTP client
- Lucide React - Icon library
- Zod - Schema validation
- DnD Kit - Drag and drop functionality
- React Big Calendar - Calendar component
- Node.js - Runtime environment
- Express.js - Web framework
- TypeScript - Type-safe development
- PostgreSQL - Relational database
- JWT - Authentication tokens
- Bcrypt - Password hashing
- Zod - Schema validation
- Winston - Logging
- Jest - Testing framework
- Swagger - API documentation
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- PostgreSQL 15 - Database
- PgAdmin - Database management
- Node.js v20 or higher
- PostgreSQL v15 or higher (or Docker)
- npm or yarn
- Git
- Docker & Docker Compose (optional, for containerized deployment)
# Clone the repository
git clone https://github.com/josueguido/TaskFlow-App
cd TaskFlow-App
# Create environment file
cp .env.example .env
# Start the application
docker-compose up -d
# Access the application
# Frontend: http://localhost:5173
# Backend: http://localhost:3000
# Backend API Docs: http://localhost:3000/api-docscd backend
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Update .env with your database credentials
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=taskflow
# Run database migrations
psql -U postgres -d taskflow -f ../db/init.sql
psql -U postgres -d taskflow -f ../db/seed.sql
# Start development server
npm run dev
# Server runs on http://localhost:3000cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Application runs on http://localhost:5173TaskFlow-App/
βββ backend/ # Express.js API server
β βββ src/
β β βββ controllers/ # Route controllers
β β βββ models/ # Database models
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ schemas/ # Zod validation schemas
β β βββ middlewares/ # Custom middlewares
β β βββ interfaces/ # TypeScript interfaces
β β βββ config/ # Configuration files
β β βββ utils/ # Utility functions
β β βββ validators/ # Validation logic
β β βββ app.ts # Express app setup
β βββ tests/ # Test files
β βββ Dockerfile # Production Docker image
β βββ Dockerfile.dev # Development Docker image
β βββ jest.config.js # Jest configuration
β βββ tsconfig.json # TypeScript configuration
β βββ package.json # Dependencies
β
βββ frontend/ # React application
β βββ src/
β β βββ api/ # API client methods
β β βββ components/ # React components
β β βββ contexts/ # React Context API
β β βββ hooks/ # Custom React hooks
β β βββ services/ # Business logic services
β β βββ store/ # Zustand store
β β βββ types/ # TypeScript types
β β βββ utils/ # Utility functions
β β βββ assets/ # Static assets
β β βββ App.tsx # Main component
β β βββ main.tsx # Entry point
β βββ nginx/ # Nginx config for Docker
β βββ public/ # Static files
β βββ Dockerfile # Production Docker image
β βββ Dockerfile.dev # Development Docker image
β βββ vite.config.ts # Vite configuration
β βββ tsconfig.json # TypeScript configuration
β βββ package.json # Dependencies
β
βββ db/ # Database files
β βββ init.sql # Database initialization
β βββ seed.sql # Sample data
β
βββ infra/ # Infrastructure configuration
β βββ pgadmin/ # PgAdmin configuration
β
βββ docker-compose.yml # Development docker-compose
βββ docker-compose.prod.yml # Production docker-compose
βββ README.md # This file
The backend uses environment variables in two scenarios:
- Local Development (without Docker): Environment variables are loaded from
backend/config/DB/.env.dev - Docker Environment: Environment variables are passed through
docker-compose.ymland the root.envfile (no need to use config/DB/.env files)
The backend automatically detects the environment and loads the appropriate configuration:
// In backend/src/config/DB/index.ts
dotenv.config({
path: process.env.NODE_ENV === 'production'
? './config/DB/.env.production'
: './config/DB/.env.dev',
});# Server Configuration
NODE_ENV=development
PORT=3000
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=taskflow
DB_USERNAME=postgres
DB_PASSWORD=your_secure_password
# JWT Configuration
JWT_SECRET=your_jwt_secret
JWT_EXPIRATION=24h
# CORS Configuration
CORS_ORIGIN=http://localhost:5173
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Logging
LOG_LEVEL=debugVITE_API_URL=http://localhost:3000
VITE_API_BASE_PATH=/apicd backend
# Install dependencies
npm install
# Start development server with hot reload
npm run dev
# Run tests
npm run test
# Run linter
npm run lint
# Format code
npm run format
# Build for production
npm run buildcd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Stop and remove volumes
docker-compose down -v# Build and start with production configuration
docker-compose -f docker-compose.prod.yml up -d
# View logs
docker-compose -f docker-compose.prod.yml logs -f
# Stop services
docker-compose -f docker-compose.prod.yml down# View running containers
docker-compose ps
# Access backend logs
docker-compose logs backend
# Access frontend logs
docker-compose logs frontend
# Access database logs
docker-compose logs db
# Execute command in backend container
docker-compose exec backend npm run lint
# Connect to database
docker-compose exec db psql -U postgres -d taskflowThe application uses PostgreSQL with the following main entities:
- users - User accounts and authentication
- roles - User roles and permissions
- businesses - Business units
- projects - Project management
- tasks - Task tracking
- task_history - Task change history
- assignments - User-task assignments
- status - Task status definitions
- refresh_tokens - JWT token management
The database is automatically initialized using SQL scripts:
- 01-init.sql - Creates tables and schema
- 02-seed.sql - Populates sample data
Access PgAdmin at http://localhost:5050 (if running with Docker Compose)
# Backup database
docker-compose exec db pg_dump -U postgres taskflow > backup.sql
# Restore database
docker-compose exec -T db psql -U postgres taskflow < backup.sql
# Connect directly
psql -h localhost -U postgres -d taskflowOnce the backend is running, access the interactive API documentation:
http://localhost:3000/api-docs
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/refresh- Refresh JWT tokenPOST /api/auth/logout- Logout user
GET /api/users- Get all usersGET /api/users/:id- Get user by IDPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/projects- Get all projectsPOST /api/projects- Create projectGET /api/projects/:id- Get project by IDPUT /api/projects/:id- Update projectDELETE /api/projects/:id- Delete project
GET /api/tasks- Get all tasksPOST /api/tasks- Create taskGET /api/tasks/:id- Get task by IDPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete task
GET /api/assignments- Get all assignmentsPOST /api/assignments- Create assignmentDELETE /api/assignments/:id- Delete assignment
GET /api/reports- Generate reports
For complete API documentation, see the Backend README and the Swagger documentation.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Create a new branch from
mainordevelop - Make your changes
- Run tests and linting:
npm run test && npm run lint - Commit with meaningful messages
- Submit a Pull Request
- Follow the existing code style
- Use TypeScript for type safety
- Write tests for new features
- Keep commits atomic and meaningful
This project is licensed under the ISC License - see the LICENSE file for details.
TaskFlow is actively under development with the following planned features and improvements:
- β Project and task management
- β User authentication and authorization
- β Kanban board interface
- β Calendar view
- β Reporting and analytics
- β Team management
- π Enhanced error handling and validation
- β³ CI/CD Pipeline: GitHub Actions/GitLab CI for automated testing and deployment
- β³ Terraform: Infrastructure as Code for AWS resource management
- β³ AWS Deployment: Production deployment on AWS (EC2, RDS, S3)
- β³ Kubernetes: Container orchestration for scalable deployments
- β³ Observability: Monitoring, logging, and tracing (Prometheus, ELK Stack, Jaeger, cAdvisor)
- β³ Makefiles: Simplified development and deployment workflows
- β³ Real-time notifications and WebSocket support (Using SNS, SQS and EventBridge)
- β³ Advanced filtering and search capabilities
- β³ Custom workflows and automation
- β³ Integration with third-party services
- β³ Mobile app support
- β³ Audit logging and compliance features
Project Owner: Josue Guido Repository: https://github.com/josueguido/TaskFlow-App
For questions or suggestions, please open an issue on GitHub.
Last Updated: December 2024 Current Branch: fix-bugs