How azavea/iow-boundary-tool works
Main Components
• Frontend Client: Located under src/app. This component is built with React (evidenced by files like App.js, components, pages, and store) and appears to focus on map interactions (drawing tools, layers, geocoder, etc.).
• Backend Server: Found under src/django. This is a Django application that uses gunicorn for production (as noted in the README under “Gunicorn for Django app”) and provides RESTful API endpoints under src/django/api (with models, serializers, views, and a robust migrations structure).
• Deployment & Infrastructure Automation: There are several directories for deployment:
– Docker & Docker Compose (docker-compose.yml, docker-compose.override.yml, docker-compose.ci.yml), which handle containerization.
– Vagrant (Vagrantfile and related setup scripts) for VM-based development environments.
– Ansible and Terraform scripts (under deployment/ansible and deployment/terraform) which manage environment provisioning, configuration, and infrastructure as code.
• Data & Testing: The data directory and test scripts (inside src/django/api/tests and scripts/test) indicate components for data ingestion (municipal data, vector tiles, etc.) and automated testing.
• CI/CD: GitHub workflows (in .github/workflows) and various scripts (in scripts/) show that there is automated continuous integration and deployment integration.
Relationships and Interactions
• Deployment tools (Docker, Vagrant, Ansible, Terraform) interact with both environments – managing the build, test, and deployment of the Frontend and Backend components.
• CI/CD pipelines (under GitHub workflows and scripts such as cibuild, update, test) orchestrate the automated build and test steps, linking the developer’s commits and testing with the deployments.
• External services like municipal data sources (invoked by scripts such as fetch-data) and possibly external authentication services (implied by the mailing templates) should be depicted along with API interactions where relevant.
Architectural Patterns & Design Principles
• Separation of Concerns: The project is clearly divided into a Frontend (React) and a Backend (Django) which communicate over a RESTful interface.
• Containerization & Infrastructure as Code: Emphasize the use of Docker for containerization, along with Vagrant for VM-based development and Ansible/Terraform for provisioning and infrastructure management.
• Modular Design: The Django portion exhibits an MVC-like pattern (models, views, serializers, templates) while the frontend has a modular structure with separate folders for components, pages, and state management.
• Testing & CI/CD: The project includes dedicated scripts for linting, testing, and CI build pipelines, reinforcing these best practices in the architecture.
Relevant Technologies & Frameworks
• Backend: Django, Gunicorn, and the Django REST framework aspects (serializers, views).
• Deployment/Automation: Docker, Vagrant, Ansible, Terraform, GitHub Actions.
• Additional Tools: Pre-commit hooks, linting/formatting scripts, and various utility scripts under ./scripts.