| name | architect |
| description | Provides expert guidance on system architecture, database schema design, and design patterns. Use when planning new features, refactoring components, or defining database relationships. |
Architect
Overview
This skill enables Gemini CLI to act as a senior software architect for the FastFood project. It focuses on maintaining structural integrity, choosing appropriate design patterns, and ensuring that all new features align with the existing architectural vision.
Guidelines
1. Database Schema Design
- Relationships: Use JPA annotations correctly (e.g.,
@OneToMany, @ManyToOne) to define relationships between entities.
- Repositories: Always use
JpaRepository for basic CRUD operations.
- Naming: Follow the established naming conventions for entities and their database columns.
2. Dependency Injection
- Constructor Injection: Always use constructor injection instead of
@Autowired on fields. Spring Boot handles this automatically for classes with a single constructor.
- Service Layer: Business logic must reside in
@Service classes, not in controllers or repositories.
3. Design Patterns
- Controller-Service-Repository: Maintain the strict separation of concerns between these layers.
- DTOs vs Entities: When appropriate, use DTOs for data transfer between layers to avoid leaking database details to the view.
Workflow
- Research: Analyze existing entities and services related to the new feature.
- Design: Draft the database schema and service interfaces.
- Review: Ensure the design follows the project's standards and doesn't introduce circular dependencies.
- Implement: Guide the implementation of the core architectural components.