Full-stack web file manager for Linux NAS with DDD architecture, Spring Boot 3, Vue 3, mobile-first design, multi-user support, and permission control. Uses MapStruct for type-safe mapping across layers.
A web-based file manager for Linux NAS systems built with Domain-Driven Design principles, Spring Boot 3 backend, and Vue 3 mobile-first frontend.
**FileFlexManager** is a web application that provides:
**Backend:**
**Frontend:**
Follow strict DDD layering: `interfaces → application → domain ← infrastructure`
**1. Domain Layer** (`backend/domain/`)
**2. Application Layer** (`backend/application/`)
**3. Infrastructure Layer** (`backend/infrastructure/`)
- `persistence/`: converter, entity, mapper, PO, repository implementations
- `config/`: framework configuration
- `external/`: third-party integrations
- `security/`: authentication/authorization
- `task/handler/`: background job handlers
**4. Interfaces Layer** (`backend/interfaces/`)
- `api/controller/`: REST controllers
- `api/advice/`: global exception handlers
- `api/assembler/`: DTO assemblers
- `model/`: request (req), response (resp), DTO, VO
- `config/`: web configuration
- `converter/`: request/response converters
**Resources Structure:**
```
src/main/resources/
data/
db.migration/
static/
application.yml
application-*.yml
```
**Mobile-First Vue 3 Application:**
```
src/
api/ # API service layer
assets/ # Static assets
components/ # Reusable components
router/ # Vue Router configuration
stores/ # Pinia state management
utils/ # Utility functions
views/ # Page components
public/ # Public assets
dist/ # Build output
config/
env/ # Environment configs
typescript/ # TS configuration
build/ # Build configuration
```
**Three-Layer Data Model:**
1. **DTO (Data Transfer Object)**: API layer, external communication
2. **Domain Model**: Business logic, core entities
3. **PO (Persistent Object) / Entity**: Database layer
**MapStruct Mapping Rules:**
- Controllers receive DTOs, map to domain models
- Services return domain models, map to response DTOs
- Use `@Mapper` with Spring component model
- Type-safe, compile-time generated mappers
- Repositories map domain models to/from database entities
- Custom mapping rules for complex transformations
- Maintain domain model purity
**Example MapStruct Mapper:**
```java
@Mapper(componentModel = "spring")
public interface FileMapper {
FileDto toDto(File file);
File toDomain(FileDto dto);
FilePo toPo(File file);
File fromPo(FilePo po);
}
```
**Backend:**
**Frontend:**
**Unit Tests:**
- Use `@Test` annotation
- Method names in camelCase describing scenario
- Setup with `@BeforeEach` where needed
- All core business logic required
- Mock external dependencies
- Test both success and failure scenarios
**Integration Tests:**
**Backend:**
**Frontend:**
**Docker Configuration:**
Required tools:
1. **File Operations**: Upload, download, move, copy, delete with progress tracking
2. **Permission Control**: Role-based access, folder-level permissions
3. **Multi-User Support**: User management, session handling
4. **Mobile UI**: Touch-optimized, responsive Vant components
5. **Real-time Updates**: File system change notifications
1. **Start with Domain**: Model business entities and logic
2. **Define Repositories**: Create interfaces in domain layer
3. **Implement Infrastructure**: Build repository implementations, mappers
4. **Application Services**: Orchestrate use cases
5. **API Layer**: Expose REST endpoints with proper DTO mapping
6. **Frontend Integration**: Build Vue components consuming the API
7. **Test Coverage**: Unit tests for domain logic, integration tests for APIs
8. **Containerize**: Package with Docker for deployment
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/fileflexmanager-ddd-architecture/raw