Project Overview
The Trotti-ul project involves creating a management platform for an electric scooter service. For this first phase (Adventure 1 and Mandatory Story), we focused on laying the foundations for user registration, adding scooters to the inventory, and tracking their availability.
The primary goal was to build a system capable of supporting load increases while remaining easy to modify. This project forced us to navigate between Clean Architecture theories and the realities of technical implementation.
Key Features
- Fleet Management: Adding, modifying, and real-time tracking of scooters available on campus.
- Scalable Architecture: Implementation of a modular structure to separate business logic from technical details (API, database).
- Decoupling via Bus: Use of a message bus to handle secondary actions without blocking the main process.
Development Process
Our process was marked by an intense learning phase on design patterns. Initially, we tried to merge Clean Architecture and Domain-Driven Design (DDD), which led to structural challenges that we had to address for the final submission.
Technologies used:
- Language: Java (for its robust typing)
- Framework: Jersey / JAX-RS for REST API creation
- Communication Tools: Internal message bus for notifications (emails)
- Testing: JUnit and Mockito to ensure business rule integrity
Skills Applied
- Domain-Driven Design (DDD): Modeling a complex domain by placing business logic at the center of the code.
- Architectural Refactoring: Ability to identify technical debt (anemic domain) and pivot toward a healthier solution.
- Modular Design: Organizing code into independent modules (API, Domain, Infrastructure).
- Asynchronous Communication: Implementation of buses to delegate tasks like email dispatch.
Challenges and Solutions
-
Challenge: At first, we mixed Clean Architecture and DDD, resulting in a modular monolithic architecture with an anemic domain. Business logic was scattered across services rather than within our entities. Solution: We executed a major pivot for the final submission by enriching our domain entities and applying a “purer” DDD, transforming our objects from simple data containers into true system actors.
-
Challenge: Managing email dispatch without weighing down the API response.
Solution: We introduced a Bus. When a significant action occurs, a message is sent to the bus and the email service handles it in isolation, ensuring the main logic is not slowed down.
Results and Learnings
The Trotti-ul project was a valuable lesson in the importance of architectural consistency. We learned that a rich domain is essential to prevent code from becoming a series of hard-to-maintain scripts. Although we only completed Adventure 1, the current architectural solidity ensures that future features can be implemented with great agility.