An open API service indexing awesome lists of open source software.

https://github.com/naveed-gung/botanika-desktop

Botanika Desktop is a modern Windows-based administrative application built using C# WinForms. It serves as the administrative CRM counterpart to the Botanika E-commerce Platform, enabling structured real-time management of business data such as products, clients, orders, and payments.
https://github.com/naveed-gung/botanika-desktop

csharp dotnet firebase firebase-auth

Last synced: 22 days ago
JSON representation

Botanika Desktop is a modern Windows-based administrative application built using C# WinForms. It serves as the administrative CRM counterpart to the Botanika E-commerce Platform, enabling structured real-time management of business data such as products, clients, orders, and payments.

Awesome Lists containing this project

README

          













A modern, premium admin CRM desktop application — the administrative backbone of the Botanika plant e-commerce ecosystem.


## About

**Botanika Desktop** is a full-featured Windows admin panel built from the ground up in **C# WinForms**. It was developed as an extended implementation of a basic CRUD assignment, evolving far beyond the original requirements into a polished, production-grade **administrative CRM system**.

The application acts as the operational command center for the Botanika platform — managing products, clients, orders, payments, suppliers, and revenue analytics — all synchronized in real-time with **Google Cloud Firestore**.




Secure Auth

Firebase Auth + Admin gate



Live Dashboard

Real-time KPI metrics



Firestore CRUD

Full entity management



Import / Export

CSV & Markdown


---

## Features



| Feature | Description |
|----------------------|--------------------------------------------------------------------|
| Firebase Auth REST | Email/password sign-in via `identitytoolkit.googleapis.com` |
| Admin Gate | Secondary admin-email verification prevents unauthorized access |
| Service Account JWT | PKCS#8 RSA key parsing → signed JWT → OAuth2 access token exchange |
| Credential Isolation | API keys loaded from external files, excluded via `.gitignore` |



| Feature | Description |
|---------|-----------------------------------------------------------------------|
| KPI Stat Cards | Total Revenue, Orders, Products, and Clients at a glance |
| Recent Orders Feed | Live-updating list of the latest transactions |
| Revenue Panel | Dedicated revenue tracking and financial overview |
| Auto-Refresh | Dashboard data pulled fresh from Firestore on every load |



| Module | Capabilities |
|--------|-------------|
| **Products** | Create, edit, delete, search — with image URLs and category tags |
| **Clients** | Customer profiles with contact info and order history |
| **Orders** | Order tracking with status management and item breakdowns |
| **Payments** | Payment recording with method, amount, and date tracking |
| **Suppliers** | Supplier directory with product associations |



| Component | Purpose |
|-----------|---------|
| `BotanikaButton` | Themed action buttons with hover states |
| `BotanikaListView` | Custom-styled list/grid with alternating row colors |
| `SidebarItem` | Icon-based navigation items with active state highlighting |
| `ToastNotification` | Non-blocking success/error notifications |
| `BotanikaColors` | Centralized color palette (Primary, Charcoal, Sand, etc.) |
| `BotanikaFonts` | Typography system with heading, body, and caption presets |
| `BotanikaTheme` | Rounded corners, shadows, and global styling utilities |



An integrated conversational interface for quick admin operations and help — accessible directly from the sidebar.



| Format | Direction |
|--------|-----------|
| **CSV** | Export — generate spreadsheet-compatible data dumps |
| **Markdown** | Export — create formatted reports |
| **Import** | Bulk data ingestion from external files |

---

## Architecture

```
Botanika-Desktop/

├── 📂 Forms/ ← UI Screens & Panels
│ ├── LoginForm.cs ← Secure admin authentication
│ ├── MainForm.cs ← Shell with sidebar navigation
│ ├── DashboardPanel.cs ← KPI cards + recent orders
│ ├── ProductsPanel.cs ← Product CRUD
│ ├── ProductEditDialog.cs ← Product create/edit modal
│ ├── ClientsPanel.cs ← Client management
│ ├── OrdersPanel.cs ← Order tracking
│ ├── PaymentsPanel.cs ← Payment records
│ ├── SuppliersPanel.cs ← Supplier directory
│ ├── RevenuePanel.cs ← Financial analytics
│ └── ChatbotPanel.cs ← Integrated chatbot

├── 📂 Controls/ ← Reusable UI Components
│ ├── BotanikaButton.cs
│ ├── BotanikaListView.cs
│ ├── SidebarItem.cs
│ └── ToastNotification.cs

├── 📂 Firebase/ ← Backend Layer
│ ├── FirebaseService.cs ← HTTP bridge, JWT auth, CRUD
│ └── Models/
│ ├── Product.cs
│ ├── Client.cs
│ ├── Order.cs
│ ├── Payment.cs
│ └── Supplier.cs

├── 📂 Export/ ← Data Import/Export
│ ├── CsvExporter.cs
│ ├── MarkdownExporter.cs
│ └── ImportHandler.cs

├── 📂 Theme/ ← Design System
│ ├── BotanikaColors.cs
│ ├── BotanikaFonts.cs
│ └── BotanikaTheme.cs

├── 📂 Assets/ ← Icons, branding, credentials
├── Session.cs ← Global session state
└── Program.cs ← Application entry point
```

---

## Tech Stack



C#

Primary Language



.NET 4.7.2

Framework



Firebase

Auth & Firestore



Newtonsoft

JSON Serialization



WinForms

Desktop UI

---

## Getting Started

### Prerequisites

- **Visual Studio 2022** (or later)
- **.NET Framework 4.7.2** runtime
- A **Firebase project** with Firestore enabled

### Installation

```bash
# 1. Clone the repository
git clone https://github.com/naveed-gung/botanika-desktop.git

# 2. Open the solution
# Launch Botanika-Desktop.sln in Visual Studio
```

### Firebase Configuration

> [!IMPORTANT]
> You must provide two credential files before the app can connect to Firebase.
> These files are **excluded from Git** by `.gitignore` and will never be committed.

File
Location
Purpose

serviceAccount.json
Assets/
Firebase Admin SDK key — powers all Firestore CRUD operations via service account JWT

firebase_api_key.txt
Assets/
Firebase Web API key (single line) — used for email/password sign-in verification

**Where to find them:**
1. **`serviceAccount.json`** → [Firebase Console](https://console.firebase.google.com/) → Project Settings → Service Accounts → Generate New Private Key
2. **`firebase_api_key.txt`** → [Firebase Console](https://console.firebase.google.com/) → Project Settings → General → Web API Key → paste into the file

Then press **F5** in Visual Studio to build and run.

---

## Security

| Layer | Protection |
|:------|:-----------|
| **Credentials** | `serviceAccount.json` and `firebase_api_key.txt` are in `.gitignore` — never tracked by Git |
| **Authentication** | Firebase Auth REST API validates admin credentials server-side |
| **Authorization** | Secondary admin-email gate ensures only authorized users access the CRM |
| **Token Management** | Service account JWTs are minted locally with 1-hour expiry and auto-refreshed |

---

## Related Project

| | Botanika Web | Botanika Desktop |
|---|:---:|:---:|
| **Type** | E-commerce storefront | Admin CRM |
| **Tech** | HTML / CSS / JS | C# WinForms |
| **Users** | Customers | Administrators |
| **Link** | [botanika-754.netlify.app](https://botanika-754.netlify.app) | *This repository* |

---

## License

This project was developed for **educational and portfolio purposes**.

---


**Built with 🌿 by [Naveed Sohail Gung](https://github.com/naveed-gung)**