How davizzz-bot/estilodeaprendizaje works
Project Type and Purpose
• This is a full-stack, modular Django web application (“Detector de Estilos de Aprendizaje”) whose goal is to evaluate students’ learning styles via an interactive test and deliver AI-driven recommendations to both students and teachers.
• Key functional domains are: user authentication/dashboards, student profile management, teacher management, group management, activity management, and an AI/ML API for recommendation generation.
File Structure
• Top-level
• manage.py, requirements.txt, .gitignore
• Detector_Proyecto (Django project config: settings, URLs, ASGI/WSGI)
• Apps
• auth_app – handles login/logout and main dashboards
• Academico.* – a suite of six apps named Estudiantes, Docentes, Grupos, Actividades, Estudiantes_en_Grupos (M2M), each with models, views, forms, templates, static assets, migrations
• llm_api – interfaces with Google Gemini AI, processes PDF docs, uses embeddings and ML libraries
• Static & Templates
• Each app contains its own /static/css, /static/js (llm_api stores PDF docs) and /templates for UI views
• Configuration
• Detector_Proyecto/settings split into base/development/production
• .env variables for SECRET_KEY, database, Google API key
• requirements.txt lists Django REST Framework, google-generativeai, sentence-transformers, scikit-learn, psycopg2
README for Additional Insights
• System uses PostgreSQL as primary data store
• AI layer comprised of Google Generative AI API + local ML pipelines (embedding + cosine similarity) + PDF processing via PDF Plumber
• Core user roles: Student, Teacher, Admin
• Workflow: test → store encrypted results → generate visual analysis + IA recommendations
Diagramming the Architecture
a. Main Components
1. Client Browsers (Students, Teachers, Admins)
2. Frontend (HTML/CSS/JS served by Django templates; optional REST endpoints via DRF)
3. Django Backend
– URL Router → Views → Forms/Serializers
– Apps: auth_app, Academico.*, llm_api
4. PostgreSQL Database (models from all apps)
5. External Services:
– Google Gemini AI API
6. ML Pipeline (in llm_api):
– PDF Plumber extractor → Sentence Transformer embeddings → Scikit-learn similarity → Recommendation engine
b. Relationships & Data Flows
• User submits test → auth_app view → form validation → model.save() → DB
• On viewing dashboard → view queries DB → context → template → chart JS
• Teacher requests group analysis → view in Academico.Grupos → aggregated DB query → visual report
• Recommendation request → llm_api view → (a) fetch PDF docs → extract text → compute embeddings → call Google API for context → combine results → return JSON → frontend renders suggestions
c. Architectural Patterns & Principles
• Modular Django apps (separation of concerns)
• MVC (Django-ish MTV) pattern
• Layered AI pipeline separated into llm_api
• Environment-based configuration
• Secure data handling (encrypted fields, Django hashers, CSRF)
d. Key Technologies & Frameworks
• Django 5.1.3 (+ Django REST Framework)
• PostgreSQL
• Google Generative AI (via google-generativeai)
• Sentence Transformers & Scikit-learn
• PDF Plumber
• HTML5/CSS3/JS (Bootstrap implicitly in templates)
Detailed Elements to Capture
• Static assets served by Django’s staticfiles vs. templates rendering
• ML subcomponents: PDF ingestion, embeddings, similarity search, Google AI calls
• Roles & permissions: Student vs. Teacher dashboards controlled by auth_app
• Environment variables loaded via django-environ
• Deployment aspects (e.g., Gunicorn/WSGI, optional Docker, if in scope)