Skip to content

Latest commit

 

History

History
185 lines (148 loc) · 7.79 KB

File metadata and controls

185 lines (148 loc) · 7.79 KB

OFFER-HUB Documentation

Welcome to the OFFER-HUB documentation. This comprehensive guide covers all aspects of the project, from the Orchestrator API to the frontend architecture.

Documentation Overview

OFFER-HUB documentation is organized in two locations:

Location Purpose Format
/docs/ Internal developer documentation Markdown
/content/docs/ Public web documentation MDX (rendered at offer-hub.tech)

Quick Start

  1. New to the project? Start with Project Context
  2. Setting up development? Check Developer Guide
  3. Contributing? Read Contributing Guide
  4. AI Assistant? Read AI Context first

Core Documentation

Getting Started

Architecture

Guides (Internal)

Design System

Standards

Backend

Frontend

Brand

Business

Web Documentation (MDX)

The public-facing documentation is available in /content/docs/ and rendered at offer-hub.tech/docs.

Getting Started

Guides

API Reference

SDK

Tech Stack

Orchestrator (Backend)

Technology Version Purpose
NestJS 10.x Backend framework
Prisma 5.x Database ORM
PostgreSQL 15+ Primary database
Redis 7+ Caching, queues, rate limiting
BullMQ 5.x Background job processing
Stellar SDK 12.x Blockchain integration

Monorepo (Frontend)

Technology Version Purpose
Next.js 15+ React framework
React 19+ UI library
Tailwind CSS 3.4+ Styling
Radix UI Latest Accessible components
Framer Motion 11.x Animations

Key Concepts

Payment Flow

User deposits USDC → Creates order → Funds reserved
                                        ↓
                                   Escrow funded (on-chain)
                                        ↓
                                   Work delivered
                                        ↓
                               Release or Dispute
                                        ↓
                                   Funds transferred

Balance Model

  • Available: Can be used for orders or withdrawn
  • Reserved: Locked for pending orders (before escrow funding)

Authentication

  • API Keys: Format ohk_live_xxx or ohk_test_xxx
  • Scopes: read, write, support
  • NOT JWT: API keys are stateless, no refresh tokens

ID Prefixes

Entity Prefix Example
User usr_ usr_abc123
Order ord_ ord_xyz789
Withdrawal wth_ wth_def456
API Key key_ key_ghi012
Dispute dsp_ dsp_jkl345

For AI Assistants

If you're an AI assistant working on this project:

  1. Read AI Context first - contains critical project information
  2. Understand the dual-repo structure - Orchestrator (backend) + Monorepo (frontend)
  3. API uses API Keys, NOT JWT - Important for authentication code
  4. Neumorphic design system - Follow the visual DNA guidelines
  5. State machines are strict - Orders/escrow follow specific state transitions

Contributing

When updating documentation:

  • Keep language clear and technical
  • Use code examples where applicable
  • Update this index when adding new documents
  • Maintain consistent formatting
  • All documentation must be in English
  • Web docs (MDX) must include frontmatter with title, description, order, section

External Resources