Back to marketplace

CipherPrompt Documentation & Developer Portal

Welcome to the technical hub of the CipherPrompt Monorepo. Here you can explore the prompt architecture, secure wallet integration guidelines, cryptography models, and API frameworks.


Technical Overview

CipherPrompt is designed to handle encrypted prompt exchanges while preserving copyright provenance on-chain. The monorepo uses a Gin-based Go backend, a document-store MongoDB configuration, and a Next.js front-end optimized for low-latency Web3 capabilities.


<a id="wallet-auth"></a>

Gasless Wallet Authentication

CipherPrompt leverages gas-free cryptographic signing to verify identity.

  1. Nonce Generation: The front-end requests a unique, time-bound nonce from the gateway backend.
  2. Personal Signature: The user signs a structured signature message inside their Web3 provider (e.g. MetaMask, WalletConnect).
  3. Identity Verification: The backend validates the signature, guarantees the nonce hasn't expired or been reused, and issues a standard JWT token containing the public wallet hash credentials.

This proves wallet control without moving assets, incurring gas fees, or generating transactions.


<a id="security-audit"></a>

Cryptography & AES-256-GCM Model

All purchased prompt text bodies are encrypted before storing inside the database.

  • Encryption Algorithm: AES-256-GCM (Galois/Counter Mode) with an application-specific cryptographic Master Key.
  • Redaction Engine: Public listing, search, and detail interfaces return only a redacted, length-limited snippet of the prompt with inputs parsed out.
  • IP Decryption: Buyers who hold a verified, on-chain usage license trigger a temporary decryption step in memory. The decrypted prompt is passed back as a secure payload and rendered exclusively for the active owner.

<a id="developer-guide"></a>

Developer Quickstart

To run the full stack locally for testing and development:

# 1. Start Docker compose for MongoDB and active gateway services
docker compose up --build

# 2. Start Go Gateway backend
cd backend/api-gateway
cp .env.example .env
go run main.go

# 3. Start Next.js development server
cd frontend
npm install
npm run dev

The public gateway runs at https://api.cipherprompts.com, serves liveness at https://api.cipherprompts.com/healthz, readiness at https://api.cipherprompts.com/readyz, and MCP at https://api.cipherprompts.com/mcp.


<a id="api-reference"></a>

Core API Endpoints

The API Gateway exposes these primary endpoints for integration:

| Action | Path | Method | Auth | | :--- | :--- | :--- | :--- | | Get Nonce | /api/auth/nonce | GET | Public | | Verify Sig | /api/auth/verify | POST | Public | | List Prompts | /api/prompts | GET | Public | | Register Prompt | /api/prompts | POST | JWT | | Check Originality | /api/prompts/similarity/check | POST | JWT | | Purchase License | /api/prompts/:id/purchases | POST | JWT | | Decrypted Text | /api/prompts/:id/unlock | GET | JWT |