A community-driven web app for the Charlton Kings Tree Guardian Project. Discover, tag, adopt, and care for local trees through an interactive map and mobile-friendly interface.
# Install dependencies
bun install
# Copy env file and fill in your values
cp .env.example .env
# Start dev server
bun dev
See .env.example for all required variables:
| Variable | Description |
|---|---|
DATABASE_URL |
MongoDB connection string |
BETTER_AUTH_SECRET |
Random secret for auth sessions |
APP_URL |
Application URL (e.g. http://localhost:5173) |
R2_ACCOUNT_ID |
Cloudflare account ID |
R2_ACCESS_KEY_ID |
R2 API token access key |
R2_SECRET_ACCESS_KEY |
R2 API token secret |
R2_BUCKET_NAME |
R2 bucket name |
R2_PUBLIC_URL |
Public URL for the R2 bucket |
bun dev # Start development server
bun run build # Build for production
bun run check # Run svelte-check (TypeScript)
bun preview # Preview production build
docker compose up --build
src/
āāā lib/
ā āāā components/ui/ # shadcn-svelte components
ā āāā server/
ā ā āāā auth.ts # better-auth config
ā ā āāā r2.ts # Cloudflare R2 uploads
ā ā āāā db/
ā ā āāā index.ts # Mongoose connection
ā ā āāā models/ # Tree, Observation, Photo, FAQ
ā āāā auth-client.ts # Client-side auth
ā āāā utils.ts # Shared utilities
āāā routes/
ā āāā auth/ # Login & register
ā āāā trees/ # Browse, map, detail
ā āāā faq/ # FAQ pages
ā āāā api/auth/ # better-auth API handler
āāā app.css # Tailwind + theme variables
This project was built for the CT5038/DT5012 Agile Methods module at the University of Gloucestershire.