A comprehensive, full-stack project management application designed for modern teams. Built with React TypeScript frontend, Flask Python backend, GraphQL API, and PostgreSQL database.
This Project Management System provides a complete solution for managing teams, projects, and tasks in a collaborative environment. The application features role-based access control, real-time updates, and an intuitive Kanban board interface for task management.
- π Secure Authentication: JWT-based authentication with persistent sessions
- π₯ Role-Based Access: Three user roles with hierarchical permissions
- π Kanban Board: Drag-and-drop task management with visual status tracking
- π¨ Modern UI: Material-UI components with responsive design
- β‘ Real-time API: GraphQL for efficient data operations
- ποΈ Scalable Database: PostgreSQL with proper normalization
- π Production Ready: Docker support and deployment configurations
- User Registration & Authentication: Secure signup/login with password hashing
- Role Assignment: Admin can assign roles (Admin, Project Manager, Coordinator)
- User Profile Management: View and edit user information
- Session Persistence: Stay logged in across browser sessions
- Project Creation: Create projects with detailed descriptions
- Progress Tracking: Visual progress bars showing completion percentage
- Project Assignment: Assign projects to team members
- Project Overview: Dashboard view of all projects with key metrics
- Kanban Board: Visual task board with three columns (To Do, In Progress, Completed)
- Drag & Drop: Intuitive task status updates via drag and drop
- Task Assignment: Assign tasks to specific team members
- Task Details: Rich task descriptions with creation timestamps
- Priority Indicators: Visual priority indicators for better organization
- Role-Based Dashboard: Customized dashboard based on user permissions
- Quick Actions: Direct access to key features from dashboard
- Status Overview: At-a-glance view of projects and tasks
- Navigation: Seamless navigation between different sections
- Flask 3.0+: Lightweight and flexible Python web framework
- Ariadne 0.23+: GraphQL-first approach with schema-first design
- SQLAlchemy 2.0+: Powerful ORM with modern async support
- PostgreSQL 15+: Robust relational database with ACID compliance
- JWT Extended: Secure JSON Web Token implementation
- Bcrypt: Industry-standard password hashing
- Flask-CORS: Cross-origin resource sharing support
- Gunicorn: Production WSGI HTTP Server
- React 19: Latest React with concurrent features
- TypeScript 5+: Static type checking for enhanced development
- Material-UI (MUI) 6+: Google's Material Design components
- Apollo Client 3+: Comprehensive GraphQL client
- React Router DOM 6+: Declarative routing for React
- React DnD: Drag and drop functionality
- Emotion: CSS-in-JS styling solution
- Vite: Fast build tool and development server
- ESLint: Code linting for consistent style
- Prettier: Code formatting
- Python Poetry: Dependency management for Python
- npm: Node.js package management
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β React Client βββββΊβ Flask Server βββββΊβ PostgreSQL β
β (Frontend) β β (Backend) β β (Database) β
βββββββββββββββββββ€ βββββββββββββββββββ€ βββββββββββββββββββ€
β β’ React 19 β β β’ Flask 3.0 β β β’ User Data β
β β’ TypeScript β β β’ GraphQL API β β β’ Projects β
β β’ Material-UI β β β’ JWT Auth β β β’ Tasks β
β β’ Apollo Client β β β’ SQLAlchemy β β β’ Relationships β
β β’ React Router β β β’ Bcrypt β β β’ Indexes β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
-
Authentication Flow:
User Login β JWT Token β Stored in LocalStorage β Sent with Requests β Verified by Backend -
API Request Flow:
React Component β Apollo Client β GraphQL Query/Mutation β Flask Resolver β Database β Response -
State Management:
React Context (Auth) β Apollo Cache β Local Component State β UI Updates
- Python 3.11+
- Node.js 18+
- PostgreSQL 15+
- Git
# Clone the repository
git clone https://github.com/marmik28/Project-Management-Application.git
cd Project-Management-Application
# Backend setup
pip install -r requirements.txt
export DATABASE_URL="postgresql://user:pass@localhost/projectdb"
python main.py
# Frontend setup (new terminal)
cd frontend
npm install
npm startAdmin: admin@example.com / admin123
Project Manager: manager@example.com / manager123
Coordinator: coord@example.com / coord123
-
Create Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Database Configuration:
# Create PostgreSQL database createdb projectmanagement # Set environment variable export DATABASE_URL="postgresql://username:password@localhost:5432/projectmanagement"
-
Initialize Database:
python -c "from main import create_app; from models import db; app = create_app(); app.app_context().push(); db.create_all()" -
Run Backend Server:
python main.py # Server runs on http://localhost:3001
-
Navigate to Frontend Directory:
cd frontend -
Install Node Dependencies:
npm install
-
Configure Environment:
# Create .env file in frontend directory echo "REACT_APP_GRAPHQL_ENDPOINT=http://localhost:3001/graphql" > .env
-
Start Development Server:
npm start # Frontend runs on http://localhost:5000
-
Build Frontend:
cd frontend npm run build -
Run with Gunicorn:
gunicorn --bind 0.0.0.0:8000 --workers 4 main:app
POST /graphql
Content-Type: application/json
Authorization: Bearer <jwt_token>
mutation Login($email: String!, $password: String!) {
login(email: $email, password: $password) {
token
user {
id
email
username
role
}
}
}mutation Register($email: String!, $username: String!, $password: String!, $role: UserRole) {
register(email: $email, username: $username, password: $password, role: $role) {
token
user {
id
email
username
role
}
}
}query GetUsers {
users {
id
email
username
role
createdAt
}
}mutation UpdateUserRole($userId: ID!, $role: UserRole!) {
updateUserRole(userId: $userId, role: $role) {
id
role
}
}mutation DeleteUser($userId: ID!) {
deleteUser(userId: $userId)
}query GetProjects {
projects {
id
name
description
owner {
id
username
}
tasks {
id
status
}
createdAt
}
}mutation CreateProject($name: String!, $description: String!) {
createProject(name: $name, description: $description) {
id
name
description
owner {
username
}
}
}mutation DeleteProject($projectId: ID!) {
deleteProject(projectId: $projectId)
}query GetTasks {
tasks {
id
title
description
status
project {
id
name
}
assignee {
id
username
}
createdAt
}
}mutation CreateTask($title: String!, $description: String!, $projectId: ID!, $assigneeId: ID) {
createTask(title: $title, description: $description, projectId: $projectId, assigneeId: $assigneeId) {
id
title
description
status
}
}mutation UpdateTaskStatus($taskId: ID!, $status: TaskStatus!) {
updateTaskStatus(taskId: $taskId, status: $status) {
id
status
}
}enum UserRole {
ADMIN
PROJECT_MANAGER
COORDINATOR
}
enum TaskStatus {
TODO
IN_PROGRESS
COMPLETED
}CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
username VARCHAR(100) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
role VARCHAR(50) NOT NULL DEFAULT 'COORDINATOR',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE projects (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
owner_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
status VARCHAR(50) NOT NULL DEFAULT 'TODO',
project_id INTEGER REFERENCES projects(id) ON DELETE CASCADE,
assignee_id INTEGER REFERENCES users(id) ON DELETE SET NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);- Users can own multiple Projects (One-to-Many)
- Projects can have multiple Tasks (One-to-Many)
- Tasks can be assigned to Users (Many-to-One)
- Full System Access: Complete control over all features
- User Management: Create, update, delete users and assign roles
- Project Management: Create, view, update, delete all projects
- Task Management: Full access to all tasks across projects
- Project Management: Create, view, update, delete their own projects
- Task Management: Create, view, update tasks in their projects
- Team Oversight: View team members and assign tasks
- Limited User Access: Cannot manage other users or roles
- Task Management: View and update tasks assigned to them
- Project Viewing: View projects they're involved in
- Limited Access: Cannot create projects or manage users
- Self-Service: Update their own profile and task status
| Feature | Admin | Project Manager | Coordinator |
|---|---|---|---|
| Manage Users | β | β | β |
| Create Projects | β | β | β |
| Delete Projects | β | β (own) | β |
| Create Tasks | β | β | β |
| Update Task Status | β | β | β (assigned) |
| View All Data | β | β (projects) | β (assigned) |
frontend/src/
βββ components/ # Reusable UI components
β βββ Dashboard.tsx # Main dashboard with role-based views
β βββ Login.tsx # Authentication component
β βββ UserManagement.tsx # User CRUD operations
β βββ ProjectManagement.tsx # Project CRUD operations
β βββ TaskManagement.tsx # Kanban board with drag-drop
βββ context/ # React Context providers
β βββ AuthContext.tsx # Authentication state management
βββ types.ts # TypeScript type definitions
βββ App.tsx # Main application component
βββ index.tsx # Application entry point
backend/
βββ main.py # Flask application factory
βββ models.py # SQLAlchemy database models
βββ schema.py # GraphQL schema and resolvers
βββ auth.py # JWT authentication utilities
βββ requirements.txt # Python dependencies
- User enters credentials in login form
- Frontend sends GraphQL mutation to
/graphql - Backend validates credentials using bcrypt
- JWT token generated and returned
- Token stored in localStorage
- Token included in subsequent requests
- Backend validates token for protected routes
- Storage: localStorage for persistence
- Expiration: 24 hours (configurable)
- Refresh: Automatic refresh on valid requests
- Logout: Token removed from localStorage
- Password Hashing: Bcrypt with salt rounds
- JWT Security: Secret key signing
- CORS Protection: Configured origins
- Route Protection: Decorator-based authorization