This repository contains the CSDR Cloud Spatial platform: a web console and API for managing spatial datasets, geometries, derived products, dashboards, and reports.
The codebase started as a fork of Omnigate and has since been substantially rewritten for the CSDR domain.
The platform is built around a spatial reporting workflow:
datasetrecords source data that can be processedgeometriesrecords spatial boundaries that outputs can be mapped ontoproductcombines a dataset with a geometry collection*_runresources capture concrete processing runsgeometry_outputandproduct_outputstore the shapes and computed values that drive reports and dashboards
Contributor-facing architecture notes live in docs/architecture.md.
apps/
web/ Next.js App Router frontend
server/ Hono API, Better Auth, Drizzle/PostGIS, integration tests
packages/
schemas/ Shared Zod schemas and domain contracts
plot/ Shared charting helpers
ui/ Shared React UI components
eslint-config/
typescript-config/
docs/
architecture.md
development-workflow.md
DEPLOYMENT.md
- Node.js 20.17+
- pnpm 9.12.0
- Docker with Compose support
git clone https://github.com/SustainableDevelopmentReform/csdr-cloud-spatial-app.git
cd csdr-cloud-spatial-app
pnpm install
cp .env.example.local .env
docker compose -f docker-compose-dev.yml up -d
pnpm migrate
pnpm seed
pnpm devLocal services:
- Web app:
http://localhost:3000 - API server:
http://localhost:4000 - Mailpit UI:
http://localhost:8025 - PostGIS:
localhost:5431
The example environment file already contains sensible local defaults, including the seed user:
- email:
admin@example.com - password:
admin@123
If you change the initial user settings, update INITIAL_USER_EMAIL, INITIAL_USER_NAME, and INITIAL_USER_PASSWORD in .env before running pnpm seed.
Use the root scripts unless you are intentionally working on one package only.
pnpm dev
pnpm lint
pnpm typecheck
pnpm test:unit
pnpm turbo lint typecheck test:unit
pnpm migrate
pnpm seedpnpm turbo lint typecheck test:unit is the main contributor contract and runs the same lint, typecheck, and unit-test sequence that CI runs.
Focused package commands are still available when needed:
pnpm --filter web dev
pnpm --filter @repo/server dev
pnpm --filter @repo/server test:unitBackend tests require Docker because the server suite uses Testcontainers. See docs/development-workflow.md for the full validation and testing notes.
This repository is licensed under Apache-2.0 (see LICENSE).
Because this project originated as a fork of Omnigate, the LICENSE file also
retains the original MIT attribution notice for any upstream-derived portions.
The current codebase has diverged significantly and is now primarily
CSDR-specific.
- The frontend is still inconsistent in places. Expect a mix of older patterns and newer cleanup work.
- There is no frontend test suite yet. Validation coverage is currently strongest in the shared schemas package and the backend integration tests.
- This is a best-effort public cleanup pass, not a full open-source program launch. Some internal assumptions and rough edges are documented rather than fully removed.
Root commands for common backend maintenance:
pnpm create:migration
pnpm migrate
pnpm drizzle-studio
pnpm seedThe Better Auth schema is generated inside apps/server. If you need to regenerate it manually, run the command documented in docs/development-workflow.md and follow it with a migration.