A lightweight Django CRM for freelancers to manage clients, projects and tasks.
git clone https://github.com/Annette3125/freelancer-crm.git
cd freelancer-crm
cp .env.sample .env
docker compose up --build
docker compose exec web python manage.py migrate
docker compose exec web python manage.py createsuperuser
# open http://127.0.0.1:8002/Demo data is not included. Create a superuser, then add sample clients/projects via the UI.
- Django web app with clean HTML UI
- Django REST Framework API for clients and projects
- Optional AI-generated project summaries
- Dockerized local setup
- Basic automated tests for models, API and management commands
- Backend: Django (Python)
- API: Django REST Framework (clients & projects endpoints)
- Templating: Django templates (HTML)
- Database: SQLite by default (PostgreSQL planned via Docker)
- Containerization: Docker, docker-compose
- Forms: Django
ModelForm+ crispy-forms - Testing: Django
TestCase, DRFAPITestCase, management command tests - Styling / JS:
- custom CSS,
- small vanilla JavaScript helpers (live search, AI summary toggle).
To run the project you’ll need:
-
Git – to clone the repository
https://git-scm.com/downloads -
Docker (recommended way to run)
- Docker Desktop (macOS / Windows)
- Docker Engine (Linux)
https://docs.docker.com/get-docker/
Optional (only if you want to run without Docker):
- Python 3.11+
https://www.python.org/downloads/
Any editor/IDE works:
- PyCharm Community Edition, VS Code, or any other editor that supports Python.
git clone https://github.com/Annette3125/freelancer-crm.git
cd freelancer-crm🚀 Option A – Run with Docker (recommended)
You don’t need a local Python setup for this option – everything runs inside Docker.
- Environment file
Copy the sample env file:
cp .env.sample .envEdit .env and set your own secret key (example):
DJANGO_SECRET_KEY=your-very-secret-key-here
DEBUG=True- Build and start the app
docker compose build
docker compose upOn first run, apply migrations (inside the container):
docker compose exec web python manage.py migrate
(If you change models and add new migrations later, you can run makemigrations + migrate in the same way.)
- Admin user (optional)
docker compose exec -it web python manage.py createsuperuser- URLs • Home: http://127.0.0.1:8002/ • Clients list: http://127.0.0.1:8002/clients/ • Projects list: http://127.0.0.1:8002/clients/projects/ • Admin: http://127.0.0.1:8002/admin/
To stop the app:
docker compose down🧪 Option B – Run locally (without Docker)
If you prefer to run Django directly on your machine.
- Create a virtual environment
From the project root:
Linux/macOS:
python3 -m venv venv
source venv/bin/activateWindows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1Windows (CMD):
python -m venv venv
venv\Scripts\activate.bat- Upgrade pip
python -m pip install --upgrade pip- Install dependencies
pip install -r requirements.txt- Environment file
cp .env.sample .envThe values in .env.sample are only examples, not real secrets.
Edit .env:
DJANGO_SECRET_KEY=your-very-secret-key-here
DEBUG=True
# Optional: OpenAI API key for AI project summaries
OPENAI_API_KEY=- Apply migrations and run the server
python manage.py migrate
python manage.py runserver 8002Open: • http://127.0.0.1:8002/
This project includes a small but growing test suite:
- Django
TestCasefor core models (Client,Project) - DRF
APITestCasefor API endpoints (/api/clients/,/api/projects/) - Tests for the
generate_project_summariesmanagement command
Run tests in Docker (recommended):
docker compose exec web python manage.py testIf you run the project without Docker, you can use:
python manage.py testAI summaries (optional):
-
If you set
OPENAI_API_KEYin.env, the management command
docker compose exec web python manage.py generate_project_summaries
will use OpenAI to generate short summaries. -
If
OPENAI_API_KEYis not set or something goes wrong, the app falls back to a simple truncated description and the UI still works.
-
Clients management
- Create, edit and list clients
- Store company name, country, status, notes
- Optional links: GitHub, LinkedIn, personal website
- Avatar URL support
-
Projects management
- Create projects and link them to clients
- Track project status (Planned / In progress / On hold / Done)
- Store budget, description, AI summary
- See all projects for a specific client
-
Smart status automation
post_savesignal updates client status based on project statuses- e.g. if any project is active → client becomes "Active"
-
Clean relationships
Client↔ProjectviaForeignKey- Reverse access:
client.projects.all()usingrelated_name
-
REST API
/api/clients/– list & create clients/api/clients/<id>/– retrieve / update / delete client/api/projects/– list & create projects/api/projects/<id>/– retrieve / update / delete project
-
Web UI
- HTML templates with inheritance (
base.html) - Clients dashboard, client detail view, projects dashboard
- Styled forms for client and project create/update flows
- Simple navigation between clients and projects
- HTML templates with inheritance (
-
Dockerized setup
- Application runs inside a Docker container
- Easy to start and stop locally
-
AI summaries (optional)
- Management command
generate_project_summaries - If
OPENAI_API_KEYis set – uses OpenAI to generate a short summary - If not – falls back to a truncated description (no external calls)
- Management command
-
UI & JS
- Dashboard-style clients and projects views with summary cards
- Clients & projects tables with status badges
- Live search:
- client list (filters as you type)
- project list (by title or client name)
- Toggle "Show AI summaries" on the projects page
-
Auth
- Sign up, login, logout
- Only authenticated users can manage clients & projects (
login_required)
This project is actively evolving — I’m extending it step by step with new features, tests and UI improvements.
- API auth & permissions
- protect DRF endpoints (token- or session-based auth)
- Database
- optional switch to PostgreSQL in Docker setup
- Frontend polish
- responsive layout for mobile screens
- additional UI refinements
- Tests
- extend coverage (more views, forms and API cases)
- AI layer
- additional AI helpers (e.g. summary improvements, client notes suggestions)
This repository is part of my personal portfolio.
It is intended for educational and demonstration purposes only.
Not production-ready without further hardening and security review.
I enjoy building backend tools with Python and Django.
I like taking the time to understand how things work under the hood
and to build projects like this one.


