Skip to content

Latest commit

Β 

History

History
664 lines (526 loc) Β· 19.1 KB

File metadata and controls

664 lines (526 loc) Β· 19.1 KB

🎯 Simple Project Management System (SPMS)

A comprehensive Flask-based web application for managing projects, tasks, and team collaboration with role-based access control.

πŸ“‹ Table of Contents

🎯 Overview

The Simple Project Management System (SPMS) is a full-featured web application designed to streamline project management workflows. It provides a centralized platform for teams to collaborate on projects, manage tasks, track progress, and maintain accountability through comprehensive activity logging.

Key Benefits

  • Centralized Project Management: All projects and tasks in one place
  • Role-Based Access Control: Secure access based on user roles
  • Real-Time Progress Tracking: Visual dashboards and statistics
  • Team Collaboration: Assign tasks and track team performance
  • Activity Logging: Complete audit trail of all actions
  • Responsive Design: Works on desktop, tablet, and mobile devices

✨ Features

πŸ” Authentication & Authorization

  • User Registration & Login: Secure authentication system
  • Role-Based Access Control: Admin, Project Manager, Team Member roles
  • Password Security: Hashed passwords with Werkzeug
  • Session Management: Flask-Login integration
  • Profile Management: User profile pages with statistics

πŸ“Š Project Management

  • Project Creation: Create and manage multiple projects
  • Project Details: Comprehensive project information
  • Progress Tracking: Visual progress indicators
  • Status Management: Active, Completed, On Hold, Cancelled
  • Date Management: Start and end date tracking
  • Project Dashboard: Overview of all projects

βœ… Task Management

  • Task Creation: Assign tasks to team members
  • Task Status: To Do, In Progress, Done workflow
  • Priority Levels: Low, Medium, High, Urgent priorities
  • Due Date Tracking: Deadline management with overdue alerts
  • Task Assignment: Assign tasks to specific team members
  • Task Comments: Collaborative commenting system
  • Bulk Operations: Mass task updates and management

πŸ‘₯ User Management (Admin Only)

  • User Creation: Add new team members
  • Role Assignment: Assign appropriate roles to users
  • User Activation: Enable/disable user accounts
  • User Statistics: View user activity and performance
  • Account Management: Edit user details and passwords

πŸ“ˆ Dashboard & Analytics

  • Project Statistics: Total projects, active projects, completed projects
  • Task Analytics: Task distribution, completion rates
  • Team Performance: User activity and productivity metrics
  • Progress Visualization: Charts and graphs for data insights
  • Recent Activity: Real-time activity feed

πŸ” Advanced Features

  • Search & Filtering: Find projects and tasks quickly
  • Activity Logging: Complete audit trail of all actions
  • Responsive Design: Mobile-friendly interface
  • Real-Time Updates: Live status updates and notifications
  • Data Export: Export project and task data
  • Backup & Recovery: Database backup capabilities

πŸ›  Technology Stack

Backend

  • Python 3.13: Core programming language
  • Flask 3.0.0: Web framework
  • SQLAlchemy 2.0.30+: Object-Relational Mapping
  • Flask-SQLAlchemy 3.1.1: Flask integration for SQLAlchemy
  • Flask-Login 0.6.3: User session management
  • Flask-WTF 1.2.1: Form handling and CSRF protection
  • WTForms 3.1.1: Form validation and rendering
  • Werkzeug 3.0.1: WSGI utility library

Database

  • SQLite: Lightweight, serverless database
  • Database Migrations: Automatic schema management

Frontend

  • HTML5: Semantic markup
  • CSS3: Modern styling with Bootstrap 5
  • JavaScript: Interactive functionality
  • Bootstrap 5: Responsive UI framework
  • Font Awesome: Icon library
  • Chart.js: Data visualization

Development Tools

  • Git: Version control
  • Virtual Environment: Python dependency isolation
  • Pytest: Testing framework
  • Flask Debug Toolbar: Development debugging

πŸš€ Installation

Prerequisites

  • Python 3.13 or higher
  • pip (Python package installer)
  • Git (for cloning the repository)

Step 1: Clone the Repository

git clone <repository-url>
cd projectManager

Step 2: Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Initialize Database

python run.py

The application will automatically:

  • Create the SQLite database
  • Set up all required tables
  • Create an admin user
  • Populate with sample data

Step 5: Run the Application

python run.py

The application will be available at http://localhost:5000

βš™οΈ Configuration

Environment Variables

Create a .env file in the project root:

# Flask Configuration
SECRET_KEY=your-secret-key-here
FLASK_ENV=development
FLASK_DEBUG=True

# Database Configuration
DATABASE_URL=sqlite:///project_manager.db

# Email Configuration (Optional)
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-app-password

Database Configuration

The application uses SQLite by default. To use PostgreSQL or MySQL:

# In app.py
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:password@localhost/dbname'
# or
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user:password@localhost/dbname'

πŸ“– Usage

Getting Started

  1. Access the Application: Navigate to http://localhost:5000
  2. Login: Use the default admin credentials:
    • Username: admin
    • Password: admin123
  3. Explore: Navigate through the dashboard and features

Default Users

The system comes with pre-configured users:

Username Password Role Description
admin admin123 Admin Full system access
manager manager123 Project Manager Create projects, assign tasks
member member123 Team Member View assigned tasks
john_doe password123 Team Member Sample user
jane_smith password123 Team Member Sample user

Creating Your First Project

  1. Login as admin or project manager
  2. Navigate to "Projects" β†’ "Create Project"
  3. Fill in project details:
    • Project name
    • Description
    • Start and end dates
    • Status
  4. Save the project
  5. Add tasks to the project

Managing Tasks

  1. Create Tasks: Assign tasks to team members
  2. Set Priorities: Mark tasks as Low, Medium, High, or Urgent
  3. Track Progress: Update task status (To Do β†’ In Progress β†’ Done)
  4. Add Comments: Collaborate through task comments
  5. Monitor Deadlines: Track due dates and overdue tasks

πŸ‘₯ User Roles & Permissions

Admin

  • Full System Access: All features and data
  • User Management: Create, edit, delete users
  • Project Management: Create, edit, delete any project
  • Task Management: Create, edit, delete any task
  • System Settings: Configure application settings
  • Data Export: Export all data
  • Analytics: View comprehensive reports

Project Manager

  • Project Creation: Create and manage projects
  • Task Assignment: Assign tasks to team members
  • Team Management: View team members and their tasks
  • Progress Tracking: Monitor project and task progress
  • Reporting: Generate project reports
  • Limited User Management: View user profiles

Team Member

  • Task Management: View and update assigned tasks
  • Status Updates: Change task status
  • Comments: Add comments to tasks
  • Profile Management: Update personal profile
  • Limited Project Access: View assigned projects only

πŸ—„οΈ Database Schema

Users Table

CREATE TABLE users (
    id INTEGER PRIMARY KEY,
    username VARCHAR(80) UNIQUE NOT NULL,
    email VARCHAR(120) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    role VARCHAR(20) NOT NULL DEFAULT 'team_member',
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    is_active BOOLEAN DEFAULT TRUE
);

Projects Table

CREATE TABLE projects (
    id INTEGER PRIMARY KEY,
    name VARCHAR(200) NOT NULL,
    description TEXT,
    start_date DATE NOT NULL,
    end_date DATE NOT NULL,
    status VARCHAR(20) DEFAULT 'active',
    created_by INTEGER NOT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (created_by) REFERENCES users(id)
);

Tasks Table

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY,
    title VARCHAR(200) NOT NULL,
    description TEXT,
    status VARCHAR(20) DEFAULT 'To Do',
    priority VARCHAR(10) DEFAULT 'medium',
    due_date DATE,
    project_id INTEGER NOT NULL,
    assigned_to INTEGER NOT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (project_id) REFERENCES projects(id),
    FOREIGN KEY (assigned_to) REFERENCES users(id)
);

Activity Logs Table

CREATE TABLE activity_logs (
    id INTEGER PRIMARY KEY,
    task_id INTEGER,
    user_id INTEGER NOT NULL,
    action VARCHAR(50) NOT NULL,
    message TEXT NOT NULL,
    timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (task_id) REFERENCES tasks(id),
    FOREIGN KEY (user_id) REFERENCES users(id)
);

🌐 API Endpoints

Authentication

  • GET /auth/login - Login page
  • POST /auth/login - Process login
  • GET /auth/register - Registration page
  • POST /auth/register - Process registration
  • GET /auth/logout - Logout user
  • GET /auth/profile - User profile

Projects

  • GET /project/list - List all projects
  • GET /project/create - Create project form
  • POST /project/create - Process project creation
  • GET /project/<id> - View project details
  • GET /project/<id>/edit - Edit project form
  • POST /project/<id>/edit - Process project update
  • POST /project/<id>/delete - Delete project

Tasks

  • GET /task/list - List all tasks
  • GET /task/my-tasks - User's assigned tasks
  • GET /task/create/<project_id> - Create task form
  • POST /task/create/<project_id> - Process task creation
  • GET /task/<id> - View task details
  • GET /task/<id>/edit - Edit task form
  • POST /task/<id>/edit - Process task update
  • POST /task/<id>/delete - Delete task
  • POST /task/<id>/status - Update task status

Users (Admin Only)

  • GET /users/list - List all users
  • GET /users/create - Create user form
  • POST /users/create - Process user creation
  • GET /users/<id>/edit - Edit user form
  • POST /users/<id>/edit - Process user update
  • POST /users/<id>/delete - Delete user
  • POST /users/<id>/toggle-status - Toggle user status

Dashboard

  • GET /dashboard - Main dashboard
  • GET / - Redirect to dashboard

πŸ“Έ Screenshots

Dashboard

Dashboard Main dashboard showing project statistics and recent activity

Project Management

Projects Project list with status indicators and progress bars

Task Management

Tasks Task list with priority indicators and status updates

User Management

Users User management interface for administrators

πŸ›  Development

Project Structure

projectManager/
β”œβ”€β”€ app.py                 # Main Flask application
β”œβ”€β”€ models.py             # Database models
β”œβ”€β”€ forms.py              # WTForms definitions
β”œβ”€β”€ run.py                # Application runner
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ seed_data.py          # Sample data generator
β”œβ”€β”€ test_app.py           # Test suite
β”œβ”€β”€ deploy.py             # Deployment script
β”œβ”€β”€ routes/               # Route handlers
β”‚   β”œβ”€β”€ auth.py          # Authentication routes
β”‚   β”œβ”€β”€ project.py       # Project routes
β”‚   β”œβ”€β”€ task.py          # Task routes
β”‚   └── users.py         # User management routes
β”œβ”€β”€ templates/            # HTML templates
β”‚   β”œβ”€β”€ base.html        # Base template
β”‚   β”œβ”€β”€ dashboard.html   # Dashboard page
β”‚   β”œβ”€β”€ project_*.html   # Project templates
β”‚   β”œβ”€β”€ task_*.html      # Task templates
β”‚   └── user_*.html      # User templates
β”œβ”€β”€ static/              # Static assets
β”‚   β”œβ”€β”€ css/             # Stylesheets
β”‚   β”œβ”€β”€ js/              # JavaScript files
β”‚   └── images/          # Images
β”œβ”€β”€ instance/            # Instance folder
β”‚   └── project_manager.db # SQLite database
└── docs/                # Documentation
    β”œβ”€β”€ SRS.md           # Software Requirements
    β”œβ”€β”€ ER_DIAGRAM.md    # Database schema
    └── PROJECT_SUMMARY.md # Project overview

Adding New Features

  1. Create Models: Add new database models in models.py
  2. Create Forms: Add form classes in forms.py
  3. Create Routes: Add route handlers in appropriate files
  4. Create Templates: Add HTML templates in templates/
  5. Update Navigation: Modify base.html for new menu items
  6. Test: Add tests in test_app.py

Code Style Guidelines

  • PEP 8: Follow Python style guidelines
  • Docstrings: Document all functions and classes
  • Type Hints: Use type annotations where appropriate
  • Error Handling: Implement proper exception handling
  • Security: Validate all user inputs
  • Performance: Optimize database queries

πŸ§ͺ Testing

Running Tests

# Run all tests
python -m pytest test_app.py -v

# Run specific test
python -m pytest test_app.py::test_user_registration -v

# Run with coverage
python -m pytest test_app.py --cov=. --cov-report=html

Test Coverage

The test suite covers:

  • Authentication: Login, registration, logout
  • Project Management: CRUD operations
  • Task Management: CRUD operations
  • User Management: Admin functions
  • Authorization: Role-based access control
  • Database Operations: Model relationships

Manual Testing

  1. User Registration: Test user creation and validation
  2. Login/Logout: Test authentication flow
  3. Project Creation: Test project management
  4. Task Assignment: Test task workflows
  5. Role Permissions: Test access control
  6. Data Integrity: Test database constraints

πŸš€ Deployment

Production Configuration

  1. Environment Variables:
export FLASK_ENV=production
export SECRET_KEY=your-production-secret-key
export DATABASE_URL=your-production-database-url
  1. Database Setup:
# For PostgreSQL
pip install psycopg2-binary
# Update DATABASE_URL in app.py
  1. Web Server:
# Using Gunicorn
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 app:app

Docker Deployment

FROM python:3.13-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
EXPOSE 5000

CMD ["python", "run.py"]

Cloud Deployment

Heroku

# Install Heroku CLI
# Create Procfile
echo "web: gunicorn app:app" > Procfile

# Deploy
git add .
git commit -m "Deploy to Heroku"
git push heroku main

AWS/GCP/Azure

  • Use container services (ECS, Cloud Run, Container Instances)
  • Set up load balancers for high availability
  • Configure auto-scaling
  • Set up monitoring and logging

🀝 Contributing

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Commit changes: git commit -am 'Add new feature'
  4. Push to branch: git push origin feature/new-feature
  5. Submit a pull request

Development Setup

# Clone your fork
git clone https://github.com/yourusername/projectManager.git
cd projectManager

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run tests
python -m pytest test_app.py

Code Review Process

  1. Automated Tests: All tests must pass
  2. Code Quality: Follow style guidelines
  3. Documentation: Update relevant documentation
  4. Security: Review for security vulnerabilities
  5. Performance: Consider performance implications

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

Getting Help

  • Documentation: Check this README and code comments
  • Issues: Report bugs and request features on GitHub
  • Discussions: Use GitHub Discussions for questions
  • Email: Contact the development team

Common Issues

Database Connection Issues

# Check database file permissions
chmod 664 instance/project_manager.db

# Reset database
rm instance/project_manager.db
python run.py

Import Errors

# Ensure virtual environment is activated
source venv/bin/activate

# Reinstall dependencies
pip install -r requirements.txt

Permission Errors

# Check file permissions
chmod +x run.py

# Run with proper permissions
python run.py

🎯 Roadmap

Upcoming Features

  • Email Notifications: Task assignments and deadline alerts
  • File Attachments: Upload files to tasks and projects
  • Time Tracking: Track time spent on tasks
  • Advanced Reporting: Custom reports and analytics
  • API Integration: REST API for mobile apps
  • Real-time Updates: WebSocket integration
  • Mobile App: React Native mobile application
  • Advanced Permissions: Granular permission system

Version History

  • v1.0.0: Initial release with core functionality
  • v1.1.0: Added user management and advanced features
  • v1.2.0: Enhanced UI and performance improvements
  • v2.0.0: Planned major update with new features

πŸŽ‰ Conclusion

The Simple Project Management System (SPMS) provides a comprehensive solution for project and task management. With its intuitive interface, robust security, and scalable architecture, it's perfect for teams of all sizes.

Key Benefits:

  • βœ… Easy to Use: Intuitive interface for all skill levels
  • βœ… Secure: Role-based access control and data protection
  • βœ… Scalable: Handles projects from small teams to large organizations
  • βœ… Flexible: Customizable to fit your workflow
  • βœ… Reliable: Built with proven technologies and best practices

Get Started Today:

  1. Follow the installation guide
  2. Create your first project
  3. Invite your team
  4. Start managing tasks efficiently

For questions, support, or contributions, please visit our GitHub repository or contact the development team.


Built with ❀️ using Flask, SQLAlchemy, and modern web technologies.