Welcome to the Datum Cloud Portal developer documentation. This guide will help you get up to speed with the codebase and start contributing.
New to the project? Start here:
- Prerequisites - Required tools and access
- Environment Setup - Configure your local environment
- Running Locally - Start the development server
- First Steps - Hands-on exercises
Step-by-step guides to get you productive:
| Document | Description |
|---|---|
| Prerequisites | Tools, versions, and access needed |
| Environment Setup | .env configuration and variables |
| Running Locally | Development server and scripts |
| First Steps | Hands-on exercises and checkpoints |
Understand how the system works:
| Document | Description |
|---|---|
| Overview | Tech stack and design principles |
| Data Flow | SSR, React Query, and mutations |
| Domain Modules | Resource module structure |
| Watch API | Real-time updates via SSE |
| ADRs | Architecture Decision Records |
Day-to-day development tasks:
| Document | Description |
|---|---|
| Project Structure | Folder organization and imports |
| OpenAPI Generation | Generating typed API clients |
| Authentication | OIDC flow and session handling |
| Testing | E2E and component testing |
| Code Quality | Linting, formatting, TypeScript |
Component library and patterns:
| Document | Description |
|---|---|
| Overview | Component hierarchy and decisions |
| shadcn Rules | Using shadcn/ui primitives |
| datum-ui Guide | Datum component library |
| Theming | Theme system and customization |
| Forms | Form library patterns |
Deployment and monitoring:
| Document | Description |
|---|---|
| Observability | Logging, tracing, metrics |
| Deployment | Docker, Kubernetes, CI/CD |
| Troubleshooting | Common issues and solutions |
How-to guides for common tasks:
| Document | Description |
|---|---|
| Adding a New Page | Create routes and pages |
| Adding a New Resource | K8s resource integration |
| Adding a New Module | Feature module structure |
| Adding a New Component | Component creation patterns |
| Debugging Guide | Debugging tools and techniques |
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | React Router v7 |
| Server | Hono |
| State | TanStack Query |
| UI | shadcn/ui + Tailwind CSS |
| Forms | Conform + Zod |
| API | OpenAPI with @hey-api/openapi-ts |
Resources (DNS Zones, Projects, etc.) follow a modular pattern:
app/resources/{resource}/
├── schema.ts # Zod validation
├── adapter.ts # API → Domain transformation
├── service.ts # API client
├── queries.ts # React Query definitions
└── watch.ts # Real-time subscriptions
features/ → Feature-specific components
components/ → Shared app components
datum-ui/ → Design system (cross-portal)
shadcn/ → UI primitives
The portal uses SSE (Server-Sent Events) for real-time K8s resource updates:
watchResources({
onEvent: (event) => {
// ADDED, MODIFIED, DELETED
updateCache(event);
},
});- Create resource module: Adding a New Resource
- Create feature module: Adding a New Module
- Create routes: Adding a New Page
- Check Troubleshooting for common issues
- Use Debugging Guide for tools
- View traces in Observability
- Start with Architecture Overview
- Review Data Flow
- Explore Project Structure
Important architectural decisions are documented as ADRs:
| ADR | Title |
|---|---|
| ADR-001 | Domain-Driven Resource Modules |
| ADR-002 | Service Adapter Pattern |
| ADR-003 | Query Factory Pattern |
| ADR-004 | Watch API Pattern |
→ All ADRs
- Issues: Report bugs or request features on GitHub
- Questions: Reach out to the team on Slack
- PRs: Follow the contribution guidelines
- Read the Code Quality guidelines
- Follow the component patterns in UI docs
- Write tests as described in Testing
- Ensure CI passes before requesting review