Skip to content

Redstoun-VG/telegram-ai-saas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Telegram AI SaaS Bot

AI-powered Telegram Assistant built with Java & Spring Boot

Telegram • Spring Boot • PostgreSQL • Docker • REST API • LLM Integration


Java Spring Boot PostgreSQL Docker Maven Status


📖 About

Telegram AI SaaS Bot is a backend application that provides an AI-powered assistant inside Telegram.

The project demonstrates a production-style backend architecture using Spring Boot, PostgreSQL, Flyway, Docker and REST principles.

The bot integrates with Large Language Models (LLM), stores user conversations, tracks token usage and supports multiple subscription plans.

This project is being actively developed as a portfolio and commercial SaaS application.


✨ Features

  • 🤖 AI chat inside Telegram
  • 💬 Conversation history
  • 🧠 LLM API integration
  • 📊 Token usage tracking
  • 👤 User registration
  • 💳 Subscription plans
  • 🛡 Admin commands
  • 🗄 PostgreSQL persistence
  • 🔄 Flyway database migrations
  • 🐳 Docker support

🏗 Architecture

                   Telegram User
                         │
                         ▼
                  Telegram Bot API
                         │
                         ▼
                  Spring Boot Backend
                         │
        ┌────────────────┼────────────────┐
        ▼                ▼                ▼
 PostgreSQL        LLM API Service    Token Tracking
        │
        ▼
 Conversation History

🛠 Tech Stack

Backend

  • Java 21
  • Spring Boot 3
  • Spring Data JPA
  • Hibernate
  • REST API
  • Maven
  • Lombok

Database

  • PostgreSQL
  • Flyway

Infrastructure

  • Docker

AI

  • Large Language Model API Integration

📁 Project Structure

src
└── main
    ├── config
    ├── controller
    ├── dto
    ├── entity
    ├── repository
    ├── service
    ├── telegram
    ├── util
    └── exception

⚙ Current Functionality

Feature Status
Telegram Bot
AI Responses
User Registration
Chat History
Token Tracking
Subscription Plans
PostgreSQL Storage
Admin Commands
Docker Support

🚀 Planned Features

  • Payment integration
  • Multiple AI providers
  • Web Dashboard
  • User analytics
  • Rate limiting
  • Monitoring
  • Logging improvements
  • Export conversations
  • User profile management

🗄 Database

Main entities:

  • User
  • ChatMessage
  • TokenUsage

Database migrations are managed using Flyway.


🚀 Getting Started

Requirements

  • Java 21
  • Maven
  • Docker
  • PostgreSQL

Clone repository

git clone https://github.com/Redstoun-VG/telegram-ai-saas.git

Build

mvn clean install

Run

mvn spring-boot:run

💡 Purpose

The project was created to practice production backend development and build a scalable SaaS architecture for AI-powered Telegram assistants.

It focuses on:

  • Clean Architecture
  • Spring Boot
  • REST API
  • Database design
  • Docker deployment
  • AI integration
  • SaaS architecture

📌 Development Status

🟡 Active Development

New functionality is continuously being added.


👨‍💻 Author

Redstoun-VG

GitHub:

https://github.com/Redstoun-VG


⭐ If you found this project interesting, feel free to leave a star.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages