Skip to content

Repository files navigation

NeoCoin

demo.mp4

Home Boosters Tasks Friends

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.

About

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.

Features

  • 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

Stack

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

Technical highlights

  • Client–server game state - optimistic taps (pendingTaps), energy caps, and profit sync reconciled against server time
  • Dual auth - X-Telegram-Init-Data in Mini App, X-Web-Session-Id for browser / local / E2E
  • Resilience - rate-limit retry, server-unavailable banner, error boundaries
  • E2E without mocks — Playwright against /api

Run

npm install
cp .env.example .env
npm run dev

Local: http://127.0.0.1:5173

VITE_API_URL is the API base. Default: https://backend.neocoin.site/api.

Scripts

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

Tests

Unit

Vitest covers tap rewards, pending taps, energy regeneration, balance hooks, and API helpers.

npm run test

E2E

Playwright specs live in e2e/. The runner starts the local Vite app with VITE_API_URL=/api.

# first time: npx playwright install chromium
npm run e2e

Tests 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

About

Production Telegram Mini App built with React, TypeScript, RTK Query and Feature-Sliced Design

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages