Keywords: domain monitor
• domain checker
• whois lookup
• ssl certificate tracker
• domain expiration alerts
• sveltekit
• cloudflare workers
• slack notifications
• resend notifications
• email notifications
Monitor domain availability, track expiration dates, and get notifications when domains become available or are about to expire.
A modern domain monitoring tool built with SvelteKit and Cloudflare Workers that tracks domain availability, SSL certificates, and sends smart notifications via Slack or email (Resend).
Perfect for: Domain investors, web developers, businesses tracking competitor domains, and anyone managing domain portfolios.
A SvelteKit application running on Cloudflare Workers that monitors domain availability and sends notifications via Slack or Email (Resend) when domains become available.
In addition to available domains, you also receive:
A daily summary keeps you informed and helps you act fast.
Environment Configuration
Create a local .env
file by duplicating the example:
# Copy the example environment file
cp .env.example .env
Then edit .env
with your specific values:
PUBLIC_ENVIRONMENT=dev
PUBLIC_TIMEZONE=Europe/Ljubljana
CRON_SECRET=dev-super-secure-key
PRODUCTION_DOMAIN=https://your-app.com
Local Database Setup
Create and configure your local development database:
# Creation of DB and applying schema to local database
npx wrangler d1 execute local-domain-watcher --local --file=./schema.sql
Verify Database Setup
Check that your database was created successfully:
# Verify local database connection
npx wrangler d1 execute local-domain-watcher --local --command="SELECT * FROM domains;"
Expected output: Existing test data
Start Development Server
Launch the local development server:
# Start development server
pnpm run dev
Your application will be available at: http://localhost:5173
Build the application:
pnpm run build
Start local development server:
npx wrangler dev --local
Test with cron jobs:
npx wrangler dev --test-scheduled
Visit the following URL to manually trigger a cron job:
http://localhost:8787/__scheduled?cron=*+*+*+*+*
🚀 Starting cron...
🕐 Check at: 21:23
📝 Note: If you see "✅ Local - Self-call completed successfully!" in the logs, it means the local cron function is running successfully.
The cron job runs every minute to check scheduled notifications. Since you can set specific times in Slack or Resend settings (e.g., "Send at 14:30"), the cron job must check every minute to trigger notifications at the exact scheduled time.
Example: If notification is set for 14:30, the cron job checks every minute until it matches 14:30, then sends the notification.
Deploy your application using Cloudflare Worker with GitHub integration.
⚠️ Important: Complete database setup before deploying your application!
# Connect to CF account and create production database
npx wrangler d1 create prod-domain-watcher
After creating the database, copy the generated d1_databases
configuration into your wrangler.jsonc file under env.production.d1_databases
:
"d1_databases": [
{
"binding": "DB",
"database_name": "prod-domain-watcher",
"database_id": "generated-id"
}
]
# Apply schema to production database
npx wrangler d1 execute prod-domain-watcher --remote --file=./schema.sql
# Check if tables were created successfully
npx wrangler d1 execute prod-domain-watcher --remote --command="SELECT * FROM domains;"
1. Go to Cloudflare Dashboard:
2. Import Repository:
Build command: pnpm run build
Deploy command: npx wrangler deploy --env production
Build variables:
Set these environment variables (update timezone and generate your own secret):
PUBLIC_ENVIRONMENT = production
PUBLIC_TIMEZONE = Europe/Ljubljana # Change to your timezone (e.g., America/New_York, UTC)
CRON_SECRET = strong-secret-key-here # Replace with a secure random string (32+ characters)
PRODUCTION_DOMAIN = https://your-app.com # Set to your live application URL for robots.txt control
⚠️ Important: The CRON_SECRET environment variable must be identical to the value set in your
wrangler.jsonc
configuration file underenv.production.vars.CRON_SECRET
!
Set Environment Variables in Cloudflare Worker Dashboard:
PUBLIC_ENVIRONMENT
, PUBLIC_TIMEZONE
, PRODUCTION_DOMAIN
and CRON_SECRET
The application uses two main tables:
domains
Table
settings
Table
For detailed table structure and relationships, see schema.sql
database_id
in wrangler.jsonc
PUBLIC_ENVIRONMENT
, PUBLIC_TIMEZONE
and CRON_SECRET
in Cloudflare DashboardCRON_SECRET
values are identical in wrangler.toml
and Cloudflare Dashboard Variables and Secretsnpx wrangler dev --test-scheduled
and test via the /__scheduled
endpointconsole.log
statements in your code for debugging### LOCAL ###
# Check database
npx wrangler d1 execute local-domain-watcher --local --command="SELECT * FROM domains";
# Check database structure
npx wrangler d1 execute local-domain-watcher --local --command="PRAGMA table_info(domains);"
# Export database backup
npx wrangler d1 export local-domain-watcher --local --output=backup.sql
### PRODUCTION ###
# Check production database
npx wrangler d1 execute prod-domain-watcher --remote --command="SELECT * FROM domains";
# Check database structure
npx wrangler d1 execute prod-domain-watcher --remote --command="PRAGMA table_info(domains);"
npx wrangler dev