Qare is a simple full-stack app to track medical supplies. The backend exposes a clean REST API; the frontend provides a fast, friendly UI with pages for Home, Store, Admin, and Search.
- Home: quick intro with a hero image
- Store: read-only table of all supplies
- Admin: add, update, delete supplies
- Search: find a supply by name
- Status colors: amount
> 10(green),5–10(orange),< 5(red)
- Java 21, Maven, Spring Boot 3
- Spring Web, Validation, JDBC (H2 file DB by default)
- JUnit 5 (Jupiter), Spring Test, Mockito
- React 18, TypeScript, Vite
- React Router
.
├─ backend/ # Spring Boot API
│ ├─ src/main/java/com/qare/app
│ │ ├─ controller/QareController.java
│ │ ├─ service/QareService.java
│ │ ├─ config/{DBConfig, CorsConfig}.java
│ │ └─ model/MedicalSupply.java
│ └─ src/main/resources/application.yml
├─ frontend/ # React UI
│ ├─ src/
│ │ ├─ controller/supplies_client.ts
│ │ ├─ view/
│ │ │ └─ components/{SupplyForm, SupplyTable}.tsx
│ │ │ └─ pages/{Home,Store,Admin,Search}.tsx
│ │ ├─ model/supply_model.ts
│ │ └─ App.tsx
│ └─ vite.config.ts
└─ start.bash # simple dev starter (backend + frontend)
- POST
/api/supplies
Body:MedicalSupplyJSON
Returns:201 Created+Locationheader
- GET
/api/supplies→MedicalSupply[]
- GET
/api/supplies/{name}→200+ item or404
- PUT
/api/supplies/{name}→200or404if not found
- DELETE
/api/supplies/{name}→204or404
- Java 21 (JDK)
- Node.js 18+ and npm
- Ports 8080 (backend) and 5173 (frontend) available
# from repo root
chmod +x start.bash
./start.bashThis starts:
- Backend (Spring Boot) at http://localhost:8080
- Frontend (Vite) at http://localhost:5173
⚠️ Ensure ports 8080 and 5173 are free before starting.
Terminal 1 — backend
cd backend
./mvnw spring-boot:runTerminal 2 — frontend
cd frontend
npm install
npm run devOpen http://localhost:5173.