How team-scandela/scandela works
Main Components
• Frontend Clients:
• The main web interface: Located under the “scandelapp” directory (a ReactJS application). It contains components, pages (e.g., home, features, admin, etc.), assets, and styles.
• Browser Extension: Located under “browserExtension”. This is an independent module offering an extension-based UI with its own React components.
• Additional Frontend: “newVitrine” and “forward” directories show alternative ways or variants of the web interface (possibly experimental designs or different deployment modes). Include them if they are used in production.
• Backend Server:
• “server” directory: A Java-based backend (likely Spring Boot given the structure) with controllers, services, DAOs (data access objects), entities, and configuration. This handles APIs, business logic, authentication (controllers such as LoginController, NotificationController, etc.), and likely interacts with a database.
• Integration & Deployment:
• Docker: Dockerfile(s) in “server” and docker-compose files (docker-compose.yml and docker-compose.dev.yml) indicate containerized deployment.
• CI/CD: The .github/workflows folder with CI.yaml and deploy.yaml shows continuous integration and deployment mechanisms.
• External Dependencies:
• Although not explicitly shown as a separate module, the server layer typically interacts with a database (implied by the use of DAOs and entities).
• Other external services might include email systems (EmailController and EmailService), payment APIs (StripeWebhookController and StripeService), and mapping systems (hinted by components such as “Map”, “Legends”, “RadarChartComponent”, etc.).
Relationships and Interactions between Components
• User devices/browsers access the web portal and browser extension, which communicate via HTTPS with the backend’s RESTful APIs.
• The ReactJS frontends (scandelapp, newVitrine) leverage a rich component hierarchy (as seen in the numerous subdirectories inside “scandelapp/src/components”) to render maps, charts, and data related to streetlights.
• The backend server (built in Java) exposes endpoints via its multiple controllers (LampController, AdminController, etc.) and orchestrates the interactions with the database through DAOs.
• Docker and CI/CD pipelines ensure that both frontend and backend components are built, deployed, and maintained consistently.
Architectural Patterns and Design Principles
• Component-Based Architecture for the frontend (ReactJS with clearly separated components, pages, hooks, and utilities).
• Layered/MVC Pattern in the backend (controllers, service layer, DAOs, and entities) which clearly separates concerns.
• Micro Frontends or Multi-Client Support: Different frontends (browserExtension, newVitrine, executable) imply that the system is built to support various client applications or views.
• Containerized Deployment with Docker and automation via CI/CD (GitHub workflows).
• Emphasis on modularity as seen by separate directories for tests (both frontend and backend) and documentation.
Relevant Technologies, Frameworks, and Libraries
• Frontend: ReactJS, TypeScript or JavaScript (with CSS for styling, and webpack configurations).
• Backend: Java (with Spring Boot, inferred by package structure), Maven for builds, and JUnit for testing.
• Deployment: Docker, Docker Compose.
• CI/CD: GitHub Actions for continuous integration and deployment.
• Others: Various utility libraries, possibly mapping libraries, and a potential relational database (not explicitly shown but assumed due to DAO/use).