This repository now ships a Spring Boot REST API and a Vite + React front-end for the SmartFold laundry operations demo. The backend exposes CRUD endpoints for customers, orders, deliveries, payments, tasks, and messages under /api/** while the React client consumes them via the Vite dev server.
- Java 17+
- Node.js 18+
./gradlew bootRunGradle is pre-configured to launch the SmartFold Spring Boot application and it listens on http://localhost:8080. Override the port when needed:
./gradlew bootRun --args='--server.port=8081'Authentication is provided by two in-memory demo users:
admin/admin123customer/customer123
The /api/auth/login endpoint powers the React demo cards and also returns a simple JSON payload (username, roles, demo token). All GET requests under /api/** are public. Mutating requests (POST/PUT/PATCH/DELETE) require HTTP Basic credentials and will receive 401 responses if you omit them. API documentation is available at http://localhost:8080/swagger-ui.html once the server is running.
cd smartfold-frontend
npm install
npm run devThe Vite dev server runs on http://localhost:5173 and proxies /api to the Spring Boot app on http://localhost:8080. The front-end ships with pages for Home, About, Pricing, Login, and the SmartFold dashboard (customers, orders, deliveries, payments, tasks, messages). Theme toggling, Bootstrap styling, and Axios-powered CRUD flows are included.
- Start the Spring Boot server (
./gradlew bootRun). - Start the Vite dev server (
npm run devinsidesmartfold-frontend). - Visit http://localhost:5173 and explore the public pages.
- Navigate to “Open App” to reach the dashboard. CRUD actions will call
/api/**via the proxy. Use theadmincredentials for actions that modify data.
Enjoy exploring SmartFold!