How telegram-mini-apps/telegramui works
Project type and purpose
• This is an open-source React/TypeScript UI component library (“Telegram UI Kit”) designed to provide pre-built, themeable UI building blocks for Telegram mini-apps and web clients. It targets modern browsers and SSR, and ships as an npm package.
File structure
• Top-level: configuration and metadata (package.json, tsconfig.json, jest.config.js, .eslintrc.js, webpack.styles.config.js).
• Storybook setup: .storybook/ and src/storybook/ for live component playground and documentation.
• Source folder:
• src/components/… — categorized React components (Blocks, Feedback, Form, Layout, Navigation, Overlays, Service, Typography, etc.)
• src/helpers/… and src/hooks/… — shared utility functions and custom React hooks.
• src/types/… — shared TypeScript types.
• src/… .mdx — getting-started and platform/palette guides.
• Build pipeline: SWC config (package.swcrc), TypeScript, Webpack for styles, and Jest for tests.
• Distribution: builds under dist/ (styles.css, compiled JS, type declarations).
README for additional insights
• Documentation points to Storybook for interactive demos and MDX guides.