What is Vaniyk Empire API?
Vaniyk Empire API is a full-featured digital content marketplace platform that enables creators to sell premium content (videos, PDFs, and other digital assets) to users. Built with modern technologies, it provides secure authentication, seamless payments, and robust content management. The API handles everything from user registration and authentication to content purchases and access control, making it easy to build a complete digital marketplace experience.Key Features
Supabase Authentication
Secure JWT-based authentication powered by Supabase with support for email/password login, email verification, and password reset flows.
Stripe Payments
Integrated Stripe payment processing with webhook support for automatic purchase confirmation and access management.
Content Management
Upload and manage videos, PDFs, and other digital content with Cloudinary integration for optimized storage and delivery.
Access Control
Granular permissions system that ensures users can only access content they’ve purchased, with admin roles for content creators.
How It Works
The Vaniyk Empire API follows a simple workflow:User Registration
Users sign up with email and password. The system creates accounts in both Supabase (for authentication) and MongoDB (for application data).
Browse Content
Users can browse published content, view details, and filter by category, type, or price range without authentication.
Purchase Content
Authenticated users create payment intents through Stripe to purchase content. Payments are processed securely via Stripe’s hosted payment flow.
Technology Stack
The API is built with proven technologies that prioritize security, scalability, and developer experience.
- Runtime: Node.js with Express 5.2.1
- Authentication: Supabase Auth with JWT tokens
- Database: MongoDB with Mongoose ODM
- Payments: Stripe Payment Intents API
- File Storage: Cloudinary for media assets
- Session Management: Supabase session handling
API Architecture
The API is organized into several key modules:All authenticated endpoints require a valid JWT token in the
Authorization header with the Bearer scheme.Core Concepts
Dual Database Architecture
The API uses both Supabase and MongoDB:- Supabase: Handles authentication, session management, and JWT token generation
- MongoDB: Stores application data including user profiles, content metadata, purchases, and categories
Purchase-Based Access
Content files are protected and only accessible after purchase:- Public endpoints show content metadata (title, description, price) but not file URLs
- Users create payment intents to purchase specific content
- Stripe webhooks confirm successful payments
- Authenticated users can then access their purchased content via the
/api/content/:contentId/accessendpoint
Role-Based Permissions
The API supports two user roles:- User: Can browse, purchase, and access content
- Admin: Can create, update, delete content and manage all purchases
Getting Started
Quickstart Guide
Get up and running in 5 minutes with a complete example
Authentication
Learn how to authenticate users and secure API requests
API Reference
Explore all available endpoints and parameters
Webhooks
Set up Stripe webhooks for payment processing
Base URL
The API is hosted at:Rate Limiting
The API implements rate limiting to ensure fair usage:- Public endpoints: 100 requests per 15 minutes
- Authenticated endpoints: 1000 requests per 15 minutes
- Admin endpoints: 5000 requests per 15 minutes
Support
Need help? Here are your options:- Check the API Reference for endpoint documentation
- Contact support at support@vaniykempire.com