Skip to content

simpleprogrammer111/ideal-computing-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Business Control & Feedback Telegram Bot

A Telegram bot platform to collect customer feedback, report issues, and track service quality. Includes:

  • Telegram bot (aiogram 3) for surveys, issues, and quick feedback
  • SQLite + SQLAlchemy storage
  • Analytics: CSAT (1-5), NPS (0-10) with detractors/passives/promoters
  • CSV export for offline analysis
  • Minimal FastAPI dashboard for metrics

Prerequisites

  • Python 3.11+
  • Telegram Bot Token from @BotFather

Setup

  1. Clone the repository
  2. Create and fill .env (see .env.example):
BOT_TOKEN=...
DATABASE_URL=sqlite:///./data/app.db
ADMIN_USER_IDS=123456789
  1. Create virtual env and install dependencies:
python -m venv .venv
. .venv/Scripts/activate  # Windows PowerShell: .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

Run (Bot via polling)

python -m app.bot

Run dashboard

uvicorn app.dashboard.main:app --reload --port 8000

CSV export

python -m app.scripts.export_csv --out exports

Project structure

app/
  __init__.py
  config.py
  db/
    __init__.py
    base.py
    models.py
    session.py
  bot/
    __init__.py
    handlers.py
    keyboard.py
    state.py
    main.py
  analytics/
    __init__.py
    metrics.py
  dashboard/
    __init__.py
    main.py
  scripts/
    __init__.py
    export_csv.py

Notes

  • Default DB: SQLite file data/app.db. Create data/ if missing.
  • Replace polling with webhook for production if needed.
  • Use ADMIN_USER_IDS to restrict /report and dashboard.

About

This is an ideal computing machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages