How bennyz327/gallxiv works
Project Components and Their Roles
• Frontend:
• Built with Vue 3 using the Composition API.
• Contains components, views, and a routing system (via Vue Router). It uses Pinia for state management.
• Includes an "api" directory with both auto-generated hooks and custom API integrations to interact with the backend.
• Backend:
• Developed with Spring Boot.
• Organized into clear layers: configurations (security, JWT, web), controllers (handling RESTful APIs for user authentication, post management, and media handling), services (business logic), repositories (data access) and DTOs/entities for database mapping.
• Uses Gradle for builds (see build.gradle.kts) and has its main configuration in application.yml.
• Supporting and Deployment Components:
• There is a docker-compose YAML for running the database container.
• Gradle and Docker configurations indicate an environment ready for containerized deployment and continuous integration.
Relationships and Data Flow
• Frontend ↔ Backend: The frontend sends API requests (using auto-generated API hooks) to the backend for authentication, posting, and media retrieval.
• Backend ↔ Database: The backend (via repositories) communicates with the database for CRUD operations.
• Docker: Optionally, include a database container node (launched via docker-compose) that interacts with the backend.
Architectural Patterns and Design Principles
• The backend follows a layered architecture (commonly MVC/MVCS) where RESTful controllers invoke service methods, which in turn interact with repository components.
• JWT-based security is enforced, so clearly illustrate the authentication flow from the frontend login (invoking AuthHooks) to the backend’s security filters and controllers.
• The API layer in the frontend is generated and extended, showing clear separation of concerns.
• Modularity as components are split between frontend (views, components, plugins) and backend (controllers, services, data layers).
Technologies and Frameworks
• Frontend: Vue 3, Vite (configuration defined in vite.config.ts), Pinia (state management), Vuetify (UI elements via a plugin).
• Backend: Java 17, Spring Boot, Gradle, and JWT for authentication.
• Additional: Docker for containerization (especially for the database), plus API auto-generation tools visible through the API directories.
• Under the “Backend” block, create sections such as “Configuration” (for security and web config), “Controllers” (for Auth, Post, Media endpoints), “Services” (business logic), and “Repositories” (data access).
• For the frontend:
• Out major directories such as “views”, “components”, “router”, and “API hooks”, ensuring you show how these connect to the backend.