Skip to content

davidjosipovic/task-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TaskPilot πŸ“‹

A modern, full-stack project management application with Kanban boards, team collaboration, and secure authentication. Built with React, Node.js, GraphQL, and MongoDB.

πŸš€ Live Demo

Production: https://taskpilot.up.railway.app

  • Frontend: Railway (Docker)
  • Backend API: Railway (Docker)
  • Database: MongoDB Atlas

Tech Stack React TypeScript GraphQL MongoDB Docker

✨ Features

Core Features

  • πŸ” Secure Authentication - JWT-based auth with bcrypt password hashing
  • πŸ“Š Project Management - Create, organize, and archive projects
  • βœ… Kanban Board - Drag-and-drop task management (TODO β†’ DOING β†’ DONE)
  • 🎯 Task Management - Full CRUD with priority, due dates, and tags
  • 🏷️ Custom Tags - Color-coded tags for task organization
  • πŸ‘₯ Team Collaboration - Multi-user project access with proper authorization
  • πŸ“¦ Archive System - Archive projects with read-only mode
  • πŸŒ™ Dark Mode - Beautiful dark theme with smooth transitions
  • πŸ“± Fully Responsive - Mobile-first design with hamburger menu

Technical Features

  • οΏ½ Security Hardened - Helmet.js, rate limiting, input validation
  • οΏ½ Performance - Apollo Client caching, optimized queries
  • πŸ§ͺ Well Tested - Comprehensive test coverage with Jest & Vitest
  • οΏ½ Structured Logging - Winston logging with monitoring dashboard
  • 🐳 Production Ready - Docker deployment with health checks
  • ⚑ Modern Stack - React 19, Vite, TypeScript, GraphQL

πŸ› οΈ Tech Stack

Frontend

  • React 19 - Latest UI library
  • TypeScript - Type safety
  • Apollo Client - GraphQL state management
  • TailwindCSS 4 - Modern styling
  • React Router - Navigation
  • React DnD - Drag and drop functionality
  • Vite 7 - Lightning-fast build tool

Backend

  • Node.js 20 - Runtime
  • Express - Web framework
  • Apollo Server - GraphQL API
  • MongoDB + Mongoose - Database
  • TypeScript - Type safety
  • JWT - Authentication
  • Winston - Structured logging
  • Helmet - Security headers
  • Express Rate Limit - DDoS protection

DevOps

  • Docker - Containerization
  • Railway - Cloud deployment platform
  • MongoDB Atlas - Managed database
  • GitHub - Version control

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • MongoDB (or use Docker)

Local Development

  1. Clone the repository
git clone https://github.com/davidjosipovic/task-pilot.git
cd task-pilot
  1. Backend Setup
cd backend
npm install

# Create .env file
cat > .env << EOF
MONGO_URI=mongodb://localhost:27017/taskpilot
JWT_SECRET=dev_secret_key_for_local_development
PORT=4000
NODE_ENV=development
EOF

# Start backend
npm run dev

Backend runs on http://localhost:4000/graphql

  1. Frontend Setup
cd frontend
npm install

# Create .env file
cat > .env << EOF
VITE_API_URL=http://localhost:4000/graphql
EOF

# Start frontend
npm run dev

Frontend runs on http://localhost:5173

Docker Development

# Start MongoDB
docker run -d -p 27017:27017 --name mongodb mongo:latest

# Or use full Docker Compose setup (if available)
docker compose up

πŸ§ͺ Testing

# Backend tests
cd backend
npm test                # Run all tests
npm run test:watch      # Watch mode
npm run test:coverage   # Coverage report

# Frontend tests
cd frontend
npm test                # Run all tests
npm run test:ui         # Interactive UI

πŸ“ Project Structure

task-pilot/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/          # Mongoose models (User, Project, Task, Tag)
β”‚   β”‚   β”œβ”€β”€ resolvers/       # GraphQL resolvers
β”‚   β”‚   β”œβ”€β”€ schemas/         # GraphQL type definitions
β”‚   β”‚   β”œβ”€β”€ middleware/      # Auth, logging, CORS
β”‚   β”‚   β”œβ”€β”€ utils/           # Logger, dashboard handler
β”‚   β”‚   β”œβ”€β”€ plugins/         # Apollo plugins
β”‚   β”‚   └── __tests__/       # Backend tests
β”‚   β”œβ”€β”€ Dockerfile           # Production Docker build
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ context/         # Auth & Theme context
β”‚   β”‚   └── __tests__/       # Frontend tests
β”‚   β”œβ”€β”€ Dockerfile           # Production Docker build
β”‚   β”œβ”€β”€ server.cjs           # Production server
β”‚   └── package.json
β”‚
└── README.md

πŸ” Security Features

Implemented Security Measures

  • βœ… JWT Authentication - Secure token-based auth
  • βœ… Password Hashing - bcrypt with salt rounds
  • βœ… HTTP Security Headers - Helmet.js protection
  • βœ… Rate Limiting - 100 req/15min general, 5 req/15min auth
  • βœ… Input Validation - Email regex, password strength (8+ chars)
  • βœ… CORS Protection - Whitelist only Railway domains
  • βœ… Authorization Checks - Project membership validation
  • βœ… Session Management - Token refresh on login/logout
  • βœ… Environment Secrets - Required JWT_SECRET in production
  • βœ… SQL Injection Prevention - MongoDB parameterized queries

Security Best Practices

  • Passwords never logged or exposed
  • Sensitive data filtered from logs
  • HTTPS enforced in production
  • Health checks don't expose sensitive info
  • Docker runs as non-root user

οΏ½ API Documentation

GraphQL Endpoints

Queries

# User
getCurrentUser: User

# Projects
getProjects: [Project!]!              # Active projects
getArchivedProjects: [Project!]!      # Archived projects
getProject(id: ID!): Project

# Tasks & Tags
getTasksByProject(projectId: ID!): [Task!]!
getTagsByProject(projectId: ID!): [Tag!]!

Mutations

# Authentication
registerUser(name: String!, email: String!, password: String!): AuthPayload!
loginUser(email: String!, password: String!): AuthPayload!

# Projects
createProject(title: String!, description: String): Project!
deleteProject(id: ID!): Boolean!
archiveProject(id: ID!): Project!
unarchiveProject(id: ID!): Project!

# Tasks
createTask(projectId: ID!, title: String!, description: String, 
           priority: String, dueDate: String, tagIds: [ID!]): Task!
updateTask(id: ID!, title: String, description: String, 
           status: String, priority: String, dueDate: String, 
           tagIds: [ID!]): Task!
deleteTask(id: ID!): Boolean!

# Tags
createTag(projectId: ID!, name: String!, color: String): Tag!
updateTag(id: ID!, name: String, color: String): Tag!
deleteTag(id: ID!): Boolean!

🎨 UI/UX Features

  • Modern Design - Gradient backgrounds, smooth animations
  • Dark Mode - Full dark theme support with context persistence
  • Responsive Layout - Mobile hamburger menu, flexible grids
  • Drag & Drop - Intuitive Kanban board interaction
  • Loading States - Spinners, skeletons, optimistic updates
  • Empty States - Helpful messages and icons
  • Toast Notifications - Success/error feedback
  • Accessibility - ARIA labels, keyboard navigation

οΏ½ Logging & Monitoring

Log Levels

  • error - Critical errors
  • warn - Warnings and recoverable issues
  • info - Important events (login, CRUD operations)
  • debug - Detailed debugging info

Log Files (Backend)

backend/logs/
  β”œβ”€β”€ combined.log    # All logs
  └── error.log       # Errors only

Monitoring Dashboard

Access real-time logs and metrics:

Development: http://localhost:4000/monitoring
Production: https://your-backend.railway.app/monitoring

🚒 Deployment

Railway Deployment

This project is deployed on Railway using Docker.

Environment Variables Required

Backend (Railway)

MONGO_URI=mongodb+srv://user:[email protected]/dbname
JWT_SECRET=<generate-strong-random-32+-char-string>
NODE_ENV=production
PORT=<auto-provided-by-railway>

Frontend (Railway)

VITE_API_URL=https://your-backend.railway.app/graphql
PORT=<auto-provided-by-railway>

Deployment Process

  1. Push to GitHub main branch
  2. Railway auto-detects Dockerfile
  3. Builds Docker image with build args (VITE_API_URL for frontend)
  4. Deploys to production
  5. Health checks ensure service is running

πŸ”§ Available Scripts

Backend

npm run dev          # Development with hot reload (ts-node-dev)
npm start            # Production (node dist/index.js)
npm run build        # Compile TypeScript to JavaScript
npm test             # Run tests
npm run test:watch   # Tests in watch mode
npm run test:coverage # Coverage report

Frontend

npm run dev          # Vite dev server
npm run build        # Production build
npm run preview      # Preview production build
npm test             # Run tests
npm run test:ui      # Vitest UI

🐳 Docker

Development

# Start MongoDB
docker run -d -p 27017:27017 mongo:latest

Production (Railway)

# Multi-stage build with node:20-alpine
# Frontend: Build React β†’ Serve with 'serve' package
# Backend: Build TypeScript β†’ Run with Node.js

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Author

David Josipović

πŸ™ Acknowledgments

  • React DnD for drag-and-drop functionality
  • TailwindCSS for modern styling
  • Apollo GraphQL for powerful API layer
  • Railway for seamless deployment

⭐ If you find this project useful, please give it a star!

About

Full-stack project management app with Kanban board, deployed on AWS with complete CI/CD pipeline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published