How aptrs/aptrs works
Project type and purpose
• This is a full-stack, Django-based web application (“Automated Penetration Testing Reporting System”) with a React/TypeScript frontend.
• Purpose: allow pen-test teams to manage projects, track vulnerabilities, generate custom reports (PDF, DOCX, Excel), and provide a customer dashboard.
File structure
• Top-level “APTRS” directory holds the Django project and apps: accounts, configapi, customers, project, vulnerability, plus shared utils and celery config.
• Frontend sits in “frontend/” with React+Vite, TypeScript, Tailwind CSS.
• Docker artifacts: docker-compose.yml orchestrates API, frontend (via Nginx), database, broker, etc.
• CI/CD configs in .github/workflows.
• env.example, env.docker, pyproject.toml/requirements.txt indicate Python dependencies.
README insights
• Confirms Django REST API, React frontend, Docker deployments.
• Mentions features like customer login, report templates, scheduling/retest.
• Suggests external dependencies: SMTP/email, AWS S3 (s3_utils), Celery for background tasks.
Main components & interactions
a. Frontend:
• Static hosting/ Nginx serving React app.
• Browser executes React app; calls Django REST API.
b. Backend API:
• Django process (Gunicorn/ASGI) serving REST endpoints from apps: accounts, customers, project, vulnerability, configapi.
• Business logic: serializers, views, tasks, signals.
• Celery worker for asynchronous jobs (report generation, email notifications, tasks.py in apps).
c. Persistence:
• PostgreSQL (or similar) as relational database for all Django models.
• Redis or RabbitMQ as Celery broker & result store.
• AWS S3 (via s3_utils) for media/files/reports storage.
d. External services:
• SMTP email service (email_notification).
• Optional OAuth providers if any (token_utils).
e. Users:
• Admin user (Django admin).
• Customer user (via customer dashboard).
Architectural patterns & design principles
• MVC (Model-Serializer-View) within Django REST Framework.
• Modular “app” structure: each domain (accounts, project, vulnerability) is self-contained.
• Asynchronous background processing with Celery.
• 12-factor app: environment config, separate build and run, logs to STDOUT.
• Rectangles with component names: Browser, Nginx, React App, Django REST API, Celery Worker, PostgreSQL, Redis, S3, SMTP.