Stacks and Combinations
All six combinations share the same feature set, API conventions, and response format, so you can choose freely based on your team’s familiarity.
Combination Matrix
Section titled “Combination Matrix”| Python (FastAPI) | Java (Spring Boot) | |
|---|---|---|
| React | React 19 + Vite + shadcn/ui · FastAPI async | React 19 + Vite + shadcn/ui · Spring Boot 3.2 |
| Vue | Vue 3 + Vite + shadcn-vue · FastAPI async | Vue 3 + Vite + shadcn-vue · Spring Boot 3.2 |
| Svelte | SvelteKit 3 + Vite + shadcn-svelte · FastAPI async | SvelteKit 3 + Vite + shadcn-svelte · Spring Boot 3.2 |
Frontend Stack
Section titled “Frontend Stack”| Component | React template | Vue template | Svelte template |
|---|---|---|---|
| Framework | React 19 | Vue 3.5+ (Composition API) | Svelte 5 (runes) |
| Build | Vite | Vite | SvelteKit 3 + Vite |
| Language | TypeScript | TypeScript | TypeScript |
| Styling | Tailwind CSS v4 + shadcn/ui (Radix UI) | Tailwind CSS v4 + shadcn-vue (Reka UI) | Tailwind CSS v4 + shadcn-svelte (Bits UI) |
| HTTP | Native fetch wrapper (auto logout on 401) | Native fetch wrapper (auto logout on 401) | Native fetch wrapper (auto logout on 401) |
| Routing | react-router v7 | vue-router v5 | SvelteKit file routing |
| State | React Context (lib/) |
Pinia (stores/) |
runes (stores/) |
| PWA | vite-plugin-pwa |
vite-plugin-pwa |
@vite-pwa/sveltekit |
| Icons | lucide-react | @lucide/vue |
@lucide/svelte |
Backend Stack
Section titled “Backend Stack”| Component | Python template | Java template |
|---|---|---|
| Framework | FastAPI | Spring Boot 3.2 |
| ORM | SQLAlchemy 2.0 (async) | Spring Data JPA |
| Database | SQLite (aiosqlite, Alembic migrations) | SQLite file (./data/app.db, Flyway migrations) |
| Authentication | PyJWT + bcrypt (token revoked on logout) | Sa-Token (uuid-style tokens) + BCrypt |
| Key | Environment variable JWT_SECRET_KEY (weak keys refuse to start) |
No key needed (server-side session tokens) |
| API docs | Built-in Swagger /docs |
Built-in Swagger /docs (SpringDoc) |
| Contract tests | pytest (32 assertions) |
mvn test (28 assertions) |
Behavioral Differences
Section titled “Behavioral Differences”The two backends share the same features, permission model and API contract. Implementation-level differences:
- Error expression: both stacks throw domain exceptions on business failure, mapped to
{ code: -1, message, data: null }; thedatakey always exists. - Startup initialization: Python runs Alembic migrations, then seed data and permission/menu sync; Java runs Flyway migrations, then the permission and menu sync tasks.
- Token revocation: Python invalidates tokens by bumping
users.token_version; Java revokes server-side sessions withStpUtil.logout(userId). - Permission-denied response: both stacks return 403 when permission is missing and record an audit log entry.
Response Format
Section titled “Response Format”Except for data-export files, all endpoints return uniformly:
{ "code": 0, "message": "success", "data": {} }On error, code is -1 and message is a Chinese message. Paginated data uniformly takes the form { list, total, page, pageSize }. See API Reference.
POST /api/data/export returns a ZIP file on success; the one-time password is returned in the X-Export-Password response header.