How shara986/gogreenai works
GoGreen AI is a nursery-management platform: customers browse plant and category listings, while nursery owners maintain nursery details and plant inventory; authentication and role-based access govern those experiences. The React app routes users to pages, whose service modules call the Spring REST API. The API exposes authentication, catalog, nursery, and administration capabilities, with services implementing business operations over persistent data. The README documents the broader API and role capabilities; several controllers and service implementations were not sampled, so uncertain internal links are left out or marked unverified.
Main entry points: api Spring REST API · App.js Route application · AuthServiceImpl.java Authentication operations · PlantService.java Plant operations
Components 23
React application
- Route application
frontend/src/App.js - HTTP client
frontend/src/services/apiClient.js
Identity and access
- Auth context
frontend/src/context/AuthContext.jsx - Sign-in and registration
frontend/src/pages/auth - Protected routes
frontend/src/routes - Authentication endpoints
backend/src/main/java/com/gogreen/api/controller/AuthController.java - Authentication operations
backend/src/main/java/com/gogreen/api/service/impl/AuthServiceImpl.java - JWT security
backend/src/main/java/com/gogreen/api/security - Email service
backend/src/main/java/com/gogreen/api/service/impl/EmailServiceImpl.java
Nursery catalog
- Customer catalog
frontend/src/pages/customer - Owner inventory
frontend/src/pages/nursery - Catalog services
frontend/src/services - Plant endpoints
backend/src/main/java/com/gogreen/api/controller/NurseryPlantController.java - Plant operations
backend/src/main/java/com/gogreen/api/service/PlantService.java - Public catalog endpoints
backend/src/main/java/com/gogreen/api/controller - Category operations
backend/src/main/java/com/gogreen/api/service - Nursery operations
backend/src/main/java/com/gogreen/api/service
API and administration
- Spring REST API
backend/src/main/java/com/gogreen/api - Administration
backend/src/main/java/com/gogreen/api/controller
Persistence
- Data repositories
backend/src/main/java/com/gogreen/api/repository - Domain entities
backend/src/main/java/com/gogreen/api/entity - MySQL database
Other components
- Platform user
Connections 26
- Platform user → Route application: uses
frontend/src/App.js - Route application → Auth context: provides auth
frontend/src/App.js - Route application → Sign-in and registration: routes to
frontend/src/App.js - Route application → Protected routes: guards routes
frontend/src/App.js - Route application → Customer catalog: routes to
frontend/src/App.js - Route application → Owner inventory: routes to
frontend/src/App.js - Auth context → HTTP client: requests through
frontend/src/context/AuthContext.jsx - Customer catalog → Catalog services: requests through
frontend/src/pages/customer/PlantListing.jsx - Owner inventory → Catalog services: requests through
frontend/src/pages/nursery/PlantManagement.jsx - Catalog services → HTTP client: sends requests
frontend/src/services/plantService.js - HTTP client → Spring REST API: calls REST API
frontend/src/services/apiClient.js - Spring REST API → Authentication endpoints: routes auth
backend/src/main/java/com/gogreen/api/controller/AuthController.java - Authentication endpoints → Authentication operations: delegates to
backend/src/main/java/com/gogreen/api/controller/AuthController.java - Authentication operations → Email service: sends mail
backend/src/main/java/com/gogreen/api/service/impl/AuthServiceImpl.java - Authentication operations → Data repositories: reads and writes
backend/src/main/java/com/gogreen/api/service/impl/AuthServiceImpl.java - Authentication operations → JWT security: issues JWT
backend/src/main/java/com/gogreen/api/service/impl/AuthServiceImpl.java - Spring REST API → Plant endpoints: routes plants
backend/src/main/java/com/gogreen/api/controller/NurseryPlantController.java - Plant endpoints → Plant operations: delegates to
backend/src/main/java/com/gogreen/api/controller/NurseryPlantController.java - Spring REST API → Public catalog endpoints: serves catalog
backend/src/main/java/com/gogreen/api/controller/AuthController.java - Spring REST API → Category operations: exposes categories
README.md - Spring REST API → Nursery operations: exposes nursery
README.md - Spring REST API → Administration: provides admin
backend/src/main/java/com/gogreen/api/controller/AuthController.java - Plant operations → Data repositories: uses data access
- Authentication operations → Domain entities: manages users
backend/src/main/java/com/gogreen/api/service/impl/AuthServiceImpl.java - Plant operations → Domain entities: manages plants
backend/src/main/java/com/gogreen/api/service/PlantService.java - Data repositories → MySQL database: persists records
README.md