Digital Forest Cards is a mobile-first web app that lets residents look up municipal trees by their physical tag (Municipal ID) and view the available data. The experience mirrors the Ya'ad Digital Urban Forest branding and is intended as a public-facing pilot, with room for future civic contributions such as photos and data updates.
- React + TypeScript + Vite
- shadcn/ui and Tailwind CSS
- Supabase (backend and db)
- AWS-compatible S3 for static hosting
- Install Node.js 20+ and npm.
- Clone the repo and install dependencies:
git clone <REPO_URL> cd digital-forest-cards npm install
- Configure environment variables for Vite:
Set values for:
cp env.example .env.local
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Run the dev server:
npm run dev - Lint:
npm run lint - Build:
npm run build - Preview the production build locally:
npm run preview
npm run query– runscripts/run-query.tsnpm run export-municipalities– export example municipality datanpm run export-municipalities-no-canopy– export municipality data without canopy infonpm run test:functions:unit– unit tests for Supabase functions (Deno; uses dummy env vars)npm run test:functions:integration– integration tests for Supabase functions (expects env insupabase/.env.testor the shell)
The GitHub Actions workflow .github/workflows/deploy.yml builds on pushes to main and syncs dist to the Hasadna S3 bucket digital-forest-cards-site. Required secrets:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYDEPLOY_S3_ACCESS_KEY_IDDEPLOY_S3_SECRET_ACCESS_KEYDEPLOY_S3_ENDPOINT
To deploy manually, run npm run build with the same env vars and upload the dist/ directory to your static host of choice.