Skip to content
test-bit-sysPublic

About

DZHub (دزاير هب) — Trusted Algerian marketplace for digital services and products with escrow protection. Open source & under active development.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

DZHub

DZHub — دزاير هب

منصة جزائرية للخدمات والمنتجات الرقمية مع حماية الضمان (Escrow)

Trusted Algerian marketplace for digital services and products with escrow protection.

Python Django Channels PostgreSQL Redis Stripe

Status PRs Welcome License

Important

🚧 مشروع مفتوح المصدر قيد التطوير النشط (Work In Progress)
هذا المشروع في مرحلة بناء وتطوير مستمر، وهو مفتوح المصدر بالكامل ومتاح لكافة المطورين للمساهمة والتطوير. نرحب بكل الأفكار، تحسينات الكود، إصلاحات الأخطاء، وطلبات السحب (Pull Requests). يرجى مراجعة دليل المساهمة (CONTRIBUTING.md) و سياسة الأمان (SECURITY.md).

This repository is under active development and open for public community contributions. We warmly welcome pull requests, security audits, feature ideas, and feedback!

Protected Payments
Checkout, hold, release, and refund logic
Realtime Operations
Rooms, chat, notifications, and activity flow
Trust Layer
KYC-aware workflows, moderation, and support
Deployment Ready
Health checks, Docker stack, staging, and tests

Product Vision

DZHub (دزاير هب) is an escrow-first platform designed specifically for digital services and digital products. A transaction remains structured, traceable, and protected from the moment a buyer commits payment until the deal is successfully completed or safely refunded.

Instead of treating escrow as an add-on, the platform places it at the center of the product experience. Listings, rooms, support, notifications, moderation, invoices, and payment state changes are all connected to the transaction lifecycle.

End-to-End Flow

  1. A seller creates a listing or starts a deal.
  2. A buyer initiates payment through the platform.
  3. The amount is held in escrow rather than released immediately.
  4. Both sides continue inside the protected deal room.
  5. The transaction concludes through release, refund, or staff review.

Feature System

Transaction Core

  • Escrow payment lifecycle with hold, release, and refund states
  • Fixed-price listings and auction listings
  • Invoice visibility and payment audit continuity
  • Dedicated success and checkout flows for buyer confidence

Collaboration Layer

  • Real-time escrow rooms
  • Private chat and message attachments
  • Notification polling and room activity updates
  • Structured communication tied directly to the transaction

Trust and Moderation

  • KYC-aware verification states
  • Support ticket system and staff review workflows
  • Moderation paths for withdrawals, rooms, and user actions
  • Protected staff surfaces with access controls

Operational Readiness

  • Docker and production-style compose stack
  • Health endpoint for uptime and orchestration checks
  • Deployment checklist and env templates
  • Full test suite covering core business flows

Visual Preview

Authentication flow

Authentication Flow

Trust and product layer

Trust and Product Layer

Marketplace experience

Marketplace Experience

Architecture Snapshot

Core Stack

  • Python 3
  • Django 4.2+
  • Django Channels
  • Celery

Data and Infrastructure

  • PostgreSQL
  • Redis
  • Docker and Docker Compose

Integrations

  • Stripe
  • Google OAuth via django-allauth
  • SMTP email delivery

Service Map

flowchart LR
    U[Users] --> W[Web App]
    W --> D[(PostgreSQL)]
    W --> R[(Redis)]
    W --> S[Stripe]
    W --> M[SMTP]
    W --> C[Celery Worker]
    W --> B[Celery Beat]
    C --> D
    C --> R
    B --> R
    S --> WH[Webhook Endpoint]
    WH --> W
Loading

Repository Layout

core/                    Django settings and project configuration
main/                    Main application: views, models, tests, services
templates/               HTML templates
static/                  CSS, JavaScript, and image assets
docker/                  Entrypoint and healthcheck helpers
.env.example             Local development template
.env.production.example  Production environment template
DEPLOYMENT_CHECKLIST.md  Launch and deployment checklist

Quick Start

Requirements

  • Python 3.9+
  • PostgreSQL
  • Redis
  • Virtual environment support

Local Setup

  1. Clone the repository
