Skip to content

guberm/SimpleFinTelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SimpleFIN Telegram Bot

🏦 Complete Financial Integration Solution - A comprehensive multi-language ecosystem with C# (.NET 8) and Python implementations for SimpleFIN banking integration through Telegram Bot, Web API, and WebApp interfaces.

Build Status .NET Python License Telegram

A dual-language implementation of SimpleFIN financial accounts integration with Telegram. Choose between C# (.NET 8) or Python implementations, both featuring secure configuration, real-time financial data access, and modern web interfaces.

πŸš€ Available Implementations

πŸ”· C# (.NET 8) Version

  • Enterprise-grade .NET 8 console application and ASP.NET Core API
  • Advanced Configuration with appsettings.json and environment variables
  • VS Code Integration with complete development environment
  • GitHub Actions CI/CD for automated building and testing

πŸ“‚ Location: /csharp | πŸ“– Documentation: C# README

🐍 Python Version

  • Modern async/await Python implementation with FastAPI
  • Type Safety with full type hints and Pydantic models
  • Auto-Documentation with FastAPI's OpenAPI integration
  • Flexible Deployment options for containers and cloud platforms

πŸ“‚ Location: /python | πŸ“– Documentation: Python README

🎯 Choose Your Implementation

Feature C# (.NET 8) Python
Performance ⭐⭐⭐⭐⭐ Compiled, very fast ⭐⭐⭐⭐ Fast with async/await
Memory Usage ⭐⭐⭐⭐ Efficient ⭐⭐⭐ Moderate
Development Speed ⭐⭐⭐ Structured, enterprise ⭐⭐⭐⭐⭐ Rapid prototyping
Deployment ⭐⭐⭐⭐⭐ Single executable ⭐⭐⭐ Runtime required
Documentation ⭐⭐⭐⭐ XML docs + IntelliSense ⭐⭐⭐⭐⭐ Auto-generated API docs
Type Safety ⭐⭐⭐⭐⭐ Compile-time checking ⭐⭐⭐⭐ Runtime with type hints
Ecosystem ⭐⭐⭐⭐ .NET ecosystem ⭐⭐⭐⭐⭐ Vast Python libraries

🌟 Core Features (Both Implementations)

πŸ€– Telegram Bot Commands

  • /start and /help - Interactive command guidance
  • /add - Secure bank connection via SimpleFIN tokens
  • /accounts and /refresh - Real-time account data with balance information
  • /remove - Secure bank connection removal
  • /web - Launch integrated WebApp interface

🌐 REST API Endpoints

  • GET /api/accounts?user_id={id} - Retrieve user's bank connections
  • CORS enabled for cross-origin requests
  • Error handling with structured responses
  • Health checks and monitoring endpoints

πŸ“± Modern WebApp Interface

  • Telegram WebApp API integration with native theming
  • Responsive design for mobile and desktop
  • Real-time data synchronization with bot and API
  • Enhanced UX with loading states and error handling

βš™οΈ Advanced Configuration

  • Multi-environment support (Development/Production)
  • Environment variables for secure production deployment
  • Validation with helpful error messages for developers
  • Flexible settings for different deployment scenarios

πŸ—οΈ Project Structure

SimpleFinTelegramBot/
β”œβ”€β”€ πŸ“ csharp/                    # C# (.NET 8) Implementation
β”‚   β”œβ”€β”€ SimpleFinBot/             # Console Bot Application
β”‚   β”œβ”€β”€ SimpleFinWebApi/          # ASP.NET Core API
β”‚   β”œβ”€β”€ SimpleFinWebApp/          # Static WebApp
β”‚   β”œβ”€β”€ .github/workflows/        # CI/CD Pipeline
β”‚   └── README.md                 # C# Documentation
β”œβ”€β”€ πŸ“ python/                    # Python Implementation
β”‚   β”œβ”€β”€ SimpleFinBot/             # Async Python Bot
β”‚   β”œβ”€β”€ SimpleFinWebApi/          # FastAPI Backend
β”‚   β”œβ”€β”€ SimpleFinWebApp/          # Enhanced WebApp
β”‚   └── README.md                 # Python Documentation
β”œβ”€β”€ README.md                     # This file
β”œβ”€β”€ DESCRIPTION.md                # Project overview
└── GITHUB_DESCRIPTION.md         # Repository metadata

οΏ½ Quick Start

For C# (.NET 8):

cd csharp
dotnet restore
# Configure bot token in appsettings.json or environment variables
dotnet run --project SimpleFinWebApi  # Terminal 1
dotnet run --project SimpleFinBot     # Terminal 2

For Python:

cd python/SimpleFinBot
pip install -r requirements.txt
# Configure bot token in config.json or environment variables
cd ../SimpleFinWebApi && pip install -r requirements.txt
python api.py          # Terminal 1
cd ../SimpleFinBot && python bot.py  # Terminal 2

πŸ”’ Security & Best Practices

Both implementations include:

  • βœ… Secure token management with environment variable support
  • βœ… Input validation and sanitization
  • βœ… Parameterized database queries preventing SQL injection
  • βœ… CORS configuration for API security
  • βœ… Error handling with user-friendly messages
  • βœ… Configuration validation with startup checks

πŸ“š Documentation

Getting Started:

Technical Details:

πŸ“‹ Usage Workflow

  1. Setup: Choose your preferred implementation (C# or Python)
  2. Configure: Set up your Telegram bot token via @BotFather
  3. Deploy: Run both the API server and bot application
  4. Connect: Start a chat with your bot and use /add to connect banks
  5. Access: Use bot commands or the WebApp interface to view account data

πŸ§ͺ Development & Testing

C# Development:

  • VS Code: Complete development environment with tasks and debugging
  • GitHub Actions: Automated CI/CD pipeline for testing and building
  • IntelliSense: Full IDE support with compile-time error checking

Python Development:

  • FastAPI Docs: Automatic API documentation at /docs
  • Type Hints: Full type safety with runtime validation
  • Hot Reload: Development server with auto-restart on changes

🀝 Contributing

  1. Choose your preferred implementation (C# or Python)
  2. Fork the repository
  3. Create a feature branch
  4. Follow the coding standards for your chosen language
  5. Submit a pull request with tests

πŸ“„ License

This project serves as a comprehensive template for SimpleFIN integration with Telegram bots in both C# and Python.


πŸ”· Choose C# for enterprise applications with high performance requirements
🐍 Choose Python for rapid development and extensive ecosystem integration

Both implementations provide identical functionality with language-specific optimizations!

About

Complete C# solution: Telegram Bot + Web API + WebApp for SimpleFIN banking integration. Secure, real-time financial data access with SQLite storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors