How kkgiorgos/ntua-ece-softeng works
This project is a full‐stack toll management system called Toll Connect that handles toll interoperability, managing transactions, settlements, and data analysis between different toll operators. The system is divided into several key components:
Main Components
• Backend Server – Implements a REST API using Deno. It is responsible for handling toll transactions, processing data, enforcing authentication (via JWT), and performing database operations (inserts, finds, deletes) with clearly separated modules (e.g., api routes, models, and database functions).
• Frontend Web Application – Built with Deno and a modern JavaScript framework (React with TypeScript) using Vite. It manages data visualization and analysis through components (charts, maps, dashboards) and consumes the API provided by the backend.
• CLI Tool – A command-line interface distributed under the cli-client directory that provides administrative utilities, such as resetting passes or viewing reports. This tool interacts with the backend or directly with data files.
• API Documentation – Located in the api folder (with an OpenAPI JSON and a Postman collection) which communicates the structure and usage of the REST endpoints.
• Supporting and Deployment Infrastructure – Dockerfiles for front-end, back-end, and auto-tool-docker, along with a docker-compose configuration (compose.yaml), enable containerization and seamless deployment for different services.
• Data Layers – While not an actual database server is detailed in the tree, there is a db-datadump directory that includes JSON dumps of toll-related data which indicates how data might be structured or initially loaded.
Relationships and Interactions
• The Frontend communicates with the Backend API over HTTP (REST endpoints) to retrieve toll data, statistics, and facilitate transactions.
• The Backend, using its well-organized routing and modular design (authentication, API, database functions), processes requests from both the Frontend and the CLI tool.
• The CLI interacts with the backend services or directly with the database functions (via Deno scripts) to allow administrators to manage toll operations and view analytical reports.
• Docker and Docker Compose are used to deploy these services, exposing the backend API on port 9115 and serving the frontend via Apache on port 80, ensuring that all components work together in a containerized environment.
• The API documentation (via OpenAPI and Postman documentation) serves as the contract between the frontend and backend, ensuring consistency in data exchange.
Architectural Patterns and Design Principles
• Separation of Concerns – Each component (frontend, backend, CLI) has a clear responsibility with appropriate modularization. The backend clearly separates API routes, business logic (e.g., authentication, data operations), and models.
• RESTful API Design – The backend’s use of routes and controllers suggests a RESTful architecture for communication.
• Containerization – With Docker and Docker Compose files included, the system is designed for containerized deployment, promoting consistency across environments.
• Scalability and Maintainability – The project structure with specific directories for data functions, models, and clearly segregated front-end components indicates an architecture designed for ease of maintenance and potential future expansion.