How fabiorg06/yuapp works
Project Overview & Purpose
• YuApp is an educational web application whose aim is to preserve and promote the Wayuu language. It offers interactive lessons, quizzes, and role-based management, similar in spirit to language-learning apps like Duolingo.
• The application uses a modern tech stack with a Django backend (coupled with PostgreSQL for data persistence), and a frontend built in React (integrating aspects of NestJS as indicated by the README).
Main Components Identification
a. Frontend:
– Built with React (and possibly Next.js as suggested by configuration files such as next.config.mjs, tsconfig.json, and tailwind configs).
– Contains UI components for authentication, admin panels, lesson displays, questions, and interactive content.
– Contains API service layers that handle interactions with the backend (grouped by features like chapters, lessons, questions, stats, words).
b. Backend:
– Built on Django; organized under a structured “Uapp” package that splits responsibility by modules.
– Key submodules include:
• Auth_system: Handles user authentication (with JWT support), user management, and related services.
• Content_system: Contains further subdivisions for Chapters, Lessons, Questions, Tags, and WordPhrases. Each has its own models, views, serializers, repositories, services, and URL routing – reflecting an organized, modular pattern.
• Stats_system: Manages user stats, including tracking lesson progress or learning performance.
• A primary Django setup (Uapp folder with settings, URLs, WSGI/ASGI) that ties the modules together.
c. Database:
– PostgreSQL serves as the database backing the Django backend.
d. Docker & Deployment:
– Both the backend and frontend have Dockerfiles indicating containerized deployment.
– A top-level docker-compose.yml orchestrates the deployment services (including the database and potentially other services).
Relationships & Interactions
• Frontend communicates with the backend API endpoints using HTTP calls. This includes authentication endpoints (registration, login), content fetching (chapters, lessons, questions), and stats retrieval.
• The backend’s modular structure means that each module (auth, content, stats) handles its specific domain logic. They interact with the database via Django’s ORM and employ design patterns such as repositories and services.
• The JWT authentication middleware ensures secure API access.
• Administrators use dedicated components and endpoints (both on the frontend and backend) for content management.
Architectural Patterns & Design Principles
• Separation of Concerns: Each module (auth, content, stats) is self-contained with its own models, repositories, services, and routes. This modular approach helps maintain a clear separation between different domains.
• MVC/MVT Pattern: Django’s typical Model-View-Template (or View) pattern is evident, supported by repositories and service layers for business logic.
• API-First & Micro-modularity: The frontend service layer is clearly divided for different API domains (chapters, lessons, questions, etc.), reinforcing the idea of fine-grained API interactions.
• Containerization & Environment Isolation: Dockerfiles for both frontend and backend indicate a containerized deployment approach.
Detailed Components
• Frontend:
– “UI Components” (Authentication forms, Lesson cards, Quiz components, Admin panels)
– “API Services” (grouped by chapters, lessons, questions, stats)
– “State Management & Hooks” (context and utility functions)
• Backend:
– “Authentication Module” (JWT Auth, Users, Middleware, Admin interface)
– “Content Module” subdividing into Chapters, Lessons, Questions, Tags, WordPhrases (each with Models, Repositories, Serializers, Services, and Views)
– “Stats Module” for user progress tracking (with relevant repository and service layers)
– “Core Django Setup” including settings, URL routing, and application entry point.
• Database:
– PostgreSQL database represented as an external component.
• Deployment:
– Docker containers for Frontend and Backend and Docker Compose bridging the services.