ityn / teletubby

Telegram Bot using webhooks + Telegram WebApp using Next.js + Tailwind CSS + TypeScript Starter and Boilerplate

Home Page:https://teletubby-psi.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telegram Bot + Telegram WebApp using Next.js + Tailwind CSS + TypeScript Starter and Boilerplate

πŸ”‹ teletubby

Telegram Bot with Next.js + Tailwind CSS + TypeScript starter packed with useful development features. Based on theodorusclarence/ts-nextjs-tailwind-starter

Made by @rogeliorv

Features

This repository is πŸ”‹ battery packed with:

  • ⚑️ Next.js 14
  • βš›οΈ React 18
  • ✨ TypeScript
  • πŸ’¨ Tailwind CSS 3 β€” Configured with CSS Variables to extend the primary color
  • πŸ’Ž Pre-built Components β€” Components that will automatically adapt with your brand color
  • πŸƒ Jest β€” Configured for unit testing
  • πŸ“ˆ Absolute Import and Path Alias β€” Import components using @/ prefix
  • πŸ“ ESLint β€” Find and fix problems in your code, also will auto sort your imports
  • πŸ’– Prettier β€” Format your code consistently
  • 🐢 Husky & Lint Staged β€” Run scripts on your staged files before they are committed
  • πŸ€– Conventional Commit Lint β€” Make sure you & your teammates follow conventional commit
  • ⏰ Release Please β€” Generate your changelog by activating the release-please workflow
  • πŸ‘· Github Actions β€” Lint your code on PR
  • 🚘 Automatic Branch and Issue Autolink β€” Branch will be automatically created on issue assign, and auto linked on PR
  • πŸ”₯ Snippets β€” A collection of useful snippets
  • πŸ‘€ Default Open Graph β€” Awesome open graph generated using og, fork it and deploy!
  • πŸ—Ί Site Map β€” Automatically generate sitemap.xml
  • πŸ“¦ Expansion Pack β€” Easily install common libraries, additional components, and configs

Getting Started

1. Clone this template using one of the three ways:

  1. Use this repository as template

    Disclosure: by using this repository as a template, there will be an attribution on your repository.

    I'll appreciate if you do, so this template can be known by others too πŸ˜„

    Use as template

  2. Using create-next-app

    npx create-next-app -e https://github.com/rogeliorv/teletubby project-name
  3. Using degit

    npx degit rogeliorv/teletubby YOUR_APP_NAME
  4. Deploy to Vercel

    Deploy with Vercel

2. Install dependencies

It is encouraged to use yarn so the husky hooks can work properly.

yarn install

3. Run the development server

You can start the server using this command:

yarn dev

Open http://localhost:3000 with your browser to see the result. You can start editing the page by modifying src/pages/index.tsx.

4. Commit Message Convention

This starter is using conventional commits, it is mandatory to use it to commit changes. (Every commit message should sart with fix: chore: feat: etc)

5. How to use the telegram bot

  • Create a new bot using the BotFather
  • Add your bot token as an env var in .env file to TELEGRAM_BOT_TOKEN
  • Get a publicly visible URL, you can use ngrok or deploy to vercel - Once you have a public URL like: https://some.ngrok-free.app or https://teletubbybot.vercel.app add it to your NEXT_PUBLIC_APP_URL in your .env vars
  • Register your webhook to telegram using (https://api.telegram.org/bot<YOUR_TOKEN>/setWebhook?url=<YOUR_URL>/api/telegramWebhook) (NOTE: Be mindful that "bot" word is prefixed to your token)
  • Go to your bot and send it a message
  • Click the launch button if you want to see your launched webapp within telegram

About

Telegram Bot using webhooks + Telegram WebApp using Next.js + Tailwind CSS + TypeScript Starter and Boilerplate

https://teletubby-psi.vercel.app


Languages

Language:TypeScript 66.3%Language:CSS 25.3%Language:JavaScript 8.4%