ProjectManager is a Flask-based web application for managing projects and tasks. It includes a robust user authentication system, role-based user management (including admin privileges), and a hierarchical task management setup. The app is designed to help teams or individuals:
- Create and track projects.
- Organize tasks (including subtasks).
- Assign tasks to users.
- Monitor statuses and due dates.
- Manage user profiles and permissions.
The repository is organized into a standard Flask project layout:
PROJECTMANAGER/
├── __pycache__/
├── instance/
├── your_database.db
├── static/
│ └── css/
│ ├── admin.css
│ ├── create_project.css
│ ├── index.css
│ ├── login.css
│ ├── profile.css
│ ├── projects.css
│ ├── style.css
│ └── view_project.css
├── templates/
│ ├── admin/
│ │ └── users.html
│ ├── base.html
│ ├── create_project.html
│ ├── edit_project.html
│ ├── index.html
│ ├── login.html
│ ├── nav.html
│ ├── profile.html
│ ├── projects.html
│ └── view_project.html
├── tests/
│ └── test_models.py
├── .gitignore
├── app.py
├── config.py
├── conftest.py
├── create_admin.py
├── features.md
├── forms.py
├── models.py
├── README.md
├── requirements.txt
└── routes.py
-
PROJECTMANAGER/
The root folder containing the entire Flask application.- Includes subfolders like
static/,templates/,tests/, and the SQLite database file (your_database.db). - Contains various utility and config files (
config.py,conftest.py,forms.py, etc.).
- Includes subfolders like
-
app.py
The main entry point for the Flask application. This is where the Flask app is initialized and run. -
routes.py
Defines the route logic (endpoints) for the Flask app, handling how users interact with different pages and functionalities. -
models.py
Contains the SQLAlchemy model definitions and database schema logic. Uses Flask-SQLAlchemy for ORM functionality, making it easier to work with SQLite (or other databases if configured). -
requirements.txt
Lists the Python dependencies needed to run the project (e.g., Flask, Flask-SQLAlchemy, etc.).
- Language: Python 3.x
- Framework: Flask
- Database: SQLite (using Flask-SQLAlchemy for ORM)
- Front-End: HTML, CSS, JavaScript, and Bootstrap for styling
- Other:
- Flask’s built-in development server (or a WSGI server in production)
- Config files (
config.py) and additional scripts (create_admin.py) for setup and maintenance
For a detailed list of current, planned, and completed features, please see features.md.
A high-level overview of the main features includes:
- User Authentication System with role-based management
- Comprehensive Project Management
- Hierarchical Task Management
- User Profile Management
- Admin Features
- Technical Features
- Testing Coverage: Although there is a placeholder for tests (
tests.py), unit testing is not fully implemented. - Deployment Configuration: No Docker configuration or production-ready settings are included by default.
- Scalability & Performance: Suitable for smaller teams or single-users as-is. Large enterprise-scale usage would require further optimization and testing.
Here are some potential avenues to grow or improve ProjectManager:
-
Unit Test Implementation
- Add comprehensive tests for models, views, and forms.
- Integrate CI/CD pipeline (e.g., GitHub Actions) to automate test runs.
-
Refined Authorization
- Implement more granular permission systems (e.g., only project owners can edit tasks).
-
Enhanced UI/UX
- Incorporate a frontend framework like Bootstrap or Tailwind CSS.
- Use HTMX for a single-page app approach for a more dynamic interface.
-
Notifications & Reminders
- Email or in-app notifications for upcoming due dates or project updates.
- Calendar/scheduling integration.
-
Deployment & Scalability
- Containerize the app with Docker for easier deployment.
- Configure a production database (e.g., PostgreSQL) and environment variables for secrets.
-
Clone the repository
git clone https://github.com/admiralorbiter/ProjectManager.git cd ProjectManager -
Install Dependencies
pip install -r requirements.txt- Setup Database
To set up the database for the first time, run:
python app.py- Setup Admin
To create a superuser for accessing the Django admin interface, run:
python create_admin.py- ** Access the Application**
Visit http://127.0.0.1:5000/ in your browser.
Note: For production use, ensure you set the appropriate environment variables, turn off DEBUG in settings.py, and secure your secret keys.
The project uses pytest for testing. The test suite includes:
- Unit tests for models
- Integration tests for routes
- Authentication testing
- Database operations testing
- Setup Test Environment
pip install pytest
pip install pytest-cov # for coverage reports- Run All Tests
pytest- Run Tests with Coverage Report
pytest --cov=.- Run Specific Test Files
pytest tests/test_routes.py # Run route tests
pytest tests/test_models.py # Run model testsconftest.py: Contains pytest fixtures and test configurationtests/test_routes.py: Tests for route functionality and API endpointstests/test_models.py: Tests for database models and relationships
- Uses in-memory SQLite database for testing
- Separate test configuration in
config.py - Fixtures for common test scenarios:
- Test users (admin and regular)
- Test projects
- Test tasks
- Comprehensive API endpoint testing
- Database operation verification
- Authentication and authorization testing
When adding new features, ensure to:
- Create corresponding test cases
- Use existing fixtures where applicable
- Follow the established pattern for similar functionality
- Include both positive and negative test cases
- Test edge cases and error conditions