How linhaojun857/aurora works
Main components
• Backend Component (aurora-springboot):
• Core Application: The Spring Boot application (AuroraSpringbootApplication.java) that bootstraps the system.
• API Controllers: A series of controllers handling article, user, comment, and configuration related requests.
• Business Logic & Service Layer: Service interfaces and implementations (service/ and service/impl folders) that encapsulate business logic.
• Data Access Layer: Mapper interfaces and XML (mapper/ and src/main/resources/mapper) to interact with the database.
• Domain Models: Entities, DTOs, and VOs (under entity/, model/dto, and model/vo folders) representing the business data.
• Cross-Cutting Concerns: Aspects, interceptors, filters, exception handling, and annotations that manage logging, access, security, etc.
• Configuration & Infrastructure: Configuration classes for Redis, RabbitMQ, MyBatis Plus, Knife4j (swagger), Spring Security, etc.
• Integration with External Services: Configuration for object storage (Minio) and scheduling (Quartz).
• Frontend Components (aurora-vue):
• Aurora-Blog (Public Site):
• Built with Vue 3 (using TypeScript, Element Plus, Tailwind, etc.) to render blog posts, comments, articles, and other content.
• Contains components for articles, navigation, sidebar, header, footer, and common utilities.
• Aurora-Admin (Admin Dashboard):
• Built with Vue 2, using Vuex for state management and Vue Router.
• Contains layout components (NavBar, SideBar) along with views for managing articles, comments, users, configurations, etc.
• Auxiliary Components:
• Database: Referenced by SQL scripts (aurora-springboot/sql/aurora.sql) for schema creation.
• CI/CD: GitHub workflows (in the .github/workflows folder) and Dockerfiles for containerization, which define deployment pipelines.
• Deployment and Installation Scripts: The aurora_start.sh and deployment document (项目部署文档.md) that guide the production deployment process.
Detail the relationships and interactions
• The Frontend (both Blog and Admin) sends HTTP requests to the Backend API endpoints.
• The Backend processes these requests (via controllers) and applies business logic through its service layer.
• The Data Access Layer communicates with the Database to perform CRUD operations.
• Caching (Redis) is used to improve performance, while RabbitMQ facilitates asynchronous processing (e.g., logging, notifications).
• External integrations like Elasticsearch, Minio, and Quartz serve specific roles, such as search, file storage, and scheduled tasks.
• Security components, including Spring Security and JWT filters, manage authentication and authorization.
• CI/CD pipelines (triggered by GitHub workflows) ensure the application is built, tested, and deployed via Docker containers.
Important architectural patterns and design principles
• Layered Architecture: Clear separation among controller, service, and data layers.
• Frontend/Backend Separation: Decoupled client (Vue) applications communicate with a RESTful backend.
• Aspect-Oriented Programming: Use of aspects (for exception and operation logging) to handle cross-cutting concerns.
• Strategy Pattern: The use of strategies (see strategy/ and its implementations) suggests pluggable algorithms for tasks like article import, search, social login, and file uploads.
• Microservice-friendly design: Though monolithic, the backend is modularized enough to allow potential extraction into microservices if needed in the future.