Teamflow is a modern, containerized SaaS platform for team and project management. Built with a robust backend using Django and a planned React frontend, it features role-based authentication, task tracking, and a CI/CD pipeline ready for production.
- Features
- Tech Stack
- 🚀 Getting Started
- ⚙️ Daily Development Workflow
- ✅ Code Quality & Testing
- CI/CD Pipeline
- Project Structure
- Environment Variables
- Contributing
- License
- Role-Based Authentication: Admin, Manager, and Member roles with distinct permissions.
- Project & Task Management: Create projects, assign tasks, and track their status.
- API First Design: A robust REST API built with Django REST Framework to power any frontend client.
- Dockerized Environment: Fully containerized development and production environments for consistency and ease of deployment.
- Automated Code Quality: Integrated linting and formatting with
black,isort, andflake8. - CI/CD Ready: A complete Continuous Integration pipeline using GitHub Actions to automate testing and quality checks.
| Layer | Technology |
|---|---|
| Backend | Django, Django REST Framework |
| Frontend (Planned) | React |
| Database | PostgreSQL |
| Authentication | django-allauth |
| Development | Docker, Docker Compose |
| Testing | Pytest, pytest-django |
| CI/CD | GitHub Actions |
This project is fully containerized. All you need is Git and Docker installed on your system. The Makefile abstracts away all the complexity.
git clone https://github.com/ActualLearner/teamflow.git
cd teamflowCreate a local environment file by copying the example. This file is ignored by Git and will hold your local secrets and configuration.
cp .env.example .envImportant: Open the .env file and review the variables. For local development, the default values are usually sufficient.
Run the setup command. This single command will build the Docker images, start the necessary services (web server, database), and run the initial database migrations.
make setupYour development environment is now running!
- API Server: http://localhost:8000/
- Admin Panel: http://localhost:8000/admin/
Use these make commands from your terminal to manage the development environment.
| Command | Description |
|---|---|
make up |
🚀 Starts the Docker services in the background. |
make down |
🛑 Stops the Docker services. |
make logs |
📜 View the real-time logs from the web server. |
make migrate |
🏃 Run database migrations inside the container. |
make shell |
💻 Open an interactive shell inside the web container. |
make superuser |
👑 Create a new superuser for the Django admin. |
We enforce code quality and test coverage using a combination of tools. These checks are also run in our CI pipeline.
| Command | Description |
|---|---|
make format |
🎨 Auto-formats all Python code with black and isort. Run this before committing! |
make lint |
🔎 Checks for code style issues and potential errors. The CI will fail if this doesn't pass. |
make test |
🧪 Runs the entire pytest test suite inside the container. |
This project uses GitHub Actions for Continuous Integration. The workflow is defined in .github/workflows/ci.yml and is triggered on every push or pull request to the dev, release, and main branches.
The pipeline performs the following steps:
- Builds the Docker images.
- Runs database migrations.
- Performs a strict lint and format check (
make lint). - Executes the full test suite (
make test).
A merge is blocked if any of these steps fail, ensuring the main branches are always stable.
teamflow/
├── .github/ # GitHub Actions workflows
├── docker/ # Docker configurations
├── src/ # Main Django source code
│ ├── config/ # Django project settings and URLs
│ ├── users/ # Custom user model, auth logic, and APIs
│ └── manage.py
├── .env # Local environment variables (Git ignored)
├── .env.example # Example environment file
├── Makefile # All your project commands in one place
├── pyproject.toml # Configuration for black, isort, flake8
└── requirements.txt
The following variables need to be set in your .env file:
SECRET_KEY: Django's secret key for cryptographic signing.DEBUG: Set toTruefor development to get detailed error pages.DATABASE_URL: The full connection string for PostgreSQL (e.g.,postgres://user:password@db:5432/dbname).POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB: Used by thedbservice to initialize the database. These must match the credentials inDATABASE_URL.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/YourAmazingFeature. - Commit your changes:
git commit -m "feat: Add some amazing feature". - Push to the branch:
git push origin feature/YourAmazingFeature. - Open a Pull Request against the
devbranch.
Please run make format before pushing to ensure code style consistency.
This project is licensed under the MIT License. See the LICENSE file for details.