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://lab.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.
- Backend: Python, Django, Gunicorn
- Machine Learning: scikit-learn, pandas, matplotlib
- Frontend: HTML, CSS, JavaScript (within Django templates)
- Database: SQLite (default)
- Deployment: Docker, Nginx
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).
The project is designed to be built and run using Docker Compose.
- Docker
- Docker Compose
-
Create an environment file: Copy the
dotenv_templateto a new file named.env.prodand fill in the required environment variables.cp dotenv_template .env.prod
-
Build and start the containers:
docker-compose up --build
This command will build the Docker image for the web application, start the
webandnginxservices, and run the necessary database migrations. -
Access the application: The application should be accessible at
http://localhost:80in your web browser.
For development, you can run the Django development server directly:
-
Install dependencies:
pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
The application will be available at
http://localhost:8000.
- 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
staticfilesapp and are collected into astaticfilesdirectory for production. - Dependencies: Python dependencies are managed in
requirements.txt.