{"id":50345230,"url":"https://github.com/bthos/telegramito","last_synced_at":"2026-05-29T19:30:43.698Z","repository":{"id":354260813,"uuid":"1222536482","full_name":"bthos/telegramito","owner":"bthos","description":"A static, browser-only Telegram client. No first-party backend - the session and all settings live on the device.","archived":false,"fork":false,"pushed_at":"2026-05-15T22:28:33.000Z","size":703,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T23:58:12.381Z","etag":null,"topics":["childrens-web","parental-controls","telegram"],"latest_commit_sha":null,"homepage":"https://bthos.github.io/telegramito/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bthos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-27T13:11:57.000Z","updated_at":"2026-05-15T22:28:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bthos/telegramito","commit_stats":null,"previous_names":["bthos/telegramito"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bthos/telegramito","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bthos%2Ftelegramito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bthos%2Ftelegramito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bthos%2Ftelegramito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bthos%2Ftelegramito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bthos","download_url":"https://codeload.github.com/bthos/telegramito/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bthos%2Ftelegramito/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33668185,"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-05-29T02:00:06.066Z","response_time":107,"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":["childrens-web","parental-controls","telegram"],"created_at":"2026-05-29T19:30:42.737Z","updated_at":"2026-05-29T19:30:43.681Z","avatar_url":"https://github.com/bthos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegramito\n\n[![CI](https://github.com/bthos/telegramito/actions/workflows/ci.yml/badge.svg)](https://github.com/bthos/telegramito/actions/workflows/ci.yml)\n\nA static, browser-only Telegram client built on [GramJS](https://gram.js.org/) (MTProto). No first-party backend — the session and all settings live on the device.\n\n## Features\n\n- MTProto connection via GramJS in the browser\n- Chat list with message previews and unread counts\n- Message thread with media rendering (photos, video, audio, files, polls, stickers, dice, paid media, and more)\n- Compose area with auto-grow textarea and reply/forward support\n- Image lightbox, inline location maps, poll voting\n- Chat context panel — peer info, shared media grid, quick actions (see below)\n- Parental / supervised mode: child profile, allowlist, PIN-gated settings, night-hours lock\n- Infinite scroll via IntersectionObserver sentinel (no load-more button)\n- PWA, single-file production HTML output\n- i18n: English, Belarusian, Spanish\n\n## Tech stack\n\n| Layer | Library |\n|---|---|\n| UI | React 19, TypeScript |\n| Bundler | Vite 8, `vite-plugin-pwa`, `vite-plugin-singlefile` |\n| Telegram | GramJS — исходники в git submodule [`vendor/gramjs`](https://github.com/bthos/gramjs), сборка в `vendor/telegram-built` при `npm install` (см. ниже) |\n| i18n | i18next, react-i18next |\n| Persistence | IndexedDB via `idb` |\n| Tests | Vitest, jsdom, `@testing-library/react` |\n\n## Getting started\n\n### Prerequisites\n\n- Node.js 20+\n- Telegram API credentials from [my.telegram.org](https://my.telegram.org)\n\n### Clone\n\nGramJS is vendored as a **git submodule** (`vendor/gramjs`). On `npm install`, **`preinstall`** runs `scripts/prepare-vendor-telegram.mjs`: installs devDependencies inside the submodule, runs `tsc`, and copies the emit into `vendor/telegram-built` (gitignored), which is what the `telegram` dependency points at. The first install can take a few minutes.\n\nTo force a rebuild after changing the submodule commit:\n\n```bash\nnpm run rebuild:telegram\n```\n\nClone with submodules (or init them after clone):\n\n```bash\ngit clone --recurse-submodules https://github.com/\u003cyou\u003e/telegramito.git\n# or, if you already cloned without submodules:\ngit submodule update --init --recursive\n```\n\n### Install\n\n```bash\nnpm install\n```\n\n### Configure\n\nCopy `.env.example` to `.env` and fill in your credentials:\n\n```\nVITE_TELEGRAM_API_ID=\u003cyour api_id\u003e\nVITE_TELEGRAM_API_HASH=\u003cyour api_hash\u003e\n```\n\n### Develop\n\n```bash\nnpm run dev\n```\n\n### Test\n\n```bash\nnpm test\n```\n\n### Build\n\n```bash\nnpm run build\n```\n\nThe output is a single HTML file in `dist/`.\n\n### After changing GramJS (`vendor/gramjs`)\n\n1. `npm run rebuild:telegram`\n2. `npm run build` and `npm test`\n3. Manual smoke: forum topic with a **poll** and a small **message id gap** in history\n\nDetails: [.artefacts/GRAMJS.md](.artefacts/GRAMJS.md).\n\n## Project structure\n\n```\nsrc/\n  context/        TelegramContext, ParentalContext\n  hooks/          Custom React hooks (usePeerRecentMedia, etc.)\n  telegram/       GramJS helpers\n  parental/       Parental policy and storage\n  ui/             React components\n  styles/         app.css, tokens.css\n  locales/        en.json, be.json, es.json\n```\n\n## Chat context panel\n\nToggled from any open chat by the `ℹ` info button in the chat header.\n\n| Viewport | Behaviour |\n|---|---|\n| ≥ 1024 px | 360 px side column, side-by-side with the chat pane |\n| 640–1023 px | Fixed right overlay with a dim backdrop |\n| \u003c 640 px | Bottom sheet (82 dvh) with drag handle and dim backdrop |\n\nThe panel closes automatically on every chat switch.\n\n**Contents:**\n\n- Peer header — avatar (48 px) and display name\n- Shared media grid — 3 × 2 most recent photo thumbnails (blob-rendered); loading skeleton and \"No shared media\" fallback\n- Quick actions — Search in chat (stub, pending UX-14), Mute/Unmute (stub, V2), Block user (private peers, stub V2), Leave group (groups/megagroups, with inline confirmation)\n\n**Keyboard / a11y:** Escape dismisses the panel. Panel root is `role=\"dialog\" aria-modal=\"true\"`. Backdrop click also dismisses.\n\n### `usePeerRecentMedia` hook\n\n```ts\nusePeerRecentMedia(\n  entity: Api.User | Api.Chat | Api.Channel | null | undefined,\n  client: TelegramClient | null,\n): { items: Api.Message[]; loading: boolean; error: string | null }\n```\n\nFetches up to 6 recent photo messages for a peer. Serves from a session-scoped module-level cache on repeated calls to the same peer.\n\n## Parental mode\n\nSwitch between Child and Parent profiles in the top bar. In Child mode:\n\n- Unknown private chats are hidden until allowlisted or approved by the parent\n- Link previews, GIF-heavy messages, and the chat list during night hours can each be independently restricted\n- Destructive actions (block user, leave group) require a parent PIN when set\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbthos%2Ftelegramito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbthos%2Ftelegramito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbthos%2Ftelegramito/lists"}