Coding Standards
Frontend (React/TypeScript)
- Build System: Vite 4 (not Create React App)
- Framework: React 18
- Language: TypeScript
- ESLint: Airbnb config + TypeScript
- Prettier: 4 spaces, semicolons, single quotes, 120 char width
- Components: Arrow functions only
- Node: >= 18.16.1
- React: No
import Reactneeded - TypeScript:
anyallowed, explicit return types not required - Key Dependencies: Matrix JS SDK, Keycloak JS adapter, LiveKit SDK
Backend (Java/Spring Boot)
- Java: 17
- Spring Boot: 2.7.14
- Build: Maven project structure
- Encoding: UTF-8 everywhere
- DB Migrations: Liquibase DISABLED (schemas managed in ORISO-Database)
- Auth: Keycloak OAuth2/JWT
- Service Naming:
oriso-platform-*prefix for Kubernetes resources
Project Structure
- Frontend:
src/api,src/components,src/pages,src/resources - Backend:
api/,config/,admin/
i18n Rules
- Nested JSON keys: e.g.,
"registration.agency.result.headline" - UI text → i18n files; User content → database
- Files:
de/common.json,en/common.json
Key Principles
- Feature flags over deleting code (comment out for future)
- Always
.catch()on API calls - Use optional chaining for safe access (
obj?.prop) - Explicit type conversions (
String(),Number()) - Do not send empty arrays/objects to backend
- Hard refresh after deploys (
Ctrl+Shift+R) - Check DB sequences after errors
Git
- No force push to
main - Keep hooks (no
--no-verify) - Commit only when explicitly asked
Testing
- Frontend: Cypress
- Backend: JUnit + MockMvc
- Always test in a real browser
Deployment
- Method: Kubernetes with Helm charts
- Umbrella Chart:
oriso-platform(deploys all 21 services) - Namespace:
caritas - Service Discovery: Kubernetes DNS (
.svc.cluster.local) - Flow: Build Docker images → Import to k3s → Deploy via Helm → Auto-scaling
- Helm Values: Environment-specific files (
values.yaml,values-prod.yaml)
These standards are authoritative for all ORISO Platform repositories. Align your local tooling (ESLint/Prettier/Java toolchain) accordingly.