git clone https://github.com/test-bit-sys/escrow-.git
cd escrow-
  1. Create and activate a virtual environment
# Windows
python -m venv venv
venv\Scripts\activate

# macOS / Linux
python -m venv venv
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Create the environment file
cp .env.example .env
  1. Run database setup
python manage.py migrate
python manage.py createsuperuser
  1. Start the app
python manage.py runserver

Local HTTPS for preview:

.\run_dev.ps1 -Https

Then open https://localhost:8000/. The generated certificate is for local development only, so the browser may ask you to accept it the first time.

If port 8000 is still used by an old HTTP server, replace it with:

.\run_dev.ps1 -Https -ReplacePort

Docker

Containerized local stack:

docker compose up --build

Production-style stack:

cp .env.production.example .env.production
docker compose -f docker-compose.prod.yml up --build -d

Configuration

Important environment variables:

  • DJANGO_SECRET_KEY
  • DJANGO_DEBUG
  • SITE_URL
  • DJANGO_ALLOWED_HOSTS
  • DJANGO_CSRF_TRUSTED_ORIGINS
  • DATABASE_URL or DB_*
  • REDIS_URL or REDIS_HOST / REDIS_PORT
  • STRIPE_PUBLIC_KEY
  • STRIPE_SECRET_KEY
  • STRIPE_WEBHOOK_SECRET
  • EMAIL_HOST_USER
  • EMAIL_HOST_PASSWORD

Reference files:

Health and Readiness

Built-in health endpoints:

  • /health/
  • /health/?format=text

These are suitable for local verification, staging uptime checks, and container health probes.

Payments and Escrow

The current payment lifecycle is:

  1. A checkout is created for a deal.
  2. A successful payment moves the deal into escrow.
  3. The escrow room becomes active.
  4. The platform resolves the deal through release or refund logic.
  5. Invoice and audit details remain available in the system.

For local Stripe webhook testing:

stripe listen --forward-to http://127.0.0.1:8000/stripe/webhook/

Testing

Core verification:

python manage.py check
python manage.py test --keepdb

Deployment-oriented verification:

python manage.py check --deploy

Deployment Notes

For staging or production, ensure:

  • DJANGO_DEBUG=False
  • PostgreSQL is available
  • Redis is available
  • Celery worker and beat are running
  • Stripe webhook configuration matches SITE_URL
  • Email delivery is configured
  • Secret values are real and not placeholders

🤝 Open for Developers / المساهمة والتطوير

هذا المشروع يرحب بكل المطورين والمهتمين بالبرمجيات الحرة! إذا كنت ترغب في المساهمة بكود، تحسين الواجهة، أو الإبلاغ عن أخطاء، فالباب مفتوح لك بالكامل.

🌟 مجالات نرحب بالمساهمة فيها (Good First Issues & Roadmap):

  • 🌐 تعدد اللغات (i18n): استكمال تعريب وتدويل النصوص (عربي / إنجليزي / فرنسي).
  • 💳 بوابات الدفع (Payment Adapters): إضافة بوابات دفع محلية (مثل BaridiMob / Satim / CIB) أو تجريبية.
  • 📱 تحسينات تجربة المستخدم (UI/UX Polish): تحسين استجابة الصفحات على الهواتف والأجهزة اللوحية ورفع مستوى إمكانية الوصول (Accessibility).
  • 🧪 زيادة التغطية الاختبارية (Tests): كتابة المزيد من اختبارات الوحدة (Unit Tests) لتدفقات النزاع والمحادثات الحية.
  • ⚡ تحسين أداء WebSockets: تحسين قنوات الاتصال الحي (Django Channels) وحفظ الرسائل في Redis.
  • 🔒 تدقيق ومراجعة الأمان: المساعدة في فحص تدفقات الصرف والحجز وضمان سلامة المنطق المالي.

يرجى مراجعة دليل المساهمة CONTRIBUTING.md للبدء في خطوتك الأولى، ولا تتردد في فتح Issue جديدة لمناقشة أي فكرة قبل البدء بها!

Documentation

License

This project is distributed under the MIT License.

See LICENSE for full details.

About

DZHub (دزاير هب) — Trusted Algerian marketplace for digital services and products with escrow protection. Open source & under active development.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages