Deresegn is a Next.js Telegram Mini App that allows Ethiopian businesses to easily generate, track, and send legally compliant, bilingual (English/Amharic) VAT invoices directly within Telegram.
# 📄 Deresegn - VAT Invoice Generator
**Deresegn** is a Next.js Telegram Mini App that allows Ethiopian businesses to easily generate, track, and send legally compliant, bilingual (English/Amharic) VAT invoices directly within Telegram.
## ✨ Features
* **📱 Telegram Mini App:** Works natively inside Telegram.
* **🇪🇹 Ethiopian Market Ready:** Bilingual PDF generation (English/Amharic) and automatic Gregorian to Ethiopian calendar conversion.
* **🧮 Smart Calculations:** Automatically calculates 15% VAT and totals.
* **💾 Cloud Storage:** Securely saves business profiles and invoice history.
* **🤖 Bot Integration:** Instantly sends the generated PDF invoice back to the user's Telegram chat.
* **💳 Freemium Model:** Built-in paywall system for tracking free limits and premium upgrades.
## 🛠 Tech Stack
* **Frontend:** Next.js 14, React, Tailwind CSS
* **Backend/Database:** Supabase (PostgreSQL, Edge Functions)
* **PDF Generation:** jsPDF (with custom Abyssinica SIL font support)
* **Integration:** Telegram WebApp SDK, Telegram Bot API
## 🚀 Getting Started
### Prerequisites
Make sure you have Node.js installed. You will also need a Supabase project and a Telegram Bot token from BotFather.
### 1. Clone the repository
```bash
git clone
github.com
cd Receipt-Generator
```
### 2. Install dependencies
```bash
npm install
```
### 3. Environment Setup
Create a `.env.local` file in the root directory and add the following keys:
```env
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
```
### 4. Database Setup
Run the SQL queries found in `supabase/migrations/001_initial_schema.sql` in your Supabase SQL Editor to create the necessary tables, functions, and Row Level Security (RLS) policies.
### 5. Run the app
```bash
npm run dev
```
*Note: Because this is a Telegram WebA …