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

https://github.com/ledgermall/ledgermall

LedgerMall is an open-source digital commerce platform designed to leverage blockchain technology for secure, multi-crypto transactions. This web-based marketplace aims to provide a user-friendly experience while empowering administrators with real-time analytics and streamlined management tools.
https://github.com/ledgermall/ledgermall

blockchain cryptocurrency ecommerce flask mongodb python website

Last synced: about 2 months ago
JSON representation

LedgerMall is an open-source digital commerce platform designed to leverage blockchain technology for secure, multi-crypto transactions. This web-based marketplace aims to provide a user-friendly experience while empowering administrators with real-time analytics and streamlined management tools.

Awesome Lists containing this project

README

          

[![License: AGPL v3 + Custom Terms](https://img.shields.io/badge/License-AGPL%20v3%20+%20Attribution%20%2F%20NonCommercial-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

# 🧾 LedgerMall – Decentralized Digital Commerce

**LedgerMall** is a secure, crypto-powered e-commerce platform built with **Python**, **Flask**, and **MongoDB**. It supports multiple cryptocurrencies for product purchases, real-time admin analytics, built-in support chat, and wallet integrationβ€”making it a future-forward digital shopping experience.

---

## πŸš€ Features at a Glance

- πŸ” **User Authentication** β€” Sign up, login, hashed password security
- πŸ›οΈ **Product Marketplace** β€” Category filters, detail pages, reviews
- πŸ’Ό **In-App Wallets** β€” Manual deposits & crypto-based balance tracking
- 🧾 **Cart & Checkout** β€” Add/remove items, pay via CoinPayments API
- πŸ§‘β€πŸ’Ό **Admin Panel** β€” Add/edit/delete products, view metrics, manage messages
- πŸ’¬ **Support System** β€” Message-based user queries & admin replies
- πŸ“Š **Dashboard Metrics** β€” Orders, revenue, user activity
- ⭐ **Product Reviews** β€” Users can rate & review products
- πŸ”Ž **Search & Filters** β€” Real-time product search & price filtering

---

## πŸ“ Project Structure

```
LedgerMall/
β”œβ”€β”€ app.py
β”œβ”€β”€ db/
β”‚ β”œβ”€β”€ products.py
β”‚ β”œβ”€β”€ users.py
β”œβ”€β”€ config.py
β”œβ”€β”€ config.yaml
β”œβ”€β”€ templates/
└── requirements.txt
```

---

## πŸ“· Screenshots

| Marketplace | Admin Panel |
|-------------|-------------|
| ![Marketplace Screenshot](./assets/marketplace.jpg) | ![Admin Panel Screenshot](./assets/admin.jpg) |

---

## πŸ› οΈ Setup Instructions

### 1️⃣ Clone the Repository

```bash
git clone https://github.com/ledgermall/ledgermall.git
cd ledgermall
```
---

### 2️⃣ Configure APIs & MongoDB

Ensure MongoDB is running locally or use a remote cluster. Create a database called `ledgermall` with two collections:
- `users`
- `products`

Configure the [config](config.yaml) file and populate with the following:

```python
SECRET_KEY = "your-secret-key"
CP_PUBLIC_KEY = "your-coinpayments-public-key"
CP_PRIVATE_KEY = "your-coinpayments-private-key"
BUYER_EMAIL = "buyer@example.com"

COIN_MAPPING = {
"btc": {"currency2": "BTC", "address": "your-btc-address"},
"ltc": {"currency2": "LTC", "address": "your-ltc-address"},
...
}
```
> ⚠️ Keep this file secure and don’t commit it publicly.

---

### 3️⃣ Install Dependencies & Run WebApp

```bash
pip install -r requirements.txt
python app.py
```

πŸ“¦ Click to see required packages

```txt
Flask
flask-login
flask-bcrypt
pymongo
pycoinpayments
```

---

## πŸ” Admin Setup (Manual via MongoDB)

Create an admin user directly in the `users` collection. Sample document:

```json
{
"username": "admin",
"email": "admin@example.com",
"password": "",
"is_admin": true
}
```

To generate a bcrypt hash:

```python
from flask_bcrypt import Bcrypt
bcrypt = Bcrypt()
print(bcrypt.generate_password_hash("yourpassword").decode())
```

> ⚠️ There’s no web interface to set up admin yet. Use MongoDB Compass or CLI.

---

## πŸ”’ Security Practices

- Use **HTTPS** in production
- Keep **MongoDB secure** and password-protected
- **Environment variables** for secrets (avoid plain `config.py` in production)
- Validate & sanitize all user inputs
- Restrict admin routes via `is_admin` checks

---

## πŸ“Š Future Add-ons (Roadmap Ideas)

- πŸ“¨ Telegram or email order notifications
- πŸ†” Verified user tiers (KYC)
- 🧾 Auto-generated PDF invoices
- πŸ“± Mobile-friendly UI/UX
- πŸͺ REST API integration for external platforms or Telegram bots

---

## 🀝 Contribution Guide

We welcome your contributions! Here's how:

1. Fork the repo
2. Create your feature branch (`git checkout -b feature/cool-feature`)
3. Commit your changes
4. Push to the branch (`git push origin feature/cool-feature`)
5. Open a Pull Request

---

## πŸ›  Built With

| Tech Stack | Description |
|------------|-------------|
| **Python & Flask** | Backend framework |
| **MongoDB** | NoSQL database |
| **Jinja2** | Templating engine |
| **CoinPayments API** | Crypto payment gateway |
| **HTML/CSS/JS** | Frontend foundation |

---

## πŸ“„ License

This project is licensed under the [AGPL License](LICENSE).

- You are free to modify, distribute, and use the code **for non-commercial purposes only**.
- Any modifications and distributions of the project must also be licensed under the AGPL.
- You may **not** use this code for commercial purposes without explicit permission.
- If you use this code in a publicly accessible system, you must make the source code available to the users of that system.
- **Credits:** Please give appropriate credit to the original author, **Samrat Talukdar**.

Feel free to make it your own, but please ensure that the AGPL license terms and the non-commercial restriction are followed.

---

## Crafted with πŸ’», β˜•, and a bit of β‚Ώitcoin, by [Samrat](github.com/ogsamrat)<3
> _LedgerMall isn't just a store β€” it's your step into a decentralized future._
> Buy, sell, and grow securely with crypto at your fingertips. πŸ›’πŸ’ΈπŸ›‘οΈ