How botirbakhtiyarov/ai-research-analyzer works
Project type and purpose
• This is a full-stack Django web application (“Research Analyzer”) for uploading, analyzing, AI-detecting, and summarizing PDF research papers.
• Key features (from README): user authentication, PDF upload, RoBERTa-based AI content detection, DeepSeek API summarization/translation, dashboard management.
File structure
• Top level:
• manage.py (Django entry point)
• research_analyzer/ (project settings: asgi.py, wsgi.py, settings.py, urls.py)
• core/ (Django app: models.py, views.py, urls.py, admin.py, tests.py, migrations/)
• templates/core/ (HTML templates for login, register, dashboard, upload, summary)
• media/ (uploaded PDFs)
• models/ (instruction.txt – project notes)
• requirements.txt
• Patterns: standard Django MVC:
• Models ↔ database (SQLite by default)
• Views (controllers) handle HTTP → call services (PDF extraction, AI model, external API) → render Templates
• Config/build: settings.py, .env for API key, requirements.txt, migrations/ manage DB schema.
README for additional insights
• Tech stack: Python 3.8+, Django 5.1.7, pdfplumber, transformers, openai, python-dotenv.
• AI model: roberta-base-openai-detector (local or auto-download).
• External service: DeepSeek API (HTTP, streaming responses).
• Workflow described: upload PDF → AI detection → metadata extraction → streamed summary → optional translation.
1. Client (Web Browser)
2. Reverse Proxy / Web Server (optional: Nginx/Gunicorn or Django dev server)
3. Django Application
• URL Router
• Core App
– Authentication Module
– Upload/Storage Module (media directory)
– AI Detection Service (local RoBERTa model)
– PDF Extraction (pdfplumber)
– Summarization Service (DeepSeek API client)
– Translation Service (DeepSeek API client)
• Templates (HTML)
• Static Files (CSS/JS if any)
4. Database (SQLite / configured RDBMS)
5. File Storage (media folder on disk or cloud)
6. External Services
• Hugging Face Model Hub (if auto-download)
• DeepSeek API
• Browser → HTTP → Django URL Router
• Router → View Functions in Core App
• Views → Authentication Module (login/register) ↔ Database
• Views → Upload Module → save PDF to media folder → Database (metadata record)
• Views → PDF Extraction (pdfplumber)
• Views → AI Detection Service (local RoBERTa)
• Views → Summarization Service (DeepSeek API call over HTTPS → streaming JSON) → back to View
• Views → render summary template → return to Browser
• Views → Translation Service (DeepSeek API) in–page call
c. Architectural patterns & principles:
• MVC (Model-View-Template)
• Single codebase monolith (one Django project with one core app)
• Service abstraction: AI detection and summarization broken out into service functions
• Streaming responses for real-time summary rendering
• Environment-based configuration (.env) for secrets
d. Key technologies/frameworks:
• Django 5.1.7 (URL routing, ORM, templates)
• pdfplumber (PDF text extraction)
• transformers (Hugging Face for local AI model)
• openai / DeepSeek API client (HTTP streaming)
• python-dotenv (environment variables)
• SQLite (default) or PostgreSQL (optional)