{"id":51203901,"url":"https://github.com/stackoverprof/teleworker","last_synced_at":"2026-06-28T02:06:53.112Z","repository":{"id":335966373,"uuid":"1147467729","full_name":"stackoverprof/teleworker","owner":"stackoverprof","description":"Telegram reminder bot on Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2026-02-14T03:19:14.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-14T10:17:52.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://teleworker.erbin.workers.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackoverprof.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-01T19:40:48.000Z","updated_at":"2026-02-14T03:19:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stackoverprof/teleworker","commit_stats":null,"previous_names":["stackoverprof/teleworker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackoverprof/teleworker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackoverprof%2Fteleworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackoverprof%2Fteleworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackoverprof%2Fteleworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackoverprof%2Fteleworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackoverprof","download_url":"https://codeload.github.com/stackoverprof/teleworker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackoverprof%2Fteleworker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34874571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-28T02:06:51.462Z","updated_at":"2026-06-28T02:06:53.104Z","avatar_url":"https://github.com/stackoverprof.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📡 Teleworker\n\n\u003cdiv align=\"center\"\u003e\n\n![Cloudflare Workers](https://img.shields.io/badge/Cloudflare%20Workers-F38020?style=for-the-badge\u0026logo=cloudflare\u0026logoColor=white)\n![Telegram](https://img.shields.io/badge/Telegram-26A5E4?style=for-the-badge\u0026logo=telegram\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Hono](https://img.shields.io/badge/Hono-E36002?style=for-the-badge\u0026logo=hono\u0026logoColor=white)\n\n**Your personal Telegram assistant, running serverlessly on Cloudflare Workers.**\n\n[Features](#-features) • [Quick Start](#-quick-start) • [Configuration](#-configuration) • [Usage](#-usage)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 🔔 **Smart Reminders** - Cron-based, one-time, or conditional triggers\n- ⏰ **iOS Automation** - `/automation` endpoint for iOS Shortcuts alarms\n- 🕌 **Prayer Times** - Fajr, sunrise, and Jumu'ah reminders\n- 📊 **Crypto Alerts** - BTC Fear \u0026 Greed extreme notifications\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) 18+\n- [Cloudflare account](https://dash.cloudflare.com/sign-up) (free tier works)\n- Telegram account\n\n### Step 1: Clone \u0026 Install\n\n```bash\ngit clone https://github.com/stackoverprof/teleworker.git\ncd teleworker\nnpm install\n```\n\n### Step 2: Create Telegram Bot\n\n1. Open Telegram and message [@BotFather](https://t.me/BotFather)\n2. Send `/newbot` and follow the prompts\n3. **Save the token** (looks like `123456789:ABCdefGHI...`)\n\n### Step 3: Get Your Chat ID\n\nThis is needed so your bot knows where to send messages.\n\n1. Message [@userinfobot](https://t.me/userinfobot) on Telegram\n2. It will reply with your **Chat ID** (a number like `925512522`)\n3. **Save this number** - you'll use it when creating reminders\n\n### Step 4: Create D1 Database\n\n```bash\nnpx wrangler d1 create teleworker-db\n```\n\nThis outputs a database ID. Copy it and update `wrangler.toml`:\n\n```toml\n[[d1_databases]]\nbinding = \"DB\"\ndatabase_name = \"teleworker-db\"\ndatabase_id = \"YOUR_DATABASE_ID_HERE\"  # ← Paste here\n```\n\n### Step 5: Run Migrations\n\n```bash\nnpm run db:migrate\n```\n\n### Step 6: Set Secrets\n\n```bash\n# Your Telegram bot token from Step 2\nnpx wrangler secret put TELEGRAM_BOT_TOKEN\n\n# A password to protect your API (make up any secure password)\nnpx wrangler secret put ADMIN_PASSWORD\n```\n\n### Step 7: Deploy!\n\n```bash\nnpm run deploy\n```\n\nYour bot is now live at `https://teleworker.YOUR_SUBDOMAIN.workers.dev` 🎉\n\n---\n\n## 🔧 Configuration\n\n### All Configuration Values\n\n- `TELEGRAM_BOT_TOKEN` — Set via `wrangler secret put`, get from [@BotFather](https://t.me/BotFather)\n- `ADMIN_PASSWORD` — Set via `wrangler secret put`, make up any secure password\n- `database_id` — Set in `wrangler.toml`, get from `wrangler d1 create` output\n- `chatIds` — Used when creating reminders, get from [@userinfobot](https://t.me/userinfobot)\n\n### Optional: Customize Location\n\nPrayer times are configured for Jakarta. To change, edit `src/lib/constants.ts`:\n\n```typescript\nexport const COORDINATES = {\n  latitude: -6.2088, // Your latitude\n  longitude: 106.8456, // Your longitude\n};\nexport const TIMEZONE = \"Asia/Jakarta\"; // Your timezone\n```\n\n---\n\n## � Usage\n\n### Creating a Reminder\n\n```bash\ncurl -X POST https://your-worker.workers.dev/reminders \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Admin-Password: YOUR_PASSWORD\" \\\n  -d '{\n    \"name\": \"Daily Standup\",\n    \"message\": \"🚀 Time for standup meeting!\",\n    \"chatIds\": \"YOUR_CHAT_ID\",\n    \"when\": \"0 2 * * 1-5\",\n    \"ring\": 0,\n    \"active\": 1\n  }'\n```\n\n### Field Reference\n\n- `name` (string) — Display name for the reminder\n- `message` (string) — Message to send (supports `{{variables}}`)\n- `chatIds` (string) — Your Telegram chat ID from [@userinfobot](https://t.me/userinfobot)\n- `when` (string) — Cron expression (UTC) or ISO date\n- `ring` (0 or 1) — 0 = Telegram only, 1 = Include in /automation for iOS alarms\n- `active` (0 or 1) — 0 = Paused, 1 = Active\n- `apiUrl` (string, optional) — Internal route for conditional triggers\n\n### Cron Examples\n\n- `0 2 * * 1-5` — 2:00 AM UTC, Mon-Fri (9:00 AM WIB)\n- `30 7 * * 5` — 7:30 AM UTC, Friday (2:30 PM WIB)\n- `0 10 * * *` — 10:00 AM UTC, daily (5:00 PM WIB)\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Cloudflare Workers                       │\n├─────────────────────────────────────────────────────────────┤\n│  ┌─────────────┐  ┌─────────────┐  ┌──────────────────────┐ │\n│  │    Hono     │  │  Scheduler  │  │    Microservices     │ │\n│  │   Router    │  │   (Cron)    │  ├──────────────────────┤ │\n│  │             │  │             │  │ /fng    - Fear\u0026Greed │ │\n│  │ /reminders  │  │ * * * * *   │  │ /prayer - Prayer     │ │\n│  │ /automation │  │ Checks DB   │  │ /meetings - Monthly  │ │\n│  │             │  │ every min   │  └──────────────────────┘ │\n│  └──────┬──────┘  └──────┬──────┘                           │\n│         │                │                                  │\n│         └────────────────┼──────────────────────────────────┤\n│                          ▼                                  │\n│                  ┌───────────────┐                          │\n│                  │   D1 SQLite   │                          │\n│                  └───────────────┘                          │\n└─────────────────────────────────────────────────────────────┘\n                           │\n              ┌────────────┴────────────┐\n              ▼                         ▼\n       ┌─────────────┐          ┌─────────────┐\n       │  Telegram   │          │     iOS     │\n       │  Bot API    │          │  Shortcuts  │\n       └─────────────┘          └─────────────┘\n```\n\n---\n\n## 📜 License\n\nMIT © [stackoverprof](https://github.com/stackoverprof)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with ❤️ and ☕ on Cloudflare Workers**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverprof%2Fteleworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackoverprof%2Fteleworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverprof%2Fteleworker/lists"}