Skip to content

Project Architecture

Re-Krass edited this page Nov 16, 2026 · 1 revision

🏗️ Project Architecture

The project now has two intentionally distinct execution models. The historical application remains a real client–server system locally; GitHub Pages hosts a browser-only demo and a separate archived API reference.

Original and restored full-stack architecture

flowchart TB
  Browser["Browser / Vue 2 SPA"] -->|"HTTP / REST, JWT"| Proxy["Development proxy /api"]
  Proxy --> DRF["Django REST Framework API"]
  DRF --> ORM["Django ORM and application models"]
  ORM --> DB[("MariaDB relational database")]
  DRF --> Assets["Uploaded learning resources (local media)"]
Loading
Layer Technology Responsibility
Presentation Vue 2, Vue Router, Bootstrap, Sass Routes, courses, quizzes, forums and profile interface
Client state Vuex, Axios Logged-in user, courses and API requests
Business/API Django 2 and Django REST Framework Authentication, serializers, endpoints and permissions
Persistence MariaDB Users, enrolments, forum data and course content
Local integration Docker Compose Frontend, backend and database containers

The development frontend proxies /api/ to Django. Its API client is not coupled directly to the historic public api.ydlearning.com domain in local development.

Static GitHub Pages architecture

flowchart LR
  Visitor["Visitor"] --> Pages["younganddigitallearning.github.io"]
  Pages --> Vue["Vue 2 static assets"]
  Vue --> Adapter["In-browser mock Axios adapter"]
  Adapter --> Fiction["Fictional seed data"]
  Adapter <--> Browser[("Browser localStorage")]
  Visitor --> Docs["/ydl-api/ Swagger UI"]
  Docs --> Schema["Bundled OpenAPI 2.0 JSON"]
Loading

No Django, MariaDB, live authorization service, or real student records are provided by GitHub Pages. Mock login only selects a fictional demo role. Changes to course content and enrollment remain in that visitor's browser and can be reset.

Key interaction: student enrollment

sequenceDiagram
  actor Student
  participant Vue as Vue course catalog
  participant Client as Axios / Vuex
  participant API as Django or mock adapter
  participant State as DB or browser storage
  Student->>Vue: Enroll in a course
  Vue->>Client: Update student enrollment
  Client->>API: PUT /students/{user}
  API->>State: Save selected courses
  API-->>Client: Updated student
  Client->>API: GET /courses/
  API-->>Client: Joined courses and events
  Client-->>Vue: Refresh sidebar and dashboard
Loading

This diagram illustrates the intended endpoint-level workflow. Access control and production security should not be inferred from the static mock's behavior.

Security and scope

  • The legacy Django runtime is for local demonstration, not public hosting.
  • Only fictional sample data belongs in the public static build.
  • Local .env files, real credentials, private dumps and browser profiles must not be published.
  • Quiz scoring in the public demo is client-side and is not a verified examination record.
  • Historical Django endpoints and permissions require modernization before any real public backend deployment.

Next: Frontend architecture · Backend and REST API · Public demo mode

Clone this wiki locally