A Django-based web application to streamline operations between advertisers and publishers. Features include AI-based offer matching, automated invoicing, campaign performance management, and affiliate validation.
- Dashboard with revenue and profit analytics
- Advertiser and Publisher management
- Offer Matcher (AI-powered)
- Invoicing system with PDF generation
- Daily Revenue Sheet (DRS)
- Validation module
- Role-based permissions
- Python (Django)
- MySQL
- scikit-learn (AI matching)
- WeasyPrint (PDF generation)
- Docker
- Python 3.9+
- MySQL 8.0+
- For PDF generation on:
- Windows: GTK3 Runtime (download here)
- macOS: Install Cairo with Homebrew:
brew install cairo pango gdk-pixbuf libffi
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Configure MySQL in settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'your_db_name',
'USER': 'your_db_user',
'PASSWORD': 'your_db_password',
'HOST': 'localhost',
'PORT': '3306',
}
}- Run migrations:
python manage.py makemigrations python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
- Build the Docker image:
docker-compose build
- Start the containers:
docker-compose up
- Access the application at
http://127.0.0.1:8000/panel/users/login/. - For API access, use the endpoint
/api/get_amount/to retrieve currency amounts.
python manage.py update_rates- Install GTK3 Runtime from this link
- Add GTK3 to your system PATH:
Typically installed at: C:\Program Files\GTK3-Runtime Win64\bin- Restart your terminal/IDE after installation
- Install Homebrew if not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install required libraries:
brew install cairo pango gdk-pixbuf libffiproject/
├── apps/
│ ├── invoicing/ # Invoicing app
│ │ ├── models.py # Invoice models
│ │ ├── views.py # Invoice views
│ │ ├── templates/ # Invoice templates
│ │ └── ...
│ └── drs/ # Daily Revenue Sheets
├── requirements.txt # Project dependencies
└── README.md # Project documentation
Windows: Ensure GTK3 is in your PATH macOS: Verify Cairo installation with brew list cairo Both: Check WeasyPrint installation with python -m weasyprint --info
Ensure MySQL service is running Verify database credentials in settings.py