Skip to content

GanFay/SplitCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 SplitCore — Telegram Expense Organizer

SplitCore is a Telegram bot designed to automate shared expense tracking for groups of friends, travelers, or event organizers. No more messy Excel sheets or "who owes whom" arguments.

🔥 The Core Idea

Users create "Funds" (events), invite friends via unique deep-links, and record their expenses. The bot automatically calculates the balance: who overpaid and who needs to settle their debt.

🛠 Tech Stack

  • Language: Go (Golang) 1.26.2
  • Framework: telebot.v4 (Telegram Bot API)
  • Database: PostgreSQL
  • Driver: pgx/v5 (Connection Pool)
  • In-memory storage: FSM (Finite State Machine) for user dialog management.
  • Infrastructure: Docker, Docker Compose, Makefile.
  • Migrations: golang-migrate.

🏗 Architecture (Clean Architecture)

The project is built with a strict separation of concerns, ensuring high testability and scalability:

  • cmd/bot/ — Entry point, initialization, and Dependency Injection.
  • internal/domain/ — Business entities and Repository interfaces.
  • internal/repository/ — Database access layer (PostgreSQL implementation).
  • internal/delivery/telegram/ — Bot-specific logic (handlers, middleware, router).
  • internal/pkg/ — Internal utilities (random generators, etc.).

📍 Roadmap (MVP Status)

  • +- (In work) Bot skeleton and Inline-button navigation.
  • Finite State Machine (FSM) for user input handling.
  • Database: migrations, user, and fund storage.
  • Fund creation and unique Deep-Link generation.
  • Automatic "Creator-to-Member" enrollment (Transactions).
  • Expense logging (Purchases) — In Progress.
  • Debt calculation math module — Next Step.

🚀 Getting Started (Dev)

  1. Clone the repository:
    git clone https://github.com/GanFay/new-project.git
  2. Set up environment variables in a .env file (Bot token, DB credentials).
  3. Start the database using Docker:
    docker-compose up -d
  4. Run migrations:
    make migrate-up
  5. Run the bot:
    go run cmd/bot/main.go

About

SplitCore — High-performance Telegram bot for tracking shared group expenses. Built with Go 1.26.2, PostgreSQL, and Clean Architecture. Split bills, track debts, and manage shared finances effortlessly.

Topics

Resources

License

Stars

Watchers

Forks

Contributors