PayVidi - Secure File Sharing Platform for Creators
Describes a full-stack platform where creators share files, collect feedback, and process payments before final delivery.
What this file does
Describes a full-stack platform where creators share files, collect feedback, and process payments before final delivery.
When to use it
- Building a secure file sharing app with payment gating
- Designing a client preview and approval workflow for freelancers
- Implementing role-based access for creators, clients, and admins
- Planning a Stripe-integrated commission model for digital deliveries
Assumes this stack
PayVidi - Secure File Sharing Platform for Creators
Overview
PayVidi is a full-stack web application that enables creators (freelancers) to securely share their work with clients, collect feedback, and process payments before delivering final files. The platform features client preview sharing, comment systems, and integrated payment processing.
System Architecture
Frontend Architecture
- Framework: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- Routing: Wouter for lightweight client-side routing
- State Management: TanStack Query (React Query) for server state management
- UI Framework: Shadcn/ui components built on Radix UI primitives
- Styling: Tailwind CSS with CSS custom properties for theming
- Payment Integration: Stripe React components for secure payment processing
Backend Architecture
- Runtime: Node.js with Express.js server
- Language: TypeScript with ES modules
- Database: PostgreSQL with Drizzle ORM
- Authentication: Express sessions with bcrypt password hashing
- File Storage: Local file system with multer for uploads
- Payment Processing: Stripe API integration
- Email Service: Nodemailer for transactional emails
Database Schema
- Users: Freelancers, clients, and admins with role-based access
- Projects: Work items with status tracking and client association
- Comments: Timeline and position-based feedback system
- Payments: Stripe payment tracking with commission calculation
- Downloads: Secure file access with expiration and usage limits
Key Components
Authentication & Authorization
- Session-based authentication with role-based access control
- Three user roles: admin, freelancer, client
- Protected routes and API endpoints based on user permissions
Project Management
- Project lifecycle: draft → preview_shared → approved → paid → completed
- File upload system supporting multiple media types (video, audio, images, documents)
- Preview URL generation for client access
Payment Processing
- Stripe integration for secure payment handling
- Commission-based revenue model
- Automatic file access generation post-payment
- Email notifications with download links
File Management
- Secure file uploads with type validation and size limits
- Preview file generation for client review
- Final file delivery after payment confirmation
- Time-limited download tokens with usage tracking
Data Flow
- Project Creation: Freelancer creates project with client details and pricing
- File Upload: Freelancer uploads preview and final files
- Client Preview: Client accesses preview via secure URL with email verification
- Feedback Loop: Client can comment on timeline or specific positions in media
- Approval: Client approves project, triggering payment flow
- Payment: Stripe processes payment with commission calculation
- File Delivery: Download links sent via email with expiration and usage limits
External Dependencies
Core Dependencies
- Database: Neon Database (PostgreSQL serverless)
- Payment Processing: Stripe for payment intents and webhooks
- Email Service: SMTP provider (Gmail/SendGrid) via Nodemailer
- File Storage: Local filesystem (can be extended to cloud storage)
Development Tools
- Drizzle Kit: Database migrations and schema management
- ESBuild: Production build bundling
- TSX: TypeScript execution for development
Deployment Strategy
Production Build
- Frontend: Vite builds optimized static assets to
dist/public - Backend: ESBuild bundles server code to
dist/index.js - Database: Drizzle migrations applied via
db:pushcommand
Environment Configuration
- Development:
npm run dev- TSX server with Vite dev middleware - Production:
npm run start- Node.js serving bundled application - Database: PostgreSQL connection via
DATABASE_URLenvironment variable - Stripe: API keys configured via environment variables
Hosting Requirements
- Node.js 20+ runtime environment
- PostgreSQL database instance
- SMTP service for email delivery
- SSL certificate for secure payment processing
Changelog
Changelog:
- June 17, 2025. Initial setup
User Preferences
Preferred communication style: Simple, everyday language.
What's inside
6 architecture sections, 5 key component groups, 1 data flow diagram, 1 changelog entry
Change this for your project
- Replace
jost305/payhubprojectwith your own repository name - Replace
Neon Databasewith your PostgreSQL provider - Replace
Gmail/SendGridwith your SMTP provider - Replace
June 17, 2025. Initial setupwith your own changelog entries
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Project lifecycle states (draft → preview_shared → approved → paid → completed) enforce a clear business flow
- Time-limited download tokens with usage tracking prevent unauthorized file access after delivery
- Position-based comments on media allow precise client feedback without external tools
Related Documents
GOOBY - Closing Store Marketplace
Defines a full-stack marketplace app for discovering closing retail stores in NY/NJ/CT/PA, with automated closure scanning and admin review.
Lua Code Obfuscator/Deobfuscator
Provides a full-stack web app for obfuscating and deobfuscating Roblox Lua scripts with a Monaco editor and PostgreSQL storage.
GREEN NODE - Project Overview
Describes a full-stack recycling platform with three runtime modes, provider architecture, and development scripts for Cochabamba, Bolivia.
ADN Systems DMR Peer Server
Documents a forked FreeDMR server for amateur radio DMR voice/data routing with bridges, proxies, scheduled voice announcements, and centralized security.