demo.mp4
Note: The project was originally developed and maintained locally, so the repository history contains a single initial commit rather than the full development history.
Production Telegram Mini App (web application) for gamified coin mining, daily tasks, and referrals.
- Mini App: https://neocoin.site
- Bot: https://t.me/neocoins_bot
- Channel: https://t.me/neocoin_hub (~1k subscribers)
- API: https://backend.neocoin.site
NeoCoin is a live web application that runs as a Telegram Mini App (and also in a regular browser). Users tap to mine virtual coins, complete daily and social tasks, invite friends, and buy accelerators.
I built the frontend end-to-end: architecture, UI, client state, REST API integration, i18n (EN/RU), analytics, unit tests, and E2E tests.
- Home / mining — tap-to-earn with optimistic UI, energy regeneration, and passive profit sync
- Onboarding — two-step first-run flow with localStorage gate
- Tasks — daily bonus streak, Adsgram ads, Telegram channel subscription
- Friends — referral stats, invite link copy/share, top referrals, become-referral flow
- Accelerators — shop with filters and purchase flow
- Menu — contacts, listing info, video submission
| Area | Technologies |
|---|---|
| UI | React 19, TypeScript, Tailwind CSS 4, Base UI |
| State & data | Redux Toolkit, RTK Query |
| Routing | React Router 7 |
| Platform | Telegram Mini Apps (@tma.js/sdk-react) |
| i18n | i18next / react-i18next (EN + RU) |
| Analytics & monitoring | PostHog, Sentry |
| Unit tests | Vitest, Testing Library |
| E2E tests | Playwright |
| Build | Vite 8 |
| Architecture | Feature-Sliced Design |
- Client–server game state - optimistic taps (
pendingTaps), energy caps, and profit sync reconciled against server time - Dual auth -
X-Telegram-Init-Datain Mini App,X-Web-Session-Idfor browser / local / E2E - Resilience - rate-limit retry, server-unavailable banner, error boundaries
- E2E without mocks — Playwright against
/api
npm install
cp .env.example .env
npm run devLocal: http://127.0.0.1:5173
VITE_API_URL is the API base. Default: https://backend.neocoin.site/api.
| Command | What it does |
|---|---|
npm run dev |
Vite |
npm run build |
Production build |
npm run preview |
Preview the build |
npm run test |
Unit tests (Vitest) |
npm run e2e |
E2E tests (Playwright, Chromium) |
npm run lint |
oxlint |
Vitest covers tap rewards, pending taps, energy regeneration, balance hooks, and API helpers.
npm run testPlaywright specs live in e2e/. The runner starts the local Vite app with VITE_API_URL=/api.
# first time: npx playwright install chromium
npm run e2eTests use a seedApp fixture (e2e/fixtures/app.ts) for onboarding state and a unique web session in localStorage.
Covered: onboarding, bottom nav, home smoke, tasks list → daily sheet, daily reward claim, social subscription error.
UI mode: npx playwright test --ui



