mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-04-21 09:07:17 +00:00
A front-end and back-end separated system, with a clean interface and simple code 🍳.
| client | ||
| cloud | ||
| docker | ||
| script | ||
| .gitattributes | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| README.zh-CN.md | ||
Sol-Cloud
Introduction
Sol-Cloud is a cloud service platform based on microservices architecture, adopting a front-end and back-end separation design pattern, providing core functions such as system management and file management. The project uses Docker containerization technology for deployment, featuring high availability, scalability, and security.
System Architecture
Overall Architecture
The project is divided into two main parts: frontend (client) and backend (cloud):
- Frontend: Single-page application based on Vue 3
- Backend: Microservices cluster based on Spring Cloud
- Deployment: Containerized deployment based on Docker
Microservices Architecture
- API Gateway: Unified entry point, request routing and filtering
- System Service: System management functions including users, roles, and permissions
- File Service: File upload, download, and management functions
- Common Module: Shared components including utilities, constants, and base models
Technology Stack
Frontend Technology Stack
- Core Framework: Vue 3.5.12
- UI Component Library: Element Plus 2.8.8
- Build Tool: Vite 5.4.10
- Programming Language: TypeScript 5.6.3
- HTTP Client: Axios 1.7.7
- State Management: Pinia 2.2.6
- Router Management: Vue Router 4.4.5
Backend Technology Stack
- Core Framework: Spring Boot 3.3.4
- Microservices Framework: Spring Cloud 2023.0.3
- Microservices Components: Spring Cloud Alibaba 2023.0.1.0
- ORM Framework: MyBatis Plus 3.5.10.1
- Authentication Framework: Sa-Token 1.39.0
- Service Registry & Config Center: Nacos 2.5.0
- Database: PostgreSQL 17.2
- Cache: Redis 7.4.2
- Object Storage: MinIO RELEASE.2024-11-07T00-52-20Z
Project Structure
Frontend Structure
client/
├── src/
│ ├── api/ # API interface definitions
│ ├── assets/ # Static resources
│ ├── components/ # Reusable components
│ ├── composables/ # Composition API
│ ├── generated/ # Auto-generated code
│ ├── pinia/ # State management
│ ├── router/ # Route configuration
│ ├── styles/ # Style files
│ ├── util/ # Utility functions
│ └── views/ # Page view components
├── public/ # Public static resources
├── index.html # Entry HTML
└── vite.config.ts # Vite configuration
Backend Structure
cloud/
├── common/ # Common modules
│ ├── common-auth/ # Authentication and authorization
│ ├── common-base-model/ # Base data models
│ ├── common-base-web/ # Web base components
│ ├── common-constant/ # Constant definitions
│ └── common-util/ # Common utilities
├── model/ # Data model definitions
├── plugin/ # Plugin modules
├── web/ # Business service modules
│ ├── web-system-8081/ # System management service
│ └── web-file-8082/ # File management service
└── gateway-9527/ # API Gateway
Deployment Guide
Environment Requirements
- Docker 20.10+
- Docker Compose 2.0+
- JDK 17+
- Node.js 20+
Development Environment Deployment
-
Clone the repository
git clone https://github.com/yourusername/sol-cloud.git cd sol-cloud -
Start backend services
cd docker docker-compose -f dev.docker-compose.yml up -dweb-system and web-file need to be started manually
-
Start frontend development server
cd client npm install npm run dev
Production Environment Deployment
-
Start all services
docker-compose up -d -
Access the system
http://localhost:8080 -
Security Considerations
Warning
: When deploying to production, please note the following security considerations:
- Do not expose internal service components (such as Nacos, Redis, PostgreSQL, MinIO, etc.) directly to the public network
- Ensure only the API gateway and frontend application are accessible from outside
- Use firewalls to restrict access to internal services
- Enable HTTPS encryption for all external services
- Regularly update passwords and keys
- Consider using a reverse proxy (such as Nginx) as the only entry point for external access
Features
- User Authentication and Authorization Management
- Role and Permission Management
- File Upload and Management
- System Configuration Management
- Log Audit
Development Guide
Adding New Microservices
- Create a new service module in the cloud directory
- Add new service configuration in docker-compose.yml
- Add new service routes in gateway configuration
Frontend Development
- Add new API interfaces in src/api
- Create new page components in src/views
- Configure new routes in src/router
Contributing
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the LICENSE License.