Logo Lanfrica

israelassefa/keno-ethiopia

Domain:

natural language processing

Record type:

software
Creator:
isr
Host:
Keno Ethiopia — Amharic frontend (Telegram Web App) and mock backend for testing (ETB, Amharic) # Keno Ethiopia (ኬኖ) — Amharic frontend + mock backend This repository contains a minimal Amharic + ETB-ready Keno frontend (Telegram Web App friendly) and a mock backend to simulate /api/init-session and /api/place-bet for local testing. Live site (after Pages publishes): israelassefa.github.io Contents - index.html — frontend UI (Amharic default) - i18n.js — translations (en + am) - styles.css — styling - app.js — frontend logic and mock mode - backend/ — mock backend (Node.js/Express) Quick local test (frontend-only) 1. Serve the folder locally: - Python: `python -m http.server 8000` - Node: `npx serve .` 2. Open localhost in your browser. Using the mock backend (recommended for Telegram Web App testing) 1. Go to `backend/` and copy `.env.example` to `.env` and set `BOT_TOKEN` (your bot token is required only for init-data verification during testing). 2. Install and run: ```bash cd backend npm install npm start ``` 3. Update `index.html` to set `BACKEND_API` to your backend URL (for local testing: `localhost`). See the comment near the top of `index.html`. Telegram bot snippet (web_app button) Use this in your bot to open the Web App (replace ): ```javascript // node-telegram-bot-api example const TelegramBot = require('node-telegram-bot-api'); const bot = new TelegramBot(process.env.BOT_TOKEN); const chatId = ' '; const url = 'israelassefa.github.io'; bot.sendMessage(chatId, 'Play ኬኖ (Keno)', { reply_markup: { inline_keyboard: [ [{ text: 'Open ኬኖ', web_app: { url } }] ] } }); ``` Security notes - Do NOT store your bot token in client code. The mock backend uses the bot token to demonstrate initData verification — in production keep the token on the server only. - All real bet resolution and balance changes must be handled server-side before enabling real-money bets. Next steps - Deploy the frontend to GitHub Pages (done automatically when files are on `main`). Update `BACKEND_API` …

Languages

Licenses