{"id":29176803,"url":"https://github.com/rustyneuron01/ordinal-marketplace","last_synced_at":"2025-07-01T17:32:44.556Z","repository":{"id":296059715,"uuid":"992196531","full_name":"rustyneuron01/Ordinal-Marketplace","owner":"rustyneuron01","description":"Ordinal Marketplace Backend on Bitcoin L1. Made by NestJS, PostgreSQL, Bitcoinjs-Lib, Prisma, Websocket. Users can list inscritpions and make offer, chatting use system","archived":false,"fork":false,"pushed_at":"2025-05-28T19:24:53.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-28T20:35:19.793Z","etag":null,"topics":["bitcoin","docker","email","inscription","lavinmq","marketplace","nestjs","ordinal","postgresql","prisma","psbt","redis","utxo","websocket"],"latest_commit_sha":null,"homepage":"https://internetjpeg.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustyneuron01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-28T19:12:23.000Z","updated_at":"2025-05-28T19:28:32.000Z","dependencies_parsed_at":"2025-05-28T20:39:11.868Z","dependency_job_id":"9190c497-a282-4c27-86ea-0765b2ff3b0a","html_url":"https://github.com/rustyneuron01/Ordinal-Marketplace","commit_stats":null,"previous_names":["rustyneuron01/ordinal-marketplace"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rustyneuron01/Ordinal-Marketplace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyneuron01%2FOrdinal-Marketplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyneuron01%2FOrdinal-Marketplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyneuron01%2FOrdinal-Marketplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyneuron01%2FOrdinal-Marketplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustyneuron01","download_url":"https://codeload.github.com/rustyneuron01/Ordinal-Marketplace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyneuron01%2FOrdinal-Marketplace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263007042,"owners_count":23398750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","docker","email","inscription","lavinmq","marketplace","nestjs","ordinal","postgresql","prisma","psbt","redis","utxo","websocket"],"created_at":"2025-07-01T17:30:43.429Z","updated_at":"2025-07-01T17:32:44.135Z","avatar_url":"https://github.com/rustyneuron01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ordinal Marketplace Backend\n\n## Description\n\nA robust backend system for an Ordinal NFT marketplace built with NestJS and PostgreSQL. This platform enables users to list Bitcoin Ordinal inscriptions, make offers, engage in discussions through comments, and participate in both global and direct messaging.\n\n## Key Features\n\n- **Inscription Management**\n  - List and manage Ordinal inscriptions\n  - Associate inscriptions with collections\n  - Track inscription ownership and transfers\n\n- **Trading System**\n  - Create and manage swap offers\n  - Support for buyer and seller interactions\n  - PSBT (Partially Signed Bitcoin Transaction) handling\n  - Secure transaction processing\n\n- **Collection Management**\n  - Create and manage collections\n  - Associate inscriptions with collections\n  - Collection metadata management (name, description, social links)\n\n- **Communication System**\n  - Global chat for community discussions\n  - Direct messaging between users\n  - Comment system for inscriptions\n  - Real-time messaging using WebSocket\n  - Message persistence in PostgreSQL\n  - Redis pub/sub for message distribution\n\n- **User System**\n  - Wallet integration (UniSat, Hiro, Xverse)\n  - User authentication via message signing\n  - Role-based access control (customer, admin)\n\n- **Performance Optimization**\n  - LavinMQ integration for message queuing\n  - Redis caching for high-performance data access\n  - Optimized for handling large request volumes\n\n## Technical Stack\n\n- **Framework**: NestJS\n- **Database**: PostgreSQL with TypeORM\n- **Caching**: Redis\n- **Message Queue**: LavinMQ\n- **Authentication**: Bitcoin wallet signature verification\n- **Bitcoin Integration**: BitcoinJS, BIP322\n\n## Project Structure\n\n```\nsrc/\n├── auth/                 # Authentication and authorization\n├── collection/           # Collection management\n├── inscription/          # Ordinal inscription handling\n├── psbt/                # Bitcoin transaction handling\n├── swap-offer/          # Trading system\n├── user/                # User management\n└── common/              # Shared utilities and types\n```\n\n## Database Schema\n\nKey entities include:\n- User\n- Collection\n- Inscription\n- SwapOffer\n- BuyerSwapInscription\n- SellerSwapInscription\n- SignMessage\n\n## Local Development\n\n### Prerequisites\n\n- Node.js \u003e= 18.12.1\n- Docker and Docker Compose\n- PostgreSQL\n- Redis\n- LavinMQ\n\n### Setup with Docker\n\n1. Install Docker and Docker Compose\n2. Clone the repository\n3. Run the development environment:\n\n```bash\n# Start the containers\ndocker-compose up -d\n\n# Install dependencies\nnpm install\n\n# Start the development server\nnpm run start:dev\n```\n\nAccess the API documentation at `http://localhost:3005/docs`\n\n### Database Connection\n\nConnect to the local Postgres Database:\n\n```bash\npsql -h db -U postgres postgres\n```\nPassword: `postgres`\n\n## Available Scripts\n\n```bash\n# Development\nnpm run start:dev\n\n# Production build\nnpm run build\nnpm run start:prod\n\n# Testing\nnpm run test\nnpm run test:e2e\n```\n\n## API Documentation\n\nThe API documentation is available through Swagger UI at `/docs` endpoint when running the server.\n\n## Performance Considerations\n\n- Uses Redis caching for frequently accessed data\n- LavinMQ for handling asynchronous tasks and large request volumes\n- Optimized database queries and indexing\n- Efficient PSBT handling for Bitcoin transactions\n\n## Security Features\n\n- Wallet-based authentication\n- Message signing verification\n- Role-based access control\n- Secure PSBT handling\n- Environment-based configuration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyneuron01%2Fordinal-marketplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustyneuron01%2Fordinal-marketplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyneuron01%2Fordinal-marketplace/lists"}