How caro-d54/medscan-ai_backend works
MedScan AI is a Spring Boot application for serving medicament records and simple web views. The main data workflow is a client request to the medicament API, which reads or saves records through a Spring Data repository backed by PostgreSQL. The README also documents mobile-client CORS and Hibernate schema management; their detailed wiring is not visible in the sampled source, and the tree contains no service layer despite the README’s architecture description.
Main entry points: MedicamentController.java Medicament API · HomeController.java Home routes · AppMedApplication.java Spring Boot app · MedicamentRepo.java Medicament repository
Components 11
Web and API
- Medicament API
src/main/java/com/medscan/app_med/controller/MedicamentController.java - Home routes
src/main/java/com/medscan/app_med/controller/HomeController.java
Medicament data
- Medicament repository
src/main/java/com/medscan/app_med/repository/MedicamentRepo.java - Medicament entity
src/main/java/com/medscan/app_med/model/Medicament.java
Application and views
- Spring Boot app
src/main/java/com/medscan/app_med/AppMedApplication.java - Application config
src/main/resources/application.yaml - Home view
src/main/resources/templates/home.html - User view
src/main/resources/templates/user.html
Other components
- API client
- Mobile client
- PostgreSQL
Connections 9
- API client → Medicament API: requests records
- Mobile client → Medicament API: CORS requests
- Medicament API → Medicament repository: queries and saves
- Medicament repository → PostgreSQL: reads and writes
- Medicament entity → PostgreSQL: maps table
- Home routes → Home view: returns view
- Home routes → User view: returns view
- Spring Boot app → Medicament API: starts Spring app
- Spring Boot app → Home routes: starts Spring app