wuha-like-sleep/by-wave-calendar
About
自托管日历共享平台 · 网页/PWA + 原生 iOS/Android/桌面客户端 · CalDAV 双向同步 · ICS 订阅 · 预约链接 · 站内通知 · 深色模式 · REST API 与自助 Token · SSO/Passkey · 一个域名全搞定 · MIT
Web & App DevelopmentMeasured star growth
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalByWave Calendar
A self-hosted calendar-sharing platform
One domain serves Web / PWA / iOS / Android / Desktop, plus standard CalDAV · ICS feeds · SSO · third-party API endpoints — your data stays on your own server, locked into no SaaS.
Live Demo · Download · Features · Self-host · Architecture · Gitee mirror
What is this
ByWave Calendar is a calendar-sharing platform that runs on your own server. A single domain serves all of:
- A modern web calendar (installable as a PWA), with an in-app notification inbox, one-sentence event creation, and dark mode
- Native iOS / Android / macOS / Windows / Linux clients, with offline editing
- Standard protocol endpoints: two-way CalDAV sync, ICS feed publishing, and a REST API
It is built for individuals, teams, and small organisations who want a calendar that depends on no external SaaS, stays under their control, and is easy to back up. All third-party front-end assets are bundled locally, so it installs directly on servers in mainland China with no foreign CDN dependency. MIT-licensed.
📸 Screenshots
![]() Web calendar · week view — one-sentence quick add at the top (just say the time and place), notification bell with an unread count |
|
![]() Landing page — features and downloads on one screen |
![]() Native iOS app — day view; the system calendar syncs two-way over CalDAV |
![]() Notification inbox (dark mode) — bookings, invitations, event changes, and security events in one place, each click opening the relevant page |
![]() Embeddable read-only widget ( /embed/<token>), drop into any page via iframe |
Prefer clicking around? Try the live demo.
📥 Download
Current client versions:
| Platform | Version | Download |
|---|---|---|
| 🌐 Web / PWA | — | Just open your ByWave server in a browser; can be installed to the desktop / home screen |
| 📱 iOS | v1.8.0 | App Store · TestFlight Beta |
| 🤖 Android | v0.13.2 | Direct APK · All releases |
| 🍎 macOS | v1.3.3 | DMG (Apple Silicon) / DMG (Intel) |
| 🪟 Windows | v1.3.3 | MSI (x64) |
| 🐧 Linux | v1.2.0 | DEB (x64) |
Downloads and SHA-256 checklists for desktop 1.3.3 are on the GitHub release page. Both macOS builds are signed and notarised; the Windows installer is not yet signed.
Gitee mirror: Desktop 1.3.3 · Android 0.13.2 · Server 1.9.2. Every release ships a SHA-256 checklist. Linux stays at 1.2.0 this round. Two-way sync with the Windows / macOS system calendars is covered in System calendar setup.
Android first-install note: on first install you must allow installs from the corresponding source in system settings; afterwards the app can check for and download updates in-app, with the system still confirming each install.
Desktop: built with Compose Multiplatform, not a browser wrapper — native Skia rendering, one Kotlin codebase producing Mac / Windows / Linux builds, with Sparkle-style in-place auto-update. See apps/desktop/README.md for details.
✨ Features
Calendars & events
- 📅 Web calendar (Toast UI Calendar) with month / week / day views, drag-to-create events, click-a-cell quick add, a compact editor, and a responsive mobile layout
- 🗣 One-sentence event creation: type "meeting tomorrow at 3pm for two hours" and the time, duration, and recurrence are parsed for you — in Chinese, English, Japanese, and Korean
- 🔁 Recurring events (RRULE / RFC 5545 expansion) and event reminders
- 🔍 Global search + a
Cmd+Kcommand palette that finds events across your own and shared calendars - 📍 Address suggestions: the location field autocompletes — a local address book remembers places you have used and ranks them by your habits, with online suggestions (based on OpenStreetMap data) as a fallback when local matches run out
- 📴 Offline editing: the iOS / Android / desktop clients keep working offline — creates, edits, and deletes land locally first and replay in order on reconnect, with conflicts resolved item by item
- 📲 PWA: install to desktop / home screen in one click, offline shell caching, automatic prompt when a new version is available
Sync & interop
- 🔄 Two-way CalDAV sync (RFC 4791 + RFC 6578 incremental sync): add an account directly at
https://your-domain/caldav/from the iOS system calendar, Apple Calendar.app, or Synology - 📤 ICS feed publishing (RFC 5545): every calendar gets a stable read-only link you can drop into Google / Apple / Outlook as a "subscribed calendar"
- 📥 ICS import: four ways — file, one-off URL, recurring URL subscription, or pasted text
- 🧩 Embed widget: a read-only calendar widget (
/embed/<token>) you can iframe into any web page
Collaboration & notifications
- 👥 Calendar invites: invite collaborators by email; once accepted, the calendar appears in their account
- 🙋 Event invitations & RSVP: invitees reply Yes / Maybe / No from email or the invitations inbox in every client, and can propose a new time that the organiser accepts in one click; one-click add to Google / Apple / ByWave
- 🗓 Booking links: publish weekly available slots (edited visually on the web); others pick a time on a public page to book you, automatically creating an event with attendees; bookings can be viewed and cancelled
- 🔔 In-app notifications: a nav bell + inbox collects bookings, invitations, event changes, and security events, each click going to the relevant page; important ones are also delivered as browser push (Web Push / iOS APNs)
Auth & security
- 🔐 Email + password, plus Passkey (WebAuthn), TOTP MFA, and multiple SSO providers (OIDC / Keycloak / Okta / Google Workspace)
- 🛡 Lockout on failed attempts, email verification codes for unrecognised devices, email alerts on Passkey/MFA/password changes, login history, and audit logs
- 🔑 App passwords: CalDAV / client logins never expose your main password
Integrations & API
- 🔌 Third-party REST API + self-service tokens: any user can create their own token under Settings → API Token (password + MFA step-up, read-only by default, with usage statistics, per-token rate limiting, and secure rotation) — no admin round-trip; Zoom / Notion / n8n / internal systems can then read and write calendars directly
- 🔓 OAuth 2.0 authorization server (authorization code + PKCE): let external apps call the API on a user's behalf with their consent
- 🪝 Webhooks: push event changes to external endpoints, with delivery records
Ops & customization
- ⚙️ Admin console: site name / logo / SMTP / SSO / security policy / themes / API / webhooks / audit
- ♻️ One-click self-update: check + update right from the console, with a live progress bar plus automatic restart and refresh; supports staged rollout and a minimum supported version
- 💾 Data backup / restore: full-table export / import from the console, with a round-trip self-check script
- 🎨 Themes & dark mode: 7 brand colours + 2 densities + dark mode (follow system / light / dark, no white flash on switch), configurable per user
- 🌐 i18n: the server, iOS, Android, and desktop clients all support 8 languages with runtime switching — Simplified Chinese / Traditional Chinese / English / Japanese / Korean / Spanish / French / German
- 🇨🇳 China-friendly: third-party front-end assets (HTMX / Toast UI / SimpleWebAuthn / Tailwind) are fully bundled locally, with no foreign CDN
🚀 Self-host (on aaPanel)
For servers in mainland China, using Gitee as the code source is recommended (GitHub is unreliable there). Every push to this repo is mirrored to both GitHub and Gitee.
# 1. SSH into the server
cd /www/wwwroot
git clone https://gitee.com/zhaorunsen/by-wave-calendar.git rl.lz-ss.com
cd rl.lz-ss.com
# 2. Copy .env.example -> .env, fill in DATABASE_URL + PUBLIC_BASE_URL
cp .env.example .env && vim .env
# 3. One-shot install (the first run creates .env and exits so you can edit it; run again to finish)
bash deploy/bt-panel/install.sh
install.sh automatically: installs dependencies (npm ci --omit=dev) -> runs database migrations -> uses setcap so Node can bind 80/443 -> interactively creates an admin -> starts via PM2.
After that, all future updates are done from the web UI: Admin console -> Update -> Check for updates -> Update now (live progress bar + automatic restart + automatic refresh).
📖 The full aaPanel deployment guide (SSL, hot certificate reload, backup/restore verification, CI deploy) is in deploy/bt-panel/README.md.
First-time configuration order (configured in the web UI after deploy, not in the code repo)
- Database connection — set once in
.env - Email SMTP —
/admin/smtp - Site name / logo / ICP / registration policy —
/admin/site,/admin/logo - SSO providers —
/admin/sso(you can add multiple OIDC providers; the login page shows a button for each) - Security policy —
/admin/security - Third-party API / OAuth —
/admin/api,/admin/oauth-apps
🔌 API example
Create a token yourself under Settings → API Token (admins can also issue them from /admin/api):
# List all calendars for the user bound to the current token
curl -H "Authorization: Bearer bwc_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx" \
https://rl.lz-ss.com/api/calendars
# Create an event (attendees are emailed automatically)
curl -X POST -H "Authorization: Bearer bwc_..." \
-H "Content-Type: application/json" \
-d '{
"calendarId":"<uuid>",
"summary":"Team weekly sync",
"startsAt":"2026-05-25T10:00:00Z",
"endsAt":"2026-05-25T11:00:00Z",
"allDay":false,
"extra":{"attendees":["[email protected]","[email protected]"]}
}' \
https://rl.lz-ss.com/api/events
The full list of endpoints + curl examples is at the bottom of the /admin/api page. The OAuth authorization-code flow is documented under /admin/oauth-apps.
🧱 Tech stack
┌──────────────────────────────────────────────────────────────────────┐
│ Nginx / direct 443 (TLS) ───► PM2 Node 127.0.0.1:3000 │
│ ┌────────────────────────┴────────────────────────┐ │
│ │ Fastify 5 + TypeScript │ │
│ / ┌─ EJS templates (HTMX partials) + Tailwind │ │
│ /app ├─ Toast UI Calendar month/week/day │ │
│ /caldav/* ├─ RFC 4791 PROPFIND / REPORT / PUT │ │
│ /ics/:tok ├─ RFC 5545 ICS feed │ │
│ /api/* ├─ REST (cookie / Bearer token) │ │
│ /oauth/* ├─ OAuth 2.0 authorization server (PKCE) │ │
│ /admin/* └─ Admin console (incl. /admin/update) │ │
│ ▼ │
│ PostgreSQL 16 + Drizzle ORM (39 tables) │
└──────────────────────────────────────────────────────────────────────┘
| Client | Stack |
|---|---|
| Server | TypeScript + Fastify 5 + EJS + HTMX + Tailwind CSS · Drizzle ORM + PostgreSQL 16 |
| Calendar UI | Toast UI Calendar 2.x |
| Auth | bcrypt + @simplewebauthn/server + otplib + custom OIDC client + OAuth 2.0 server |
| Push | web-push (VAPID) + @parse/node-apn (APNs) |
| Desktop | Kotlin + Compose Multiplatform (native Skia rendering) |
| iOS | Swift / SwiftUI |
| Android | Kotlin / Jetpack Compose |
All third-party front-end dependencies (HTMX / Toast UI / SimpleWebAuthn / Tailwind) are bundled locally, so servers in mainland China install with no CDN dependency.
📂 Repo structure
by-wave-calendar/
├── src/ Server (TypeScript + Fastify)
│ ├── server.ts App entry point
│ ├── routes/ REST API (events / calendars / ics / push / search …)
│ ├── web/ Web + admin routes (admin / caldav / sso / oauth / webauthn …)
│ ├── lib/ Business logic (caldav / ical / sso / mfa / booking / webhooks / i18n …)
│ ├── db/ Drizzle schema + client
│ ├── views/ EJS templates (app / admin / auth / booking / invite …)
│ ├── public/ Front-end static assets (incl. locally bundled third-party libs)
│ └── styles/ Tailwind input
├── apps/
│ ├── ios/ Swift / SwiftUI client
│ ├── android/ Kotlin / Compose client (+ releases/ manifest)
│ └── desktop/ Compose Multiplatform desktop client (+ releases/ manifest)
├── deploy/
│ ├── bt-panel/ aaPanel deploy: install.sh / nginx sample / ecosystem.config.cjs / README
│ └── android-release.md
├── docs/ Development, deployment, design and release docs
├── scripts/ Build / migrate / release / i18n-check scripts
├── drizzle/ Database migrations
└── test/ vitest tests
🗺 Roadmap
- Core calendar + recurring events + ICS + CalDAV
- Passkey / MFA / multi-SSO / app passwords / login history / audit
- PWA + multiple themes + per-user appearance
- Invite collaboration + event RSVP + booking links + multi-platform add
- Admin console + one-click self-update + data backup/restore
- Third-party Bearer API + Webhooks
- OAuth 2.0 authorization server (authorization code + PKCE)
- i18n (8 languages) across server + iOS + Android + desktop
- Web Push + iOS APNs notifications
- Native iOS / Android / desktop clients (macOS DMG / Windows MSI / Linux DEB)
- In-app notification inbox + browser push
- Self-service API tokens (usage statistics / per-token rate limiting / rotation)
- Event-invitation time proposals + invitation inbox in the clients
- Offline editing queue in the clients
- Address suggestions (local address book + online fallback)
- Dark mode (follow system / light / dark)
- Full complex RRULE / VTIMEZONE support
- OAuth refresh tokens
🤝 Contributing
Development, deployment and release docs · CONTRIBUTING.md
Follow the manual migration workflow; do not run db:generate with the incomplete snapshot chain. drizzle/README.md
PRs welcome. Local development:
npm ci
npm run dev # build assets + tsx watch
npm run check # types, unit/integration tests, translations
npm run db:migrate # apply migrations to the database
npm run i18n:check # check translation coverage per language
npm run test # vitest
npm run build # production build (terser-minified into src/public/_built/)
Code style: TypeScript strict + ESM-only + Drizzle for SQL. Per-client build instructions are in each apps/*/README.md.
📄 License
MIT — use it however you like, just keep the copyright notice.
This is our own open-source project, not a fork. If you find it useful, a ⭐ is appreciated.
GitHub: wuha-like-sleep/by-wave-calendar
· Gitee mirror: zhaorunsen/by-wave-calendar
· Live demo: rl.lz-ss.com
Explore related projects
Loading…




