A modern, fast, and intuitive collaborative project management platform that enables teams to create projects, assign tasks, track progress, and manage team members with real-time synchronization. Built with cutting-edge technologies for optimal performance and user experience.
- Overview
- Key Features
- Tech Stack
- Project Structure
- Getting Started
- Environment Configuration
- Usage Guide
- Architecture
- Database Schema
- API Actions
- Authentication & Authorization
- Performance Optimization
- Security & Firestore Rules
- Deployment
- Contributing
- Troubleshooting
- License
TaskFlow is a comprehensive project management solution designed for modern teams. It provides a seamless interface for creating and managing projects, assigning tasks, collaborating with team members, and tracking project progress with real-time analytics. The platform emphasizes user experience with smooth animations, intuitive interfaces, and responsive design across all devices.
- β Real-time Collaboration β Instant updates across all team members
- β Intuitive UI/UX β Beautiful, animated interface with smooth interactions
- β Mobile Responsive β Works seamlessly on desktop, tablet, and mobile
- β Scalable Architecture β Built on Firebase for unlimited scalability
- β Role-Based Access β Granular permission controls for secure teamwork
- β Production-Ready β Enterprise-grade security and performance optimization
- Create and manage multiple projects within your workspace
- Add detailed project descriptions and metadata
- View all projects you're a member of with quick stats
- Track project creation and ownership
- Delete projects (admin only)
- Organize tasks across three intuitive statuses: To Do, In Progress, and Done
- Create tasks with rich details:
- Task title and comprehensive description
- Priority levels: Low, Medium, High, Urgent
- Due dates with automatic overdue detection
- Task assignment to team members
- Creator tracking for audit purposes
- Visual priority indicators with color-coded borders
- Status-based filtering and organization
- Kanban-style drag-and-drop interface
- Task completion tracking
- Invite team members to projects
- Assign tasks to specific team members
- View team member profiles and contact information
- Member activity and contribution tracking
- Role-based team management
- Admin Role: Full project control, member management, task creation/deletion
- Member Role: Can create and update tasks, view project details
- Granular permission system enforced at both application and database levels
- Secure role validation on all sensitive operations
- Real-time statistics overview:
- Total active projects
- Total team members across all projects
- Active and completed tasks
- Team productivity metrics
- Visual stat cards with icons and animated counters
- Quick project overview with member and task counts
- Done task percentage tracking
- Email/Password registration and login
- Google OAuth integration for seamless single sign-on
- Secure password validation (minimum 6 characters)
- User profile management with full names and avatars
- Session persistence with secure cookies
- Automatic profile creation on signup
- Firebase Firestore for instant data synchronization
- Live task status updates across all team members
- Automatic UI refresh on data changes
- Optimistic updates for smooth user experience
- Efficient caching strategy with Next.js revalidation
- Dark theme with carefully designed color palette
- Smooth Framer Motion animations throughout
- Responsive design for all screen sizes
- Accessible components and typography
- Intuitive navigation with sidebar and header
- Loading states and error handling
- Glassmorphic design elements
- Framework: Next.js 15 (App Router) β Latest React-based framework with server components
- UI Library: React 19 β Modern, efficient component library
- Language: TypeScript 5 β Type-safe development
- Styling:
- Tailwind CSS β Utility-first CSS framework
- CSS Variables β Custom design system
- Inline Styles (React) β Dynamic styling
- Animations: Framer Motion 11.15 β Industry-leading animation library
- Icons:
- Lucide React β Beautiful SVG icon library
- Heroicons β Tailwind UI icons
- Authentication: Firebase Authentication β Secure user management
- Database: Firebase Firestore β Real-time NoSQL database
- Server Actions: Next.js Server Actions β Direct backend logic in components
- Type Safety: Firebase TypeScript SDK
- Package Manager: npm
- Linting: ESLint 9
- Build Optimization: Next.js Bundle Analyzer
- PostCSS: CSS processing and autoprefixing
- Font: Inter from Google Fonts
- Performance: Optimized bundle size with experimental optimizePackageImports
task-manager/
βββ app/ # Next.js App Router directory
β βββ globals.css # Global styles and CSS variables
β βββ layout.tsx # Root layout with auth provider
β βββ page.tsx # Landing page
β βββ actions/ # Server actions
β β βββ auth.ts # Authentication actions
β β βββ projects.ts # Project management actions
β β βββ tasks.ts # Task management actions
β βββ api/ # API routes
β β βββ projects/
β β βββ add-member/ # Add team member endpoint
β βββ auth/ # Authentication pages
β β βββ login/page.tsx # Login page
β β βββ signup/page.tsx # Registration page
β βββ dashboard/ # Authenticated dashboard
β βββ layout.tsx # Dashboard layout with sidebar
β βββ loading.tsx # Loading UI skeleton
β βββ page.tsx # Dashboard homepage (analytics)
β βββ projects/ # Projects section
β β βββ page.tsx # All projects list
β β βββ new/page.tsx # Create new project
β β βββ [id]/ # Individual project pages
β β βββ page.tsx # Project board (Kanban)
β β βββ loading.tsx # Project loading state
β βββ settings/ # User settings page
β βββ page.tsx
β
βββ components/ # Reusable React components
β βββ Header.tsx # Top navigation header
β βββ Sidebar.tsx # Navigation sidebar
β βββ AnimatedButton.tsx # Animated button component
β βββ AnimatedCard.tsx # Animated card container
β βββ AnimatedContainer.tsx # Generic animation wrapper
β βββ AnimatedList.tsx # Animated list component
β
βββ lib/ # Utility libraries and hooks
β βββ cssVars.ts # CSS variable exports
β βββ transitions.ts # Animation configurations
β βββ firebase/ # Firebase integration
β βββ auth.ts # Authentication functions
β βββ config.ts # Firebase configuration
β βββ firestore.ts # Firestore database functions
β βββ projects.ts # Project-specific functions
β βββ tasks.ts # Task-specific functions
β βββ cache.ts # Caching utilities
β βββ AuthContext.tsx # React context for auth state
β βββ types.ts # TypeScript interfaces
β
βββ middleware.ts # Next.js middleware (auth guard)
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ postcss.config.mjs # PostCSS configuration
βββ firestore.rules # Firestore security rules
βββ package.json # Project dependencies
βββ README.md # This file
- Node.js 18.17+ or later
- npm 9+ or later
- A Firebase account
- A code editor (VS Code recommended)
git clone https://github.com/yourusername/task-manager.git
cd task-managernpm installVisit Firebase Console:
- Create a new project or select an existing one
- Navigate to Authentication:
- Enable Email/Password provider
- Enable Google provider (optional but recommended)
- Navigate to Firestore Database:
- Create a new Firestore database in production mode
Visit Firebase Console:
- Create a new project or select an existing one
- Navigate to Authentication:
- Enable Email/Password provider
- Enable Google provider (optional but recommended)
- Navigate to Firestore Database:
- Create a new Firestore database in production mode
- Set region to closest location
- Copy your Firebase configuration
Create a .env.local file in the project root:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_idIn Firebase Console, go to Firestore Database β Rules and replace with content from firestore.rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can read/update their own profiles
match /users/{userId} {
allow read: if request.auth != null;
allow create, update: if request.auth.uid == userId;
}
// Authenticated users can manage projects
match /projects/{projectId} {
allow read, create, update, delete: if request.auth != null;
}
// Authenticated users can manage members
match /project_members/{membershipId} {
allow read, create, update, delete: if request.auth != null;
}
// Authenticated users can manage tasks
match /tasks/{taskId} {
allow read, create, update, delete: if request.auth != null;
}
}
}
npm run devOpen http://localhost:3000 in your browser.
- Sign Up: Create an account using email or Google
- Access Dashboard: You'll land on the main dashboard with analytics
- Create Project: Click "New Project" button
- Fill Details: Enter project name and description
- Confirm: Project is created with you as admin
- Open Project: Select a project from your projects list
- Create Task: Click "Add Task" button in Kanban board
- Fill Task Details:
- Title (required)
- Description (optional)
- Priority level (Low/Medium/High/Urgent)
- Due date (optional)
- Assign to team member
- Update Status: Drag task between columns or use dropdown
- View Details: Click task card to see full details and make edits
- Invite Members: In project settings, add member email addresses
- Set Roles: Assign Admin or Member role
- Assign Tasks: Create tasks and assign to team members
- Track Progress: Monitor task completion in real-time
- View Analytics: Check dashboard for team productivity metrics
- Overview Stats: See total projects, members, and tasks at a glance
- Quick Actions: Create new projects or access recent ones
- Task Summary: View task completion rates and distribution
- Member List: See all team members across projects
User Request
β
Middleware (Auth Guard)
β
Next.js Route Handler
β
Server Action (if applicable)
β
Firebase Authentication/Firestore
β
Response β Client Component β React Rendering β Animation
- Page Components: Handle routing and data fetching
- Layout Components: Provide consistent structure (Header, Sidebar)
- Animated Components: Reusable animation wrappers
- Server Actions: Handle backend logic without API routes
- React Context API: Authentication state via
AuthContext - Server State: Firebase Firestore as source of truth
- Client State: React
useStatefor UI interactions - Cache Strategy: Next.js
revalidatePathfor automatic refresh
- Firebase listeners automatically update components
- Optimistic updates for better UX
- Conflict resolution through timestamps
- Efficient data fetching with indexed queries
Stores user profile information.
{
id: string (user UID)
email: string
fullName: string
avatarUrl: string | null
createdAt: Timestamp
updatedAt: Timestamp
}Stores project metadata.
{
id: string
name: string
description: string
createdBy: string (user UID)
createdAt: Timestamp
updatedAt: Timestamp
}Junction collection linking users to projects with roles.
{
id: string
projectId: string
userId: string (user UID)
role: 'admin' | 'member'
joinedAt: Timestamp
}Stores task information linked to projects.
{
id: string
projectId: string
title: string
description: string
status: 'todo' | 'in_progress' | 'done'
priority: 'low' | 'medium' | 'high' | 'urgent'
dueDate: Timestamp | null
assignedTo: string | null (user UID)
createdBy: string (user UID)
createdAt: Timestamp
updatedAt: Timestamp
}signOut() β Promise<void>
// Signs out current user and clears auth tokencreateProject(name: string, description: string)
β Promise<{ data?: Project; error?: string }>
// Creates new project with authenticated user as admin
getProjects()
β Promise<Project[]>
// Fetches all projects for current user with stats
getProject(id: string)
β Promise<Project | null>
// Fetches single project with members and taskscreateTask(projectId, title, description, priority, dueDate, assignedTo)
β Promise<{ data?: Task; error?: string }>
// Creates new task in project
getTasks(projectId: string)
β Promise<Task[]>
// Fetches all tasks for a project
updateTaskStatus(taskId, status, projectId)
β Promise<{ success?: boolean; error?: string }>
// Updates task status (used for Kanban drag-drop)
updateTask(taskId, projectId, updates)
β Promise<{ success?: boolean; error?: string }>
// Updates task details (title, description, priority, etc)
deleteTask(taskId, projectId)
β Promise<{ success?: boolean; error?: string }>
// Deletes a task from project- Registration: User creates account with email/password or Google
- Profile Creation: User profile automatically created in Firestore
- Token Storage: Firebase session stored in secure cookie
- Middleware Check: Every request validated via middleware
- Context Provider: Auth state managed globally via React Context
- Project Level: Role-based (Admin/Member)
- Task Level: Created by users can edit own tasks
- Database Level: Firestore rules enforce access
- UI Level: Features hidden/disabled based on role
| Action | Admin | Member |
|---|---|---|
| Create Project | β | β |
| Delete Project | β | β |
| Add Team Members | β | β |
| Create Task | β | β |
| Update Task | β | β |
| Delete Task | β | β * |
| Update Project | β | β |
| View Analytics | β | β |
*Members can only delete own tasks
- Next.js Image: Automatic image optimization
- Code Splitting: Route-based automatic code splitting
- Memoization: React
memofor component optimization - Lazy Loading: Components loaded on demand
- Tree Shaking: Unused code automatically removed
- Package Import Optimization: Framer Motion & Firebase imports optimized
- CSS Optimization: Tailwind purges unused styles
- Indexes: Firestore queries indexed for fast retrieval
- Query Batching: Multiple documents fetched efficiently
- Caching: Next.js revalidation reduces unnecessary queries
- Denormalization: Common data cached at document level
- Server Actions: Direct database calls without HTTP overhead
- Streaming: Partial page rendering while data loads
- Compression: Automatic gzip compression
The application uses fine-grained Firestore security rules:
- Users: Read by any authenticated user, write only own profile
- Projects: Read by authenticated users, create by any, delete by any
- ProjectMembers: Full access to authenticated users (app enforces roles)
- Tasks: Full access to authenticated users (app enforces access)
β Authentication Required: All protected routes validate auth token β Input Validation: Server-side validation on all actions β Environment Variables: Sensitive config in .env.local β Password Security: Minimum 6 characters enforced β Cookie Security: SameSite=Lax for CSRF protection β SSL/TLS: Enforced in production β Data Encryption: Firebase handles at-rest encryption
Railway provides a simple, modern deployment experience perfect for Next.js applications.
-
Push to GitHub: Ensure code is in a GitHub repository
git add . git commit -m "Ready for deployment" git push origin main
-
Connect Railway to GitHub:
- Visit railway.app
- Click "New Project"
- Select "Deploy from GitHub"
- Authorize Railway with your GitHub account
- Select your repository
-
Configure Environment Variables:
- In Railway project dashboard, go to Variables
- Add all Firebase keys:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
-
Deploy:
- Railway automatically builds and deploys on push to main
- View deployment URL in Railway dashboard
- Domain format:
project-name-production.up.railway.app
-
Configure Custom Domain (Optional):
- Go to Settings β Custom Domain
- Add your domain and update DNS records
- Railway provides SSL/TLS automatically
If you prefer Vercel, here's the setup:
-
Push to GitHub: Ensure code is in a GitHub repository
git add . git commit -m "Ready for deployment" git push origin main
-
Connect to Vercel:
- Visit vercel.com
- Click "New Project"
- Import GitHub repository
- Select task-manager project
-
Configure Environment Variables:
- Go to Settings β Environment Variables
- Add all Firebase keys from
.env.local
-
Deploy:
- Vercel automatically deploys on push to main
- View deployment at
your-project.vercel.app
# Using Firebase CLI (for both Railway and Vercel)
npm install -g firebase-tools
firebase login
firebase init # Select Firestore
firebase deploy- Firebase project in production mode
- All environment variables configured in deployment platform
- Firestore security rules deployed
- Custom domain configured (optional)
- Monitoring enabled in deployment dashboard
- Error tracking configured
- Backup strategy established
- Database automated backups enabled
- SSL/TLS certificate active
We welcome contributions from the community!
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
- Follow TypeScript strict mode
- Use meaningful variable names
- Add comments for complex logic
- Format code with Prettier
- Test before submitting PR
Use GitHub Issues to report bugs:
- Describe the issue clearly
- Include steps to reproduce
- Provide environment details
- Attach screenshots if applicable
Solution: Ensure .env.local is configured with correct Firebase keys. Restart dev server.
Solution: Check browser cookies are enabled. Verify SameSite=Lax in auth middleware.
Solution:
- Verify Firestore rules are deployed
- Check database has correct data
- Ensure user has proper permissions
Solution:
- Check Framer Motion is installed:
npm list framer-motion - Verify
'use client'directive in animated components - Check browser supports CSS transforms
Solution:
- Run
npm run lintto see all errors - Next.js ignores build errors by default (next.config.ts)
- Add
// @ts-ignorefor deliberate overrides
Solution:
- Check Supabase URL is in
remotePatternsin next.config.ts - Verify image URL is HTTPS
- Check CORS headers if external source
Slow Page Load:
- Check Network tab in DevTools
- Verify Firestore queries are indexed
- Enable caching strategy
High Bundle Size:
- Analyze with
npm run bundle-analyze - Remove unused dependencies
- Check for duplicate packages
- Documentation: Check Next.js, Firebase, React docs
- Community: Ask on Stack Overflow with tags
nextjs,firebase,typescript - Issues: Search existing GitHub issues for solutions
# Development
npm run dev # Start dev server on :3000
# Production
npm run build # Build for production
npm start # Start production server
# Code Quality
npm run lint # Run ESLint
npm run clean # Clean .next & cache
npm run rebuild # Full clean rebuild
# Analysis
npm run bundle-analyze # Analyze bundle size| Package | Version | Purpose |
|---|---|---|
| next | 15.1.6 | React framework |
| react | 19.0.0 | UI library |
| firebase | 12.12.1 | Backend services |
| framer-motion | 11.15.0 | Animations |
| tailwindcss | 3.4.1 | Styling |
| typescript | 5 | Type safety |
See package.json for complete dependency list.
This project is licensed under the MIT License β see the LICENSE file for details.
- Built with Next.js
- Powered by Firebase
- Animated with Framer Motion
- Styled with Tailwind CSS
- Icons from Lucide React & Heroicons
For questions or support, please:
- Check the Troubleshooting section
- Search Existing Issues
- Create a New Issue
- Contact: [your-email@example.com]
Made with β€οΈ by Your Team
Last Updated: April 2026
5. **Run the development server**
```bash
npm run dev
- Go to Firebase Console β Authentication
- Enable Email/Password sign-in method
- Go to Firebase Console β Firestore Database
- Click Create database
- Choose Production mode
- Select your preferred location
Go to Firestore β Rules and paste:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function isAuthenticated() {
return request.auth != null;
}
function getUserId() {
return request.auth.uid;
}
// Users collection
match /users/{userId} {
allow read: if isAuthenticated();
allow create, update: if isAuthenticated() && getUserId() == userId;
}
// Projects collection
match /projects/{projectId} {
allow read: if isAuthenticated();
allow create: if isAuthenticated() && request.resource.data.createdBy == getUserId();
allow update, delete: if isAuthenticated();
}
// Project members collection
match /project_members/{membershipId} {
allow read: if isAuthenticated();
allow create, update, delete: if isAuthenticated();
}
// Tasks collection
match /tasks/{taskId} {
allow read: if isAuthenticated();
allow create, update, delete: if isAuthenticated();
}
}
}task-manager/
βββ app/
β βββ actions/ # Server actions (legacy)
β βββ auth/ # Authentication pages
β β βββ login/
β β βββ signup/
β βββ dashboard/ # Dashboard pages
β β βββ projects/
β β βββ settings/
β β βββ page.tsx
β βββ globals.css
β βββ layout.tsx
β βββ page.tsx # Landing page
βββ components/ # Reusable components
β βββ Header.tsx
β βββ Sidebar.tsx
βββ lib/
β βββ firebase/ # Firebase configuration
β βββ auth.ts # Auth functions
β βββ config.ts # Firebase init
β βββ firestore.ts # Database functions
β βββ projects.ts # Project operations
β βββ tasks.ts # Task operations
β βββ types.ts # TypeScript types
β βββ AuthContext.tsx
βββ middleware.ts # Auth middleware
βββ package.json
{
id: string // Firebase Auth UID
email: string
fullName: string
avatarUrl: string | null
createdAt: Timestamp
updatedAt: Timestamp
}{
id: string // Auto-generated
name: string
description: string
createdBy: string // User ID
createdAt: Timestamp
updatedAt: Timestamp
}{
id: string // Auto-generated
projectId: string
userId: string
role: 'admin' | 'member'
joinedAt: Timestamp
createdAt: Timestamp
updatedAt: Timestamp
}{
id: string // Auto-generated
projectId: string
title: string
description: string
dueDate: Timestamp | null
priority: 'low' | 'medium' | 'high' | 'urgent'
status: 'todo' | 'in_progress' | 'done'
assignedTo: string | null
createdBy: string
createdAt: Timestamp
updatedAt: Timestamp
}- User signs up with email/password
- Firebase creates auth account
- App creates user profile in Firestore
- User can login and access dashboard
- Auth state managed by
AuthContext
- Create projects with name and description
- Creator automatically becomes admin
- Admins can add/remove members
- Members can view and contribute
- Create tasks within projects
- Set priority (low, medium, high, urgent)
- Set due dates
- Assign to team members
- Track status (todo, in progress, done)
- View all projects
- See task statistics
- Track overdue tasks
- Monitor team progress
- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy!
npm run build- Make sure you're logged in
- Check Firebase Auth is enabled
- Verify environment variables
- Check Firestore Security Rules
- Ensure user has proper role
- Verify user is project member
- Check project membership
- Verify Firestore indexes
- Check browser console for errors
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is for internal use. All rights reserved.
- Built with Next.js 15
- Powered by Firebase
- Styled with modern CSS
Last Updated: 2026-04-30
Version: 1.0.0
Built with β€οΈ using Next.js & Firebase