Go backend + Preact frontend. CalDAV bidirectional sync with DAVx5,
ICS import/export fidelity, single-binary deployment. No dependencies at runtime.
flowchart TD
A[📱 DAVx5 / Android] -- CalDAV --> B[⚙️ Calendar Server]
C[🌐 Web Browser] -- REST API --> B
D[📥 ICS Files] -- Import/Export --> B
B -- PROPFIND/REPORT/PUT/DELETE --> E[🗄️ SQLite]
B -- Raw ICS storage --> E
B -- Query --> E
F[🐳 Docker Hub] -- Pull --> G[☁️ Server Deployment]
- CalDAV — DAVx5 syncs events bidirectionally via standard PROPFIND/REPORT/PUT/DELETE/MKCALENDAR methods.
- Web App — React SPA with custom
MonthGrid(zero third-party calendar library), dark mode, lunar calendar. - ICS Import/Export — Raw VEVENT text stored verbatim in
raw_icscolumn: VALARM, X-FOSSIFY-*, TRANSP all preserved on round-trip. - Single Binary — Frontend embedded via
go:embed. No external web server or CDN needed.
- Docker + single-binary deployment
- Custom-developed
MonthGridview - Built-in support for the Chinese lunar calendar and public holidays
- Event search via
Ctrl+/shortcut - High-fidelity ICS support: preserves
VALARM,X-FOSSIFY-*, andTRANSP - CalDAV two-way synchronization (verified on Android using DAVx5)
- Scheduled backups and configuration export
- Light/dark modes and bilingual support (Chinese/English)
-
slogstructured logging (circular buffer, level-based filtering)---
# Clone and build
git clone https://github.com/Dichgrem/calendar.git
cd calendar
just build
# Run
./bin/serverVisit http://localhost:3000. Register an account, then connect DAVx5 to http://localhost:3000/dav/.
# Pull from Docker Hub
podman pull brantcoat/calendar:latest
podman compose up -d
# Or build locally
just docker-build| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
HTTP listen port |
DATABASE_URL |
./data/calendar.db |
SQLite database path |
SECURE_COOKIES |
false |
Set true behind HTTPS |
USER_DEFAULT_LANGUAGE |
zh-CN |
Default UI language |
USER_DEFAULT_FIRST_DAY_OF_WEEK |
1 |
Week start (0=Sun, 1=Mon) |
USER_DEFAULT_DATE_FORMAT |
zh |
Date format |
USER_DEFAULT_SHOW_LUNAR_CALENDAR |
true |
Enable lunar calendar |
just dev # Start Go development server
just dev-debug # Start Go server + Vite HMR + Preact DevTools
just build # Build frontend + Go binary
just test # Run Go tests
just lint # Lint (go vet + biome check + tsc)
just format # Format (go fmt + biome format)
just docker-build # Build Docker image
just docker-up # Docker Compose start| Document | Description |
|---|---|
| Usage Guide | Desktop & mobile setup, CalDAV pairing, backup/restore |
| API Reference | REST API endpoints, CalDAV protocol, error codes |
| Developer Guide | Build from source, just commands, frontend HMR |
| Project Structure | Code layout, packages, architecture decisions |
| Log System | Log levels, debug mode, log viewer |
