- Telegram bot runs on Node.js (TypeScript, ESM) and uses grammy for updates.
- HTTP server layer is built with Fastify/Hono for bot webhooks, web app hosting, and APIs.
- Data is stored in MongoDB via Mongoose.
- Frontend is a Vue 3 + Vite app under
src/frontend.
- Bot startup:
src/main.tswires configuration, bot instance, and server startup. - Bot logic:
src/bot/handles commands, menus, and message flows. - Backend services:
src/backend/contains data access and business logic. - Server:
src/server.tsexposes webhook endpoints, static content, and API routes. - Frontend:
src/frontend/srcis the web UI; it talks to backend APIs and TON-related services.
.envis required for runtime secrets and service endpoints.- Core config lives in
src/config.ts; environment values are loaded viadotenv.
- Telegram Bot API via grammy.
- TON/tonconnect for blockchain interactions.
- Pinata for NFT/IPFS storage.
- Optional OpenAI and Stability APIs when enabled by keys.
- Backend:
npm run dev(tsx watch) andnpm run build:bot(tsc). - Frontend:
npm --prefix src/frontend run devandnpm --prefix src/frontend run build.
- ESM-only imports.
- Keep frontend and backend dependencies isolated (separate
package.json). - Avoid editing generated output under
build/.