Project Structure
StackRivet is organised as a workspace of independent repositories rather than a monorepo. Each repository has its own git history, release cycle and license, and can be cloned on its own.
Repositories
Section titled “Repositories”| Repository | Purpose | Stack |
|---|---|---|
stackrivet-server | Backend modular monolith | JDK 21 · Spring Boot 4.0.6 · MyBatis-Plus · Flyway |
stackrivet-admin-ui | Admin frontend | Vue 3.5 · Vite 8 · TypeScript 6 · Element Plus 2.14 |
stackrivet-site | Public website and documentation | Astro 6 · Starlight · TypeScript |
Usage, contribution and engineering rules are documented in the public repositories and on this documentation site.
The admin UI talks to the backend over HTTP: in development it proxies /api/* and /actuator/* to http://127.0.0.1:8080.
Backend modules
Section titled “Backend modules”The backend’s reactor has 16 Maven modules. 15 of them assemble into the single deployable application (the default monolith); the 16th, stackrivet-scheduler-snailjob, is a separately packaged opt-in scheduler adapter for teams that choose SnailJob. Each module owns a clear responsibility and respects the others’ boundaries (enforced by ArchUnit tests in stackrivet-app).
| Module | Responsibility |
|---|---|
stackrivet-bom | Centralised dependency BOM |
stackrivet-parent | Parent POM, compiler release=21, plugin management |
stackrivet-common | R<T>, PageR<T>, TraceIdHolder, BusinessException |
stackrivet-security | Auth, RBAC, data-permission context, token management |
stackrivet-system | User / dept / post / role / menu / dictionary / parameter management |
stackrivet-audit | Operation / login / exception logs, traceId correlation |
stackrivet-asset | Asset metadata + StorageAdapter (Local, S3-compatible, Aliyun OSS), signed URLs, multipart upload |
stackrivet-generator | Database introspection, type mapping, template rendering, governed write-out |
stackrivet-import-export | Excel / CSV import-export via EasyExcel through async tasks |
stackrivet-task | Async task state machine: pending / running / success / failed / retrying / cancelled |
stackrivet-observability | Actuator, Micrometer, traceId, optional OpenTelemetry profile |
stackrivet-plugin | Module manifest loader; permission / menu / dictionary registration |
stackrivet-cli | Thin CLI: doctor |
stackrivet-demo | Ticket CRUD demo plus scheduled-job handler demos |
stackrivet-app | Spring Boot entry point; assembles every module into the runnable app; hosts the ArchUnit boundary tests |
stackrivet-scheduler-snailjob (optional) | Separately packaged SnailJob 2.0 scheduler adapter + read-only admin summary |
Every layer flows in one direction — Controller → Service → Domain → Mapper — and entities never leave the persistence boundary (DTOs and VOs cross it instead).
Frontend layout
Section titled “Frontend layout”src/ api/ ← axios client, wraps the R<T> response envelope features/ ← feature folders (system / asset / generator / audit / task) generated/ ← code-generator output (gitignored) layouts/ ← AdminLayout, LoginLayout router/ ← Vue Router routes + guards stores/ ← Pinia stores styles/ ← tokens.scss, element-overrides.scss, reset, utilities, fonts utils/ ← shared TypeScript helpers views/ ← page-level viewsThe frontend uses the StackRivet design system, which overrides Element Plus’s default look. Design tokens are the source of truth for colour, spacing and radius — no inline hex or pixel values in page components.
Where new things go
Section titled “Where new things go”| You want to add… | Put it… |
|---|---|
| A business module | Use the in-product code generator at /api/v1/generator — don’t freeform it |
| A permission | Declare it in the module manifest first, then annotate the controller |
| A database table | Add a Flyway migration in the owning module |
| A frontend component | Put it in the matching shared or feature area |
| A design token | Extend the design-token layer — not inline |