Capital is a secure, scalable, and modern event ticketing platform, developed as part of a final-year BE project. It addresses critical challenges in traditional ticketing systems, including:
- Ticket Fraud
- Duplicate Entries
- Unauthorized Reselling
Capital achieves this through a hybrid architecture that combines centralized orchestration with decentralized cryptographic primitives, eliminating inefficiencies in legacy QR-only systems and blockchain-heavy platforms.
- In legacy platforms like EventOrchestr8, tickets were just QR payloads → easily forwarded/resold.
- Capital issues cryptographically signed tickets bound to a user’s account (via Ed25519).
- Even if the QR is forwarded, validation fails unless presented by the legitimate account owner.
- Result: Unauthorized resale eliminated.
- EventOrchestr8 stored tickets on Ethereum → high gas fees & slow validation.
- Capital uses a centralized backend as the authoritative record, while still leveraging cryptographic signing for trust.
- Blockchain is optional (for audit logs), not mandatory.
- Result: No gas fees, faster validation.
- Blockchain-based ticketing makes refunds/cancellations difficult.
- In Capital, the backend updates ticket states instantly (refunded, canceled, redeemed).
- Organizers handle real-world contingencies in real-time.
- Result: Flexible and practical refund management.
- EventOrchestr8 relied heavily on Firebase → external dependency risks.
- Capital uses a custom backend in TypeScript with internal wallets and webhooks.
- Result: Improved control, better data integrity, minimal third-party reliance.
- Capital leverages Ed25519 cryptographic verification (microsecond-level).
- Validation is near-instant, scalable for stadium-scale events.
- Tickets are atomically locked post-redemption → one-time use guaranteed.
- Result: High-throughput, real-time validation.
| Backend | Frontend | DevOps / Tooling |
|---|---|---|
| Node.js | Next.js | TypeScript |
| Express.js | React.js | GitHub Actions (CI/CD) |
| Prisma | React Router DOM | Biome (lint/format) |
| PostgreSQL | React Query | Vitest (testing) |
| Redis / Redis Queue | Zustand | Resend (emails) |
| WebSocket | Tailwind CSS | Prometheus |
| Libsodium (encryption) | Shadcn/UI | Grafana & Loki |
| Decimal.js | Storybook | GitOps (infra) |
| Supabase (storage) | Scaling + Stress Testing | |
| Docker, Nginx, Kubernetes |
The platform integrates centralized orchestration with decentralized cryptographic primitives.
- Centralized Backend – Authoritative source of truth (PostgreSQL + Redis).
- Decentralized Cryptography – Ed25519 ensures ticket authenticity.
- Three-Queue Mechanism – Pending, In-progress, Failed (Dead-letter).
- Redis – Caching, concurrency control, pub/sub for validators.
- Validators – Mobile/kiosk apps verifying tickets in real-time.
- Discovery → Users browse events (cached with Redis).
- Purchase → System issues signed ticket payload embedded in a QR code.
- Storage → Tickets securely stored in user’s account wallet.
- Redemption → Validator scans QR → backend verifies signature & ownership.
- Refunds/Cancellations → Organizer updates backend state instantly.
- Bcrypt – Secure password hashing (salt + cost factor).
- Ed25519 – Digital signatures for ticket authenticity.
- Four-Layer Encryption – Canonical serialization + timestamping for replay prevention.
- JWT + Redis-backed Refresh Tokens – Device-specific, short-lived, tamper-resistant sessions.
- TLS Everywhere – Encrypted communication between clients, validators, and backend.
- Immutable Audit Logs – Forensics & fraud prevention.
- Rate-Limiting & Anomaly Detection – Protection against DoS/fraud attacks.
- Hardware-backed Vaults – Secure key management.
- Node.js clustering → Utilizes multi-core CPU for parallel validation.
- Kubernetes auto-scaling → Handles fluctuating workloads.
- Redis replication → Ensures distributed state consistency.
- Microsecond Ed25519 signature checks → Thousands of ticket validations/sec.
- Cloud-native deployment → Elastic, fault-tolerant, globally scalable.
- Liquidity Pooling – Event earnings are pooled securely, enabling transparent settlements for organizers post-event.
- Organizer’s Role & Earnings – Each organizer has a dedicated wallet. Earnings are credited after event completion (post-refunds).
- Refund Mechanism – Flexible, organizer-approved refunds update wallet balances and ticket states in real time.
- Scaling – Supports both vertical (Node.js clustering) and horizontal (Kubernetes) scaling to handle high-demand events.
- Custom Transaction System – Inspired by Razorpay, Capital implements an in-house wallet and payment processing layer with deposits, withdrawals, payouts, and webhook-driven reconciliation.
We welcome contributions! Please fork the repository and submit a pull request with your improvements. Ensure reading Contributor.md
git clone https://github.com/your-username/capital.git
cd capitalnpm installCreate a .env file:
DATABASE_URL=postgresql://user:password@localhost:5432/capital
REDIS_URL=redis://localhost:6379
SUPABASE_URL=...
SUPABASE_KEY=...
RESEND_API_KEY=...docker-compose up --buildnpm run devThis project is licensed under the MIT License.
