How mohamedaminefairouk/comptasync works
Project type and purpose
• This is a full-stack accounting application (“ComptaSync”) composed of:
• A Spring Boot backend (REST API for transaction import, ledger management, report generation & export)
• A React + TypeScript frontend (UI for uploading files, viewing transactions and reports, managing templates)
File structure
• Top level:
• ComptaSync-Back: Maven/Spring Boot project
– src/main/java/com/project/comptabilite: MVC layering (controller, service, repository, model, dto, config, exception, util)
– application.yml, SwaggerConfig, JacksonConfig for API docs and JSON/XML/CSV binding
– Tests under src/test
• ComptaSync-Front: React + TS
– src/api: Axios client & accountingService wrappers
– src/redux: Redux Toolkit slices & store
– src/components: reusable UI components (Dashboard, UploadFile, Report, TransactionList, etc.)
– src/hooks, src/utils, src/models, src/styles
– Jest + Testing Library tests
README
• Backend: supports JSON/XML/CSV import (Jackson, Commons CSV), balanced transactions, balance sheet & income statement generation, Excel export (Apache POI), documented via Swagger, TDD
• Frontend: React Router, memoization, lazy loading, template management in Redux, msw for API mocks
a. Main components
• Browser (React SPA)
• React App layers:
– UI Components
– Hooks & Utils
– Redux Store & Slices
– HTTP Client (apiClient + accountingService)
• Backend REST API (Spring Boot):
– Controllers
– Services (AccountingService, ReportService, ReportExportService)
– Repositories (JPA Repos for GeneralLedgerEntry, Report)
– Config modules (JacksonConfig, SwaggerConfig)
– Exception handling
• Database (relational, e.g., PostgreSQL/MySQL)
• File formats & libraries: JSON, XML, CSV parsers, Excel exporter
• External: Swagger UI
b. Relationships & interactions
• User → Browser → React components
• React components dispatch actions → Redux store → trigger API calls via axios
• API calls (GET/POST) → Spring Boot controllers → service layer → repository → database
• Report export request → service layer uses Apache POI → returns file stream
• Swagger UI served from Spring Boot
c. Architectural patterns and design principles
• Backend: MVC (Controller → Service → Repository) + layered architecture
• Frontend: Component-based UI + Flux (Redux) for state management + hooks for side-effects
• Separation of concerns (import vs. report generation vs. export)
• TDD across both tiers
d. Technologies, frameworks, libraries
• Backend: Java/Kotlin, Spring Boot, Spring Data JPA, Jackson, Apache Commons CSV, Apache POI, Swagger
• Frontend: React, TypeScript, Redux Toolkit, React Router, Axios, Jest, Testing Library, msw