- Java 11 (or later)
- Maven 3.6+
- Spring Boot 2.7.8
- Spring Data JPA
- Spring Security
- H2 Database (in-memory)
- JWT (io.jsonwebtoken:jjwt)
- Lombok 1.18.24
- Maven Compiler Plugin (3.8.1+)
- IDE with Annotation Processing enabled (e.g., IntelliJ IDEA, Eclipse)
- Authentication & User Management:
- User registration and login endpoints available.
- Basic user profile retrieval.
- Automatic admin user creation at startup.
- Kiosk Interactions:
- Endpoint to list available kiosks.
- Users can connect to an available kiosk.
- Simulated waste submission with image upload support.
- Rewards & Streaks:
- Endpoints for fetching rewards and redeeming them.
- Basic streak tracking mechanism that updates on approved waste submissions.
- Testing Interface:
- All functionalities accessible via REST APIs (e.g., via Postman or cURL).
Note: A dedicated UI (login page, dashboard, etc.) is not built yet.
- API & Backend Structure:
- Fully layered backend with Controllers, Services, and Repositories.
- Entities defined for User, Kiosk, WasteTransaction, Reward, and Streak.
- Security:
- JWT-based authentication with BCrypt password hashing.
- Role-based access control (normal vs. admin) enforced.
- Data Persistence:
- In-memory H2 database used for development.
- UUID fields configured with
@Type("uuid-char")for consistency.
- Error Handling & Utility:
- Global exception handling via
@ControllerAdvice. - Lombok integrated to reduce boilerplate in entities and DTOs.
- CommandLineRunner to automatically create an admin user.
- Global exception handling via
- Simulated Logic:
- Waste submission simulated with randomized values.
- Basic reward update and streak logic integrated into the waste submission flow.
- File Upload:
- Waste submission endpoint supports multipart image upload for future processing.
- UI/UX Development:
- Design and implement login and registration screens.
- Build a user dashboard for kiosk interaction.
- Develop a waste submission interface for capturing and uploading images.
- Create UI for viewing rewards and streak details.
- Provide visual feedback for waste submission outcomes (approved, rejected, retry).
- Build UI options for premium features (e.g., upgrade options, freeze streak notifications).
- Develop an admin interface for kiosk management (if required).
- Waste Processing:
- Replace simulated waste scanning with real image processing or sensor integration.
- Refine waste approval workflow to update rewards and streaks only on approved submissions.
- Reward & Streak Logic:
- Enhance reward point calculations (e.g., variable points, affiliate program integration).
- Refine streak calculation logic to support consecutive weeks and premium-specific features (e.g., auto-freeze on rejected submissions).
- Kiosk Management:
- Implement kiosk inactivity timeouts and automatic disconnection/release.
- Persistence & Scalability:
- Migrate from the in‑memory H2 database to a persistent, production-grade database (e.g., MySQL or PostgreSQL).
- Improve logging, error handling, and performance monitoring for production readiness.
- Integration:
- Connect with external systems (affiliate partners, recycling services, government subsidy systems).
- Testing & Documentation:
- Develop comprehensive unit and integration tests.
- Document APIs and workflows for front-end integration.