TaskHub is a comprehensive project management platform built with a microservices architecture using Python, FastAPI, SQLAlchemy, and Supabase.
Once the services are executing, u can acced them:
- API Gateway:
http://localhost:8000/docs - Auth Service:
http://localhost:8001/docs - Project Service:
http://localhost:8002/docs - Document Service:
http://localhost:8003/docs - Notification Service:
http://localhost:8004/docs - External Tools Service:
http://localhost:8005/docs
For detailed information about the project, please refer to the following documentation:
- Project Status Report - Current state of features, known issues, and pending work
- Developer Manual - Technical documentation for developers
- API Documentation - Detailed API endpoints documentation
These documents provide comprehensive information about:
- Implementation status and roadmap
- System architecture and design patterns
- Development setup and guidelines
- API specifications and usage
- Contribution workflows
taskhub/ ├── api/ │ ├── init.py │ ├── api-gateway/ │ │ ├── main.py │ │ ├── middleware/ │ │ │ ├── auth_middleware.py │ │ │ └── circuit_breaker.py │ │ └── utils/ │ │ └── service_registry.py │ ├── auth-service/ │ │ └── app/ │ │ ├── main.py │ │ ├── schemas/ │ │ │ └── user.py │ │ └── services/ │ │ └── auth_service.py │ ├── document-service/ │ │ └── app/ │ │ ├── main.py │ │ ├── decorators/ │ │ │ └── document_decorators.py │ │ ├── factories/ │ │ │ └── document_factory.py │ │ ├── schemas/ │ │ │ └���─ document.py │ │ └── services/ │ │ └── document_service.py │ ├── external-tools-service/ │ │ └── app/ │ │ ├── main.py │ │ ├── adapters/ │ │ │ └── oauth_adapter.py │ │ ├── schemas/ │ │ │ └── external_tools.py │ │ └── services/ │ │ └── external_tools_service.py │ ├── notification-service/ │ │ └── app/ │ │ ├── main.py │ │ ├── observers/ │ │ │ └── notification_observer.py │ │ ├── schemas/ │ │ │ └── notification.py │ │ └── services/ │ │ └── notification_service.py │ ├── project-service/ │ │ └── app/ │ │ ├── main.py │ │ ├── commands/ │ │ │ └── task_commands.py │ │ ├── schemas/ │ │ │ ├── activity.py │ │ │ ├── project.py │ │ │ └── task.py │ │ └── services/ │ │ ├── activity_service.py │ │ ├── project_service.py │ │ └── task_service.py │ ├── shared/ │ │ ├── dtos/ │ │ │ ├── auth_dtos.py │ │ │ ├── document_dtos.py │ │ │ ├── external_tools_dtos.py │ │ │ ├── notification_dtos.py │ │ │ └── project_dtos.py │ │ ├── exceptions/ │ │ │ ├── auth_exceptions.py │ │ │ ├── base_exceptions.py │ │ │ ├── document_exceptions.py │ │ │ └── project_exceptions.py │ │ ├── models/ │ │ │ ├── base.py │ │ │ ├── document.py │ │ │ ├── external_tools.py │ │ │ ├── notification.py │ │ │ ├── project.py │ │ │ └── user.py │ │ └── utils/ │ │ ├── db.py │ │ ├── jwt.py │ │ ├── rabbitmq.py │ │ └── supabase.py │ └── tests/ │ ├── auth/ │ ├── document/ │ └── project/ ├── .env.example ├── docker-compose.yml ├── Dockerfile ├── pyproject.toml └── README.md
The API Gateway serves as the single entry point for all client requests. It routes requests to the appropriate microservice, handles authentication, and implements circuit breaker patterns for resilience.
Manages user authentication and authorization using JWT tokens and Supabase Auth.
Handles project management, tasks, and activity tracking. Implements the Command pattern for undo/redo functionality.
Manages document storage, versioning, and permissions. Uses the Factory Method pattern for document creation and the Decorator pattern for additional functionality.
Sends notifications through various channels (in-app, email, push, SMS) using the Observer pattern.
Integrates with external services like GitHub, Google Drive, etc. using the Adapter pattern.
- Singleton: Used for database and Supabase connections
- Factory Method: Used for document creation
- Command: Used for task operations with undo/redo functionality
- Observer: Used for notification delivery
- Adapter: Used for external tool integrations
- Decorator: Used for document functionality
- Facade: Used in the API Gateway
- Circuit Breaker: Used for service resilience
- Admin: Full access to all system features
- Owner: Full access to owned projects and their resources
- Member: Limited access based on project permissions
- Python 3.13+
- Poetry
- Docker and Docker Compose
- Supabase account
-
Clone the repository:
git clone https://github.com/yourusername/taskhub.git cd taskhub -
Install dependencies:
poetry install
-
Create a
.envfile based on.env.example:cp .env.example .env
-
Update the
.envfile with your Supabase credentials and other configuration.
docker-compose up -d-
Start the services individually:
# Terminal 1 uvicorn api.auth-service.app.main:app --host 0.0.0.0 --port 8001 # Terminal 2 uvicorn api.project-service.app.main:app --host 0.0.0.0 --port 8002 # Terminal 3 uvicorn api.document-service.app.main:app --host 0.0.0.0 --port 8003 # Terminal 4 uvicorn api.notification-service.app.main:app --host 0.0.0.0 --port 8004 # Terminal 5 uvicorn api.external-tools-service.app.main:app --host 0.0.0.0 --port 8005 # Terminal 6 uvicorn api.api-gateway.main:app --host 0.0.0.0 --port 8000
-
Access the API at
http://localhost:8000
Once the services are running, you can access the API documentation at:
- API Gateway:
http://localhost:8000/docs - Auth Service:
http://localhost:8001/docs - Project Service:
http://localhost:8002/docs - Document Service:
http://localhost:8003/docs - Notification Service:
http://localhost:8004/docs - External Tools Service:
http://localhost:8005/docs
The application can be deployed to various cloud providers:
- Create an ECR repository for each service
- Push Docker images to ECR
- Deploy using ECS or EKS
- Create an Azure Container Registry
- Push Docker images to ACR
- Deploy using Azure Kubernetes Service or App Service
- Install the Fly CLI
- Configure the
fly.tomlfile - Deploy with
fly deploy
- Store sensitive tokens in a secure vault
- Implement proper token revocation
- Use HTTPS for all communications
- Encrypt sensitive data at rest
- Implement rate limiting
- Regularly rotate keys and credentials
- Scalability: Each microservice can be scaled independently
- Resilience: Circuit breaker pattern prevents cascading failures
- Flexibility: Services can be developed, deployed, and scaled independently
- Technology Evolution: Different services can adopt new technologies without affecting others
- Team Organization: Teams can work on different services in parallel
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
You can find more information about this license at https://www.gnu.org/licenses/gpl-3.0.html