An edge-native, privacy-first personal goal tracker with automated SMS reminders and dual calendar support.
Live Demo β’ Features β’ Quick Start β’ Cloudflare Deployment β’ Architecture
Checkpoint is an ultra-fast, edge-hosted personal productivity system designed to keep you accountable to your long-term and short-term goals. Unlike standard todo lists that get forgotten inside browser tabs, Checkpoint sends timely, automated SMS notifications directly to your phone whenever an upcoming checkpoint or goal deadline is due.
Built natively for Cloudflare Workers using Next.js 16 (Turbopack) and OpenNext, Checkpoint delivers sub-millisecond global cold starts with zero server maintenance, zero monthly hosting bills, and maximum personal privacy.
- π― Milestone & Goal Management: Create, edit, and organize personal and professional goals with descriptions and target completion deadlines.
- π± Automated SMS Reminders:
- Direct integration with the SMS.ir REST API v1.
- One-time milestone alerts and recurring reminder schedules.
- Automatic Iranian mobile number normalization (
+98...,0098...,09...). - Comprehensive delivery audit log (
sent_log) with timestamps and status reporting.
- ποΈ Dual Calendar System (Gregorian & Jalali / Shamsi):
- Full support for both Western (Gregorian) and Persian (Jalali/ΩΨ¬Ψ±Ϋ Ψ΄Ω Ψ³Ϋ) calendars.
- Responsive, custom native date picker popovers adapted to the Google Material design language.
- User-configurable default calendar preference stored locally.
- π Full English & Persian Localization (i18n & RTL):
- Seamless toggle between English (
en) and Persian (fa). - Native Right-to-Left (RTL) typography and layout mirroring.
- Seamless toggle between English (
- π² Progressive Web App (PWA) with Google Workbox:
- Installable as a standalone app on iOS, Android, and Desktop.
- Powered by Google Workbox 7.3.0 with Stale-While-Revalidate caching for static assets, Cache-First for media, and Network-First navigation.
- Dedicated bilingual offline fallback page with automated reconnect detection.
- β‘ Edge-Native Architecture:
- Hosted globally on Cloudflare Workers edge network via
@opennextjs/cloudflare. - Backed by Cloudflare D1 (distributed SQLite) and Drizzle ORM with automated migrations.
- Hosted globally on Cloudflare Workers edge network via
- π Secure Single-User Session Auth:
- Password hashing using
bcryptwith constant-time verification. - Tamper-proof HTTP-only session cookies and bearer-token protection for automated cron workers.
- Password hashing using
graph TD
Client["π± Browser / PWA (Google Workbox SW)"] -->|HTTPS / Next.js 16| Worker["β‘ Cloudflare Worker (OpenNext Runtime)"]
Worker -->|Auth & Routing| MW["Proxy / Middleware (next-intl + Session)"]
Worker -->|Queries & Relations| Drizzle["Drizzle ORM"]
Drizzle -->|SQL Binding| D1["ποΈ Cloudflare D1 (SQLite Database)"]
Cron["β° Scheduled Cron Trigger"] -->|POST /api/check-reminders| Worker
Worker -->|X-API-KEY| SMS["π‘ SMS.ir REST API v1"]
SMS -->|SMS Dispatch| Phone["π² Destination Mobile Number"]
| Layer | Technology |
|---|---|
| Framework | Next.js 16.3.5 with Turbopack & App Router |
| Runtime | Cloudflare Workers via @opennextjs/cloudflare |
| Database | Cloudflare D1 (Serverless distributed SQLite) |
| ORM | Drizzle ORM & Drizzle Kit |
| PWA & SW | Google Workbox 7.3.0 |
| Styling | Tailwind CSS v4 & Radix UI primitives |
| Localization | next-intl (English & Persian RTL) |
| Calendar | jalaali-js for dual Shamsi/Gregorian conversions |
| SMS Gateway | SMS.ir REST API v1 |
Ensure you have the following installed:
- Node.js (version 20 or higher)
- pnpm (
npm install -g pnpm) - Wrangler CLI (
pnpm add -g wrangler)
git clone https://github.com/Josheqani/checkpoint.git
cd checkpointpnpm installCopy the provided example environment template:
cp .env.example .dev.vars
cp .env.example .env.localGenerate your personal password hash and random secrets:
# Generate bcrypt password hash (replace 'mypassword' with your chosen password):
node -e "console.log(require('bcryptjs').hashSync('mypassword', 10))"
# Generate random 32-byte hex secret for SESSION_SECRET:
openssl rand -hex 32
# Generate random 32-byte hex secret for CRON_SECRET:
openssl rand -hex 32Update your .dev.vars file:
NEXTJS_ENV=development
AUTH_USERNAME=admin
AUTH_PASSWORD_HASH=$2b$10$...your_bcrypt_hash...
SESSION_SECRET=...your_session_secret...
CRON_SECRET=...your_cron_secret...
SMSIR_API_KEY=your_sms_ir_api_key
SMSIR_LINE_NUMBER=30000000000000Run D1 migrations locally:
pnpm exec wrangler d1 execute checkpoint-db --local --file=drizzle/0000_warm_red_shift.sql
pnpm exec wrangler d1 execute checkpoint-db --local --file=drizzle/0001_tired_doctor_doom.sqlpnpm devOpen http://localhost:3000 in your browser. Log in with your configured username and password.
Deploying your personal Checkpoint instance to Cloudflare takes less than 5 minutes.
Log into your Cloudflare account via Wrangler:
pnpm exec wrangler loginCreate the remote D1 database:
pnpm exec wrangler d1 create checkpoint-dbWrangler will output configuration information similar to:
Copy the database_id and ensure it matches wrangler.jsonc:
"d1_databases": [
{
"binding": "DB",
"database_name": "checkpoint-db",
"database_id": "your-database-id-here",
"migrations_dir": "drizzle"
}
]Apply the initial database schema to your remote production D1 database:
pnpm exec wrangler d1 execute checkpoint-db --remote --file=drizzle/0000_warm_red_shift.sql
pnpm exec wrangler d1 execute checkpoint-db --remote --file=drizzle/0001_tired_doctor_doom.sqlStore your credentials securely in Cloudflare Secret storage:
pnpm exec wrangler secret put AUTH_USERNAME
pnpm exec wrangler secret put AUTH_PASSWORD_HASH
pnpm exec wrangler secret put SESSION_SECRET
pnpm exec wrangler secret put CRON_SECRET
pnpm exec wrangler secret put SMSIR_API_KEY
pnpm exec wrangler secret put SMSIR_LINE_NUMBERTip: If you don't provide
SMSIR_LINE_NUMBER, Checkpoint will automatically query the SMS.ir/v1/linediscovery endpoint and use your primary active sender line.
Build the OpenNext bundle and deploy directly to Cloudflare:
pnpm run deployYour app will be live at https://checkpoint.<your-subdomain>.workers.dev (or your custom domain configured in Cloudflare).
Checkpoint executes automated reminder checks natively on the Cloudflare Workers edge every 5 minutes (*/5 * * * *).
- Zero External Dependencies: Cloudflare triggers the Worker's
scheduledhandler automatically on the exact minute with sub-millisecond precision. - Edge Security: Runs internally on Cloudflare's network, invoking
/api/check-remindersdirectly. - Quota-Friendly: Uses only 288 runs/day out of Cloudflare's 100,000 free daily requests.
The schedule is pre-configured in wrangler.jsonc:
"triggers": {
"crons": ["*/5 * * * *"] // Runs every 5 minutes on Cloudflare Edge
}You can also trigger the endpoint manually or via any webhook service:
- Endpoint:
POST https://your-domain.workers.dev/api/check-reminders - Header:
Authorization: Bearer <CRON_SECRET>
Checkpoint is a full-featured Progressive Web App. You can install it on your device for an app-like experience with offline capabilities:
- iOS (Safari):
- Open your deployed URL in Safari.
- Tap the Share button (box with upward arrow).
- Scroll down and select Add to Home Screen.
- Android (Chrome / Brave / Edge):
- Open the URL in your browser.
- Tap the menu (three dots) or click the Install Checkpoint banner.
- Select Install.
- Desktop (Chrome / Edge / macOS / Windows):
- Click the Install icon on the right side of the browser URL bar.
- Checkpoint will run in its own dedicated, chromeless window.
| Variable | Description | Required | Default / Example |
|---|---|---|---|
AUTH_USERNAME |
Admin login username | Yes | admin |
AUTH_PASSWORD_HASH |
Bcrypt hash of the login password | Yes | $2b$10$... |
SESSION_SECRET |
Cryptographic secret for signing JWT session cookies | Yes | 32-byte hex string |
CRON_SECRET |
Bearer token for triggering /api/check-reminders |
Yes | 32-byte hex string |
SMSIR_API_KEY |
API Key from your SMS.ir developer console | Yes | String key |
SMSIR_LINE_NUMBER |
Sender line number for SMS dispatch | Optional | 3000... (auto-detected if omitted) |
NEXTJS_ENV |
Environment indicator | Optional | development / production |
checkpoint/
βββ drizzle/ # SQL migrations managed by Drizzle Kit
βββ public/
β βββ favicon.ico # Multi-resolution favicon (16/32/48)
β βββ favicon.svg # Scalable modern checkmark SVG
β βββ manifest.json # PWA Web App Manifest
β βββ offline.html # Bilingual offline fallback page
β βββ sw.js # Google Workbox 7.3 Service Worker
β βββ icons/ # 192x192, 512x512, maskable, apple-touch icons
βββ src/
β βββ app/
β β βββ [locale]/ # Localized Next.js App Router pages
β β β βββ goals/ # Goal listing & creation views
β β β βββ history/ # SMS delivery history log
β β β βββ login/ # Secure admin login form
β β β βββ settings/ # Calendar & default mobile settings
β β β βββ layout.tsx # Root localized layout with PWA metadata
β β β βββ page.tsx # Dashboard with active checkpoints & statistics
β β βββ api/ # Edge API routes (goals, reminders, auth, cron)
β βββ components/ # Reusable UI components & native date pickers
β βββ db/ # D1 client connection & Drizzle schema
β βββ i18n/ # next-intl configuration & English/Persian routing
β βββ lib/ # SMS.ir client, Tehran time utilities, session auth
β βββ middleware.ts # Next.js proxy & edge session guard
βββ wrangler.jsonc # Cloudflare Workers & D1 database bindings
βββ next.config.ts # Next.js configuration
βββ package.json
This project is open-source and available under the MIT License.
{ "binding": "DB", "database_name": "checkpoint-db", "database_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }