Skip to content

Repository files navigation

Malware Classification Web UI

This project is a web-based application for malware classification. It allows users to interact with machine learning models to understand how different features affect the classification of software as malicious or benign. The application is built with Python and the Django web framework. It's available for public at https://csday.ali-ayati.com.

The core of the application involves training machine learning models (likely using scikit-learn and pandas) and visualizing the results (using matplotlib). The frontend is likely built using standard HTML, CSS, and JavaScript, served by Django's templating engine.

The entire application is designed to be run in Docker containers, with Nginx acting as a reverse proxy for the Gunicorn application server.

Key Technologies

  • Backend: Python, Django, Gunicorn
  • Machine Learning: scikit-learn, pandas, matplotlib
  • Frontend: HTML, CSS, JavaScript (within Django templates)
  • Database: SQLite (default)
  • Deployment: Docker, Nginx

Architecture

The project follows a standard Django architecture:

  • csday: The main Django project directory containing settings and root URL configurations.
  • dashboard: A Django app that handles the main user-facing features like challenges, results, and leaderboards.
  • users: A Django app for user authentication and management.
  • ml_model: A Python package containing the machine learning model training logic.
  • templates: Contains the HTML templates for the application.
  • static: Contains the static assets (CSS, JavaScript).

Building and Running

For the csday production deployment, follow deploy/README.md. The production Compose stack uses PostgreSQL 16, Django 5.2 LTS, and loopback-only Nginx origins; the host handles Cloudflare/Tailscale separately. The legacy root docker-compose.yml and dotenv_template are not the production configuration.

Validate without printing credentials:

docker compose --env-file /home/ubuntu/data/csday/secrets/app.env \
  -f deploy/compose.production.yml config --quiet

See the deployment guide for persistent-path ownership, required environment names, database import, build/start commands, health checks, and resource limits.

Development

For development, you can run the Django development server directly:

  1. Install dependencies:

    pip install -r requirements.txt
  2. Run database migrations:

    python manage.py migrate
  3. Start the development server:

    python manage.py runserver

    The application will be available at http://localhost:8000.

Development Conventions

  • Code Style: The Python code appears to follow standard PEP 8 conventions.
  • Configuration: Application configuration is managed through environment variables (see dotenv_template).
  • Static Files: Static files are managed by Django's staticfiles app and are collected into a staticfiles directory for production.
  • Dependencies: Python dependencies are managed in requirements.txt.

Releases

Packages

Used by

Contributors

Languages