How rak-code/athena works
Project type and purpose
• This is a full-stack e-commerce application (“Athena”) with two main parts:
• A React-based frontend (user shopping site + admin panel).
• A Spring Boot backend exposing REST endpoints and handling business logic, persistence, authentication, and integrations.
• Primary use cases:
• Public users browse products, manage cart/wishlist, place orders, write reviews.
• Admin users log in to view metrics, manage products/orders/categories/users/payments.
• AI chat support via Hugging Face API.
File structure
• Top level:
• frontend/ – React app code, components, pages, contexts, services, styles, build configs.
• backend/ – Spring Boot code, controllers, services, repositories, models, config, Docker & Maven setup, Flyway migrations.
• athena.sql + migration scripts under backend/src/main/resources/db/migration – MySQL schema & migrations.
• Architectural patterns & layers in backend:
• Controllers → Services → Repositories (DAO) → Database (MySQL).
• Configuration classes for CORS, Web, OpenAPI, Security (JWT).
• Deployment artifacts:
• backend/Dockerfile + docker-compose.yml (backend + DB).
• frontend/.env → points to backend API.
Key insights from README
• Technologies: React.js, React Router, Axios, Bootstrap on frontend; Spring Boot, Spring Security (JWT), Flyway, JPA/Hibernate, MySQL on backend.
• Features: role-based auth, product/order/user management, shopping cart, wishlist, reviews, email notifications, AI chat integration.
• API contract: many /api/... endpoints grouped by resource (products, orders, users, etc.).
• Controllers (list major controllers)
• Services (list PaymentService, OrderService, EmailService, HuggingFaceChatService)
• Repositories
• Config & Security (CorsConfig, WebConfig, SecurityConfig, JwtAuthenticationFilter)
• Client → Controllers (HTTP/REST + JWT)
• Controllers → Services → Repositories → MySQL
• Services → External services
• Database → Controllers (read queries)