How ucf/search-service-django works
Main Components
• Core API and business logic (located in “core” and other Django apps such as “images”, “programs”, “research”, “teledata”, and “units”).
• Django Management Commands & Utilities (management commands in programs, research, teledata, etc., plus custom scripts like deployment and data import).
• Template Layer: Django templates (found in the “templates” directory) that serve the HTML views (including admin dashboards).
• Settings and Configurations (settings.py, settings_local.tmpl.py, etc.)
• Frontend Application (Angular – Archimedes):
• Angular App: Found in the “archimedes” directory, it includes the Angular project’s configuration (angular.json, package.json) and its components (under src/app/component/*). This layer is responsible for the UI and interacts with the backend REST API.
• Build and Deployment Tools: Includes npm, gulp (gulpfile.js, gulp-config.json), and build pipelines for converting Angular code into static assets. Also note the “static” folder that holds compiled assets.
• Database:
• While the file tree does not explicitly list a database configuration file, you have multiple migration folders (for each Django app such as “core/migrations”, “programs/migrations”, etc.) indicating that a relational database (e.g., PostgreSQL/MySQL) is used to persist data.
• External Tools and Dependencies:
• Third-party frontend libraries such as Fontawesome Pro (as mentioned in the README), and Node dependencies.
• Python dependencies (managed via requirements.txt, dev-requirements.txt and pyproject.toml) including packages like lxml, spacy (used by management commands), etc.
• External build and dependency management systems like pip-tools (for managing pip packages).
Relationships and Interactions
• The Angular Frontend (Archimedes) will communicate with the Django backend using HTTP/REST calls.
• The Django backend orchestrates data processing through its multiple apps, uses models and migrations to interact with the database, and also serves rendered templates for parts of the application (e.g., admin dashboard, login).
• Management commands and background tasks (found in each of the apps’ management/commands directories) perform data imports and other scheduled tasks, which may update the database, indirectly affecting the API responses.
Architectural Patterns and Design Principles
• Separation of Concerns: The architecture clearly separates the frontend (Angular) from the backend (Django REST API) and further subdivides backend logic across several Django apps.
• Modular Design: The Django backend is divided into modules (core, images, programs, research, teledata, units) each handling separate aspects of the overall functionality.
• Use of RESTful APIs: The Angular application acts as a client consuming the data served by the Django REST API endpoints.
• Build Pipeline: Use of Angular CLI, Gulp, and npm for building and deploying the frontend assets.
Additional Details to Capture
• Configuration and Dependency Management: Represent the node modules, gulp configuration, and Python package management (requirements.txt, pyproject.toml) as foundational blocks that support the build and deployment processes.
• Versioning/Build Processes: Indicate that there are scripts like “gulp default” for builds, Angular CLI commands (ng build), and Django commands (manage.py migrate, deploy) in the process workflow.