A 100% static web app — no server, no backend, no hosting costs beyond GitHub Pages.
Your browser connects directly to Telegram via MTProto (WebSocket), stores files in your Saved Messages, and everything runs client-side.
Go to https://my.telegram.org/apps, log in, create an app, and copy your:
- App api_id (a number, e.g.
12345678) - App api_hash (a 32-char hex string)
You'll enter these in the app on first visit — they're stored only in your browser's localStorage and never leave your device.
git init
git add .
git commit -m "initial"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin mainGo to your repo on GitHub → click the Actions tab → watch the "Deploy to GitHub Pages" workflow run. It will build the app and push the built files to a gh-pages branch.
This is the critical step. In your repo on GitHub:
- Go to Settings → Pages
- Under Branch, select
gh-pagesand folder/ (root) - Click Save
https://YOUR_USERNAME.github.io/YOUR_REPO/
If you see a white page or raw HTML with
/src/main.jsx, it means Pages is still set to deploy from themainbranch instead ofgh-pages. Go back to Settings → Pages and make suregh-pagesis selected.
Browser ──WebSocket──▶ Telegram servers (MTProto)
│
localStorage: API credentials + StringSession
- No backend — GramJS runs entirely in your browser via WebSocket
- No database — file metadata stored as prefixed messages in your Saved Messages
- No third-party storage — all files live in your own Telegram account
- Persistent login — session string saved in localStorage
Each uploaded file creates a message in Saved Messages:
ULM1_MANIFEST::<base64 JSON>
{
"v": 1,
"name": "video.mp4",
"size": 2500000000,
"mime": "video/mp4",
"sha256": "abc123...",
"chunks": ["111111", "222222"],
"chunked": true,
"timestamp": 1700000000000
}All Telegram accounts support files up to 2 GB in Saved Messages. TGCloud chunks at 1.95 GB — so any size file works.
npm install
npm run dev
# Open http://localhost:5173| Symptom | Fix |
|---|---|
White page / sees /src/main.jsx |
Pages source is wrong — set to gh-pages branch in Settings → Pages |
| Actions tab shows no workflow | Make sure you pushed the .github/ folder (check git status) |
| Workflow fails | Check the Actions log; usually a missing package-lock.json |
| "Not connected" on login | Your API ID/Hash is wrong — double-check at my.telegram.org/apps |