Skip to content

yungryce/collabHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Angular Flask TypeScript Python MySQL Status

🀝 CollabHub

Enterprise-grade collaborative task management platform with real-time synchronization and team coordination


πŸ“‹ Table of Contents

πŸ“– Overview

CollabHub is a sophisticated, full-stack collaborative task management platform designed to streamline team productivity and project coordination. Built with modern web technologies, it provides real-time task synchronization, advanced user authentication, and comprehensive project management capabilities.

The platform demonstrates enterprise-level software architecture with a robust RESTful API backend powered by Flask and SQLAlchemy, coupled with a dynamic, responsive frontend built using Angular 17. CollabHub implements advanced features including JWT-based authentication, real-time notifications, file attachment management, Google reCAPTCHA integration, and comprehensive task lifecycle management.

This project showcases full-stack development expertise, modern DevOps practices, and production-ready software engineering principles, making it an ideal demonstration of contemporary web application development and team collaboration software design.

🎯 Learning Objectives

Through this comprehensive full-stack project, you will master:

  • Advanced Full-Stack Development: Complete understanding of modern web application architecture
  • RESTful API Design: Professional API development with Flask and comprehensive endpoint management
  • Frontend Frameworks: Advanced Angular development with TypeScript and reactive programming
  • Database Design: Sophisticated relational database modeling with SQLAlchemy ORM
  • Authentication Systems: JWT-based security implementation with role-based access control
  • Real-Time Communication: WebSocket integration for live collaboration features
  • DevOps Integration: Containerization, deployment automation, and production configuration
  • Software Engineering: Professional code organization, testing strategies, and documentation practices

πŸ› οΈ Tech Stack

Backend Technologies:

  • Flask 3.0.2: Modern Python web framework with comprehensive ecosystem
  • SQLAlchemy: Advanced ORM for database operations and relationship management
  • Flask-Migrate: Database schema version control and migration management
  • Flask-Mail: Email service integration for notifications and communication
  • PyJWT: JSON Web Token implementation for secure authentication
  • MySQL: Robust relational database for production data management

Frontend Technologies:

  • Angular 17.3.0: Latest Angular framework with enhanced performance and features
  • TypeScript 5.4.0: Type-safe JavaScript with advanced language features
  • RxJS: Reactive programming for asynchronous data handling and state management
  • Angular Calendar: Advanced calendar components for task scheduling and visualization
  • SweetAlert2: Professional notification and modal dialog system
  • Tailwind CSS: Utility-first CSS framework for responsive design

Development Tools:

  • Angular CLI: Comprehensive development toolkit for Angular applications
  • Flask-CORS: Cross-Origin Resource Sharing configuration for API access
  • Google reCAPTCHA: Advanced bot protection and security validation
  • Nginx: High-performance web server for production deployment
  • Factory Boy: Sophisticated test data generation and database seeding

πŸ“ Project Structure

collabHub/
β”œβ”€β”€ backend/                          # Flask API Backend
β”‚   β”œβ”€β”€ api/                          # RESTful API endpoints
β”‚   β”‚   β”œβ”€β”€ auth/                     # Authentication services
β”‚   β”‚   β”œβ”€β”€ v1/                       # API version 1 endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ task_views.py         # Task management endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ user_views.py         # User management endpoints
β”‚   β”‚   β”‚   └── recaptcha_views.py    # Security validation endpoints
β”‚   β”‚   └── response_utils.py         # API response utilities
β”‚   β”œβ”€β”€ config/                       # Application configuration
β”‚   β”‚   β”œβ”€β”€ database.py               # Database connection setup
β”‚   β”‚   β”œβ”€β”€ config.py                 # Environment configuration
β”‚   β”‚   β”œβ”€β”€ mail_service.py           # Email service configuration
β”‚   β”‚   └── error_handlers.py         # Global error handling
β”‚   β”œβ”€β”€ models/                       # Database models
β”‚   β”‚   β”œβ”€β”€ users.py                  # User data model
β”‚   β”‚   β”œβ”€β”€ tasks.py                  # Task data model
β”‚   β”‚   β”œβ”€β”€ attachments.py            # File attachment model
β”‚   β”‚   β”œβ”€β”€ blacklist.py              # JWT blacklist model
β”‚   β”‚   └── base_model.py             # Base model with common fields
β”‚   β”œβ”€β”€ factories/                    # Test data generators
β”‚   β”‚   β”œβ”€β”€ users.py                  # User factory for testing
β”‚   β”‚   └── tasks.py                  # Task factory for testing
β”‚   β”œβ”€β”€ migrations/                   # Database migration files
β”‚   β”œβ”€β”€ app.py                        # Main Flask application
β”‚   β”œβ”€β”€ requirements.txt              # Python dependencies
β”‚   └── nginx.conf                    # Production web server config
β”œβ”€β”€ frontend/                         # Angular Frontend Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                      # Angular application modules
β”‚   β”‚   β”‚   β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ services/             # Business logic services
β”‚   β”‚   β”‚   β”œβ”€β”€ guards/               # Route protection guards
β”‚   β”‚   β”‚   β”œβ”€β”€ models/               # TypeScript interfaces
β”‚   β”‚   β”‚   └── interceptors/         # HTTP request interceptors
β”‚   β”‚   β”œβ”€β”€ assets/                   # Static assets and images
β”‚   β”‚   β”œβ”€β”€ environments/             # Environment configurations
β”‚   β”‚   └── styles/                   # Global styling files
β”‚   β”œβ”€β”€ package.json                  # Node.js dependencies
β”‚   β”œβ”€β”€ angular.json                  # Angular CLI configuration
β”‚   β”œβ”€β”€ tailwind.config.js            # Tailwind CSS configuration
β”‚   └── tsconfig.json                 # TypeScript configuration
β”œβ”€β”€ README.md                         # Project documentation
β”œβ”€β”€ LICENSE.txt                       # GNU General Public License
└── .gitignore                        # Git ignore patterns

πŸš€ Getting Started

Prerequisites

System Requirements:

  • Node.js 18+: JavaScript runtime for Angular development
  • Python 3.8+: Backend runtime environment
  • MySQL 8.0+: Database server for data persistence
  • Git: Version control system

Development Tools:

  • Angular CLI: npm install -g @angular/cli
  • Flask CLI: Included with Flask installation
  • MySQL Client: For database administration

Backend Setup (Flask API)

  1. Clone the Repository

    git clone https://github.com/yourusername/collabhub.git
    cd collabhub/backend
  2. Create Virtual Environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Environment Configuration

    # Create environment file
    cp .env.example .env
    
    # Configure database and secrets
    echo "DB_USERNAME=your_db_username" >> .env
    echo "DB_PASSWORD=your_db_password" >> .env
    echo "DB_HOST=localhost" >> .env
    echo "DB_NAME=collabhub_db" >> .env
    echo "SECRET_KEY=$(python -c 'import secrets; print(secrets.token_hex(32))')" >> .env
    echo "MAIL_SERVER=smtp.gmail.com" >> .env
    echo "MAIL_USERNAME=your_email@gmail.com" >> .env
    echo "MAIL_PASSWORD=your_app_password" >> .env
  5. Database Initialization

    # Initialize migration repository
    flask db init
    
    # Create initial migration
    flask db migrate -m "Initial migration"
    
    # Apply migrations to database
    flask db upgrade
    
    # Optional: Seed with test data
    python -c "from factories.users import generateusers; generateusers(10)"
    python -c "from factories.tasks import generatetasks; generatetasks(20)"
  6. Start Development Server

    flask run --debug
    # API will be available at http://localhost:5000

Frontend Setup (Angular Application)

  1. Navigate to Frontend Directory

    cd ../frontend
  2. Install Dependencies

    npm install
  3. Environment Configuration

    # Update src/environments/environment.ts
    export const environment = {
      production: false,
      apiUrl: 'http://localhost:5000/api/v1',
      recaptchaSiteKey: 'your_recaptcha_site_key'
    };
  4. Start Development Server

    ng serve
    # Application will be available at http://localhost:4200

Production Deployment

  1. Build Frontend for Production

    cd frontend
    ng build --configuration production
  2. Configure Production Environment

    # Set production environment variables
    export FLASK_ENV=production
    export DATABASE_URL=mysql://user:password@host:port/database
  3. Deploy with Nginx

    # Copy nginx configuration
    sudo cp backend/nginx.conf /etc/nginx/sites-available/collabhub
    sudo ln -s /etc/nginx/sites-available/collabhub /etc/nginx/sites-enabled/
    sudo nginx -t && sudo systemctl reload nginx

πŸ’‘ Usage

User Registration and Authentication

  1. Account Creation

    • Navigate to the registration page
    • Complete the secure registration form with email verification
    • Verify your account through the email confirmation link
  2. Secure Login

    • Use your registered credentials to access the platform
    • The system implements JWT-based authentication for secure sessions
    • Optional two-factor authentication for enhanced security

Task Management Workflow

  1. Create Tasks

    • Access the task creation interface from the main dashboard
    • Define task details including title, description, priority, and deadlines
    • Assign multiple collaborators using user search functionality
    • Attach relevant files and documents to tasks
  2. Collaboration Features

    • View real-time updates from team members
    • Comment and communicate within task threads
    • Track task progress and completion status
    • Receive notifications for task assignments and updates
  3. Project Organization

    • Organize tasks using project categories and labels
    • Filter and search tasks using advanced criteria
    • Generate progress reports and analytics
    • Export task data for external reporting

πŸ† Key Features

πŸ” Advanced Authentication System

  • JWT-Based Security: Stateless authentication with refresh token rotation
  • Email Verification: Secure account activation with email confirmation
  • Password Security: BCrypt hashing with configurable complexity
  • Session Management: Automatic token refresh and secure logout

πŸ“‹ Comprehensive Task Management

  • Task Lifecycle: Complete CRUD operations with status tracking
  • Multi-User Assignment: Flexible collaborator assignment and role management
  • Priority System: Configurable priority levels with visual indicators
  • Deadline Management: Due date tracking with automated reminders
  • File Attachments: Secure file upload and management system

🎨 Modern User Interface

  • Responsive Design: Mobile-first design with Tailwind CSS
  • Real-Time Updates: Live synchronization using WebSocket connections
  • Calendar Integration: Advanced calendar views for task scheduling
  • Notification System: In-app and email notifications for important events
  • Dark/Light Themes: User-customizable interface themes

πŸ”’ Enterprise Security

  • Google reCAPTCHA: Advanced bot protection and spam prevention
  • Input Validation: Comprehensive server-side and client-side validation
  • CORS Configuration: Secure cross-origin resource sharing
  • Error Handling: Graceful error management with user-friendly messages
  • Audit Logging: Comprehensive activity tracking and security monitoring

πŸ“Š Analytics and Reporting

  • Task Analytics: Progress tracking and completion statistics
  • Team Performance: Collaboration metrics and productivity insights
  • Export Capabilities: Data export in multiple formats (JSON, CSV, PDF)
  • Custom Reports: Configurable reporting with date range filtering

πŸ”§ Architecture

System Architecture Overview

graph TB
    subgraph "Frontend Layer"
        A[Angular 17 SPA]
        B[TypeScript Services]
        C[RxJS State Management]
        D[Angular Router]
    end
    
    subgraph "API Gateway"
        E[Flask Application]
        F[CORS Middleware]
        G[JWT Authentication]
        H[Request Validation]
    end
    
    subgraph "Business Logic"
        I[Task Management API]
        J[User Management API]
        K[Authentication API]
        L[File Upload API]
    end
    
    subgraph "Data Layer"
        M[SQLAlchemy ORM]
        N[MySQL Database]
        O[File Storage System]
        P[Email Service]
    end
    
    subgraph "Security Layer"
        Q[JWT Token Management]
        R[Google reCAPTCHA]
        S[Input Validation]
        T[HTTPS Encryption]
    end
    
    A --> E
    B --> F
    C --> G
    D --> H
    
    E --> I
    F --> J
    G --> K
    H --> L
    
    I --> M
    J --> N
    K --> O
    L --> P
    
    Q --> G
    R --> H
    S --> I
    T --> E
Loading

πŸ§ͺ Testing

Backend Testing

# Run unit tests
python -m pytest tests/ -v

# Run with coverage
python -m pytest tests/ --cov=app --cov-report=html

# Generate test data
python -c "from factories.users import generateusers; generateusers(50)"
python -c "from factories.tasks import generatetasks; generatetasks(100)"

Frontend Testing

# Run unit tests
ng test

# Run end-to-end tests
ng e2e

# Run tests with coverage
ng test --code-coverage

πŸ“š Resources

Documentation

Related Projects

Learning Resources

πŸ‘₯ Contributors

Role Contributor Contact
Lead Developer Chigbu Joshua GitHub Profile
Full-Stack Engineer Chigbu Joshua LinkedIn
Project Architect Chigbu Joshua Email

Contributing

We welcome contributions from the community! Here's how you can contribute:

  1. Fork the Repository

    git fork https://github.com/yourusername/collabhub.git
  2. Create Feature Branch

    git checkout -b feature/amazing-feature
  3. Commit Your Changes

    git commit -m 'Add some amazing feature'
  4. Push to Branch

    git push origin feature/amazing-feature
  5. Open Pull Request

    • Describe your changes in detail
    • Include screenshots if applicable
    • Reference any related issues

Code of Conduct

  • Write clean, maintainable code
  • Follow existing code style and conventions
  • Include tests for new features
  • Update documentation as needed
  • Be respectful in all interactions

πŸš€ Ready to collaborate?

CollabHub - Where teams unite and productivity soars

πŸ“– Architecture Guide β€’ πŸ“‹ Skills Index β€’ πŸ‘₯ Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published