How fran-tor/to-do-app works
Main Components
• Frontend: A ReactJS application using TypeScript, which runs on port 8080. It includes components (views, modals, context providers, tests, etc.), API integrations (e.g., src/api/todos.ts), and static assets.
• Backend: A Spring Boot application running on port 9090, with clearly defined layers:
• Controllers: For example, TodoController (manages HTTP requests)
• Services: E.g., TodoService (business logic)
• Repositories: E.g., TodoRepository (data storage via in-memory collections with a design that can switch to a persistent DB later)
• Model/Domain: TodoModel, MetricsModel, and TodoResponse among others
• Configuration: Application properties and initialization files (ServletInitializer, Maven wrapper scripts, etc.)
• Shared Assets: The assets directory for static resources such as the screenshot in the README, used by both the front end and for marketing/documentation.
And Map Relationships
• The frontend communicates with the backend using RESTful API endpoints (GET, PUT, POST endpoints on /todos).
• The backend’s Controllers route incoming API calls to the Service layer, which then uses the Repository for data fetching/storing.
• The in-memory data handling strategy is embedded in the Repository, but architecturally structured to allow a future integration of a persistent database.
• The frontend leverages multiple components (views, modals, context management) to maintain and update UI state, and it calls the backend API endpoints to reflect changes (creating, editing, filtering, pagination, and metrics).
Architectural Patterns & Design Principles to Highlight
• Layered Architecture in the backend (Controller → Service → Repository) promoting clear separation of concerns.
• MVC-like structure in handling front-end views and state management.
• REST API communication between the frontend and the backend.
• The design is easily extendable: It emphasizes the in-memory storage abstraction for future database integration.
• Modular design on both sides: Frontend components are logically organized (components, views, tests), and backend packages (controllers, models, services) are neatly separated.
Technologies & Frameworks
• Frontend: ReactJS, TypeScript, Vite, optionally React Context or Redux.
• Backend: Java, Spring Boot, Maven.
• Testing: Java-based unit tests (in backend/src/test) and front-end tests via Vitest/Jest.