How x1n4px/astrouma works
Main Components
• Frontend: A React application that includes pages, components (charts, maps, modals, layout, etc.), services, and configuration files. The structure segregates view components (e.g., pages for dashboard, authentication, astronomy reports) and service modules that interact with the backend.
• Backend: A Node.js API structured in several directories:
– Controllers: Handling specific request logic (e.g., activeShowerController, authController, etc.).
– Routes: Defining the endpoints for each of the controllers.
– Middlewares: Functions for handling JWT extraction, coordinate conversion, and validation.
– Database: A dedicated module for the MariaDB connection.
– Entry point (index.ts): Bootstraps the API.
• Database: MariaDB that stores meteor shower data.
• Auxiliary/Legacy Files: Additional directories (e.g., TFG_2022, Informes_Ejemplo, aux) that provide example data, reports, or legacy information. While not core to the online architecture, they might be referenced or used for testing/demo data.
Relationships and Data Flow
• Users access the application through a web browser, which loads the React frontend.
• The Frontend components make HTTP/HTTPS API calls (using the service modules like authService, stationService, etc.) to the Backend.
• The Backend handles incoming API calls—routing them through its routers, processing via controllers (with middleware assistance where needed for tasks like JWT validation), and finally interacting with the MariaDB database to query or update data.
• The responses flow back to the frontend, where data visualization components (charts, maps, etc.) render the results.
• Optionally, include any interactions with static reporting files or legacy modules that might support additional functionalities.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly split into Frontend and Backend. In the backend, the use of controllers, routes, and middlewares follows an MVC-like pattern.
• Modularity: Both the frontend and backend are organized into reusable modules/components. Services in the frontend abstract API calls, while the backend’s folder structure promotes modular API creation.
• Scalability and Maintainability: Configuration files (like package.json, vercel.json) and clear separation of service logic ensure that the project can scale and evolve.
Specify the Relevant Technologies and Tools
• Frontend: React, React Router, various chart and visualization libraries (as visible from the “chart” components like BarChart, LineChart, etc.), and configuration tools for localization and ESLint.
• Backend: Node.js, Express (or similar), TypeScript (given the index.ts file), a set of custom middlewares, and a MariaDB connector.
• Database: MariaDB, as specified in the README.
• Deployment/Integration: Vercel configuration indicates potential cloud deployment; version control is set up via Git.