This document defines the project's architecture, code quality standards, and conventions. All contributions MUST follow these guidelines.
Full-stack service health monitoring platform
- Frontend: React 18 + TypeScript + Vite + Tailwind CSS
- Backend: Spring Boot 3.5.7 + Java 21 + PostgreSQL
- Deployment: GitHub Pages (frontend), Railway/Render (backend), Supabase (database)
- CI/CD: GitHub Actions (tests + build + deploy)
Branch Strategy:
main- Production (auto-deploys to GitHub Pages) - Protecteddevelopment- Integration branch - PR target for all contributors- Feature branches:
feat/,fix/,docs/,chore/,test/,refactor/
Workflow:
- Fork repository
- Create branch from
development - Make changes + tests
- Push to fork
- Open PR to
development(NOTmain) - CI tests run automatically
- Maintainer reviews and merges
- Maintainer periodically merges
development→mainfor deployment
- Pattern: Controller → Service → Repository (MUST follow)
- Controllers: Thin, handle HTTP only
- Services: Business logic, scheduling, WebSocket dispatch
- Repositories: Data access only
- All
@Scheduledtasks: UsefixedDelay(notfixedRate), wrap intry/catch
- NO
anytype (strictly prohibited) - All props, state, models MUST have explicit
interfaceortype - Functional components ONLY (no class components)
- React Hooks for state management
- Tailwind utility classes (no custom CSS)
- Coverage: 70%+ lines minimum
- Test happy path + ≥3 edge/error cases
- Frontend: Vitest + React Testing Library
- Backend: JUnit 5 + Mockito (all mocked, no DB dependency)
- PascalCase: Components (
ServiceCard.tsx) - camelCase: Variables, functions, hooks
- File naming:
ComponentName.tsx,fileName.ts - Export types from
src/types/
- Java 21+ features (records, pattern matching)
- Java Streams over loops (where clear)
- Naming:
*Controller,*Service,*Repository - Lombok annotations for boilerplate reduction
service-status/
├── frontend/ # React + TypeScript + Vite
│ ├── src/
│ │ ├── pages/ # Page controllers
│ │ ├── components/ # Reusable UI
│ │ ├── services/ # API layer
│ │ ├── hooks/ # Custom hooks
│ │ ├── utils/ # Pure functions
│ │ ├── config/ # Constants
│ │ └── types/ # TypeScript interfaces
│
├── backend/ # Spring Boot + Java 21
│ ├── src/main/java/
│ │ ├── controller/
│ │ ├── service/
│ │ ├── repository/
│ │ ├── model/
│ │ └── dto/
│ └── src/main/resources/
│ └── db/migration/ # Flyway SQL
│
└── .github/workflows/ # CI/CD
- Operational:
text-status-operational(green) - Degraded:
text-status-degraded(yellow) - Maintenance:
text-status-maintenance(blue) - Down:
text-status-down(red)
Follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentationtest:Testschore:Maintenance
- Never commit credentials (API keys, passwords, tokens)
- Use
.env.exampletemplates, not actual.envfiles - Backend tests must NEVER require database (mock everything)
- Supabase: Always use Session Pooling JDBC URL (not Direct Connection)
- PR target:
developmentbranch (notmain)
- Dev setup: See SETUP.md
- Contributing: See CONTRIBUTING.md
- Issues: Check GitHub Issues
This file is the source of truth for coding standards and architecture decisions.