Skip to content

iTeebot/flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🌊 Teebot Flow

teebot-flow

🌐 Web Version: flow.iteebot.com

Teebot Flow is a high-performance, professional Desktop ERP solution designed for modern business operations. Built with a focus on speed, reliability, and ease of use, it leverages the power of Tauri and Rust to provide a secure, offline-first desktop experience.

Teebot Flow is now open for public collaboration. The project is released under AGPL-3.0, and contributions, issue reports, and pull requests are welcome.

This repository and its full commit history are covered by AGPL-3.0. That means the entire project, including all existing commits and any future contributions, is intended to remain under this license.


🀝 Open Source & Contribution


πŸš€ Key Features

  • πŸ“¦ Inventory Management: Track stock levels with real-time updates.
  • πŸ“„ Delivery Challan System: Streamlined flow for creating and managing delivery challans.
  • πŸ‘₯ Customer Management: Organize customer data and transaction history.
  • πŸ“Š Dashboard KPIs: Visual insights into business performance.
  • πŸ–¨οΈ PDF & Export: Professional report generation and printing capabilities.

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 19, TypeScript, Vite 7
Styling Tailwind CSS 4
State Zustand
Backend Rust (via Tauri 2.0)
Database SQLite (Local Storage)
UI Icons Lucide React
Charts Recharts

πŸ“ System Architecture

1. System Context Diagram

Below is the high-level overview of how Teebot Flow interacts with the local system and the user.

flowchart TD
    A["User (Admin / Staff)"] --> B["React Frontend UI"]
    B --> C["Tauri Invoke Bridge"]
    C --> D["Rust Backend Commands"]

    D --> D1["Validation Layer"]
    D --> D2["Business Logic Layer"]

    D1 --> E[("SQLite Database")]
    D2 --> E

    D --> F["File System Storage"]
    D --> G["PDF / Report Generator"]

    E --> D
    F --> D
    G --> B

    B --> H["State Management<br/>Zustand"]
    H --> B
Loading

2. Core Application Flow

The bridge between the modern web frontend and the high-performance Rust backend.

sequenceDiagram
    participant UI as React UI
    participant Bridge as Tauri IPC
    participant Rust as Rust Command Layer
    participant DB as SQLite Database

    UI->>Bridge: Invoke Command (e.g., create_dc)
    Bridge->>Rust: Pass Data
    Rust->>Rust: Validate & Process
    Rust->>DB: Read/Write Data
    DB-->>Rust: Confirmation/Result
    Rust-->>Bridge: Processed Result
    Bridge-->>UI: Update State
Loading

πŸ“¦ Module Workflow: Delivery Challan

The core workflow for the ERP's Delivery Challan (DC) module.

flowchart TD
    A[Open Create Delivery Challan Page] --> B[Select Customer]
    B --> C[Add Products / Items]
    C --> D[Frontend Validation]

    D --> E[Tauri Invoke: create_dc]

    E --> F[Rust Command: dc.rs]

    F --> G[Generate DC Number]
    F --> H[Check Stock Levels]
    F --> I[Save DC Header]
    F --> J[Save DC Items]

    G --> K[(SQLite DB)]
    H --> K
    I --> K
    J --> K

    K --> L[Return DC ID + Number]

    L --> M[UI Success Screen]
    M --> N[Print / PDF Export Option]

    N --> O[PDF Generator Service]
    O --> P[Saved File System]
Loading

πŸ—„οΈ Data Model (ER Diagram)

Our relational structure ensures data integrity and supports complex business logic. For more technical details on the database design and cloud-sync strategies, see the Database Architecture Documentation.

erDiagram
    CUSTOMERS ||--o{ DELIVERY_CHALLANS : places
    DELIVERY_CHALLANS ||--o{ DC_ITEMS : contains
    PRODUCTS ||--o{ DC_ITEMS : included_in

    CUSTOMERS {
        int id
        string name
        string phone
        string address
    }

    PRODUCTS {
        int id
        string name
        string sku
        int stock_qty
        float price
    }

    DELIVERY_CHALLANS {
        int id
        string dc_number
        int customer_id
        date created_at
    }

    DC_ITEMS {
        int id
        int dc_id
        int product_id
        int quantity
        float rate
    }
Loading

πŸ—οΈ Folder Structure

teebot-flow/
β”œβ”€β”€ src-tauri/             # Rust Backend (Commands, Database Logic)
β”œβ”€β”€ src/                   # React Frontend
β”‚   β”œβ”€β”€ components/        # Reusable UI Components
β”‚   β”œβ”€β”€ modules/           # Feature-based Modules (DC, Inventory, etc.)
β”‚   β”œβ”€β”€ store/             # Zustand State Stores
β”‚   └── types/             # TypeScript Interfaces
β”œβ”€β”€ public/                # Static Assets
└── package.json           # Frontend Dependencies & Scripts

πŸ› οΈ Development Setup

Prerequisites

Installation

  1. Clone the repository.
  2. Enable pnpm through Corepack (ships with Node.js β‰₯ 16.13):
    corepack enable
    corepack prepare          # installs the pnpm version pinned in package.json (currently 10.33.2)
  3. Install dependencies:
    pnpm install

Run Locally

Launch the application in development mode:

pnpm dev:desktop

Build

Generate the web build or production desktop binary:

pnpm build
pnpm build:desktop

πŸ›‘οΈ Best Practices & Guidelines

  • Database First: Always design and migrate the DB before implementing UI changes.
  • Logic Separation: Keep heavy business logic in Rust; UI remains thin and reactive.
  • Isolation: Features should be modular to prevent regression.
  • Security: Validate all inputs at the Rust layer, even if validated in the frontend.

Β© 2026 Teebot Flow. Licensed under AGPL-3.0.

About

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Contributors