Skip to content

[API] Creator Payout History#96

Closed
Skinny001 wants to merge 7 commits intoSubStream-Protocol:mainfrom
Skinny001:feature/api-creator-payout-history
Closed

[API] Creator Payout History#96
Skinny001 wants to merge 7 commits intoSubStream-Protocol:mainfrom
Skinny001:feature/api-creator-payout-history

Conversation

@Skinny001
Copy link
Copy Markdown
Contributor

This pull request introduces several key improvements to the backend API, focusing on subscription and payout functionality, as well as database enhancements. The main updates include adding new API endpoints for subscription events and payouts, switching to the better-sqlite3 library for improved SQLite support, and expanding the database schema to better support subscriber tracking.

API Enhancements:

  • Added a /api/subscription/events endpoint to receive subscription events, with optional shared secret validation for security. The endpoint uses a new SubscriptionService for event handling. [1] [2]
  • Introduced a /api/payouts endpoint to fetch creator payouts, utilizing the database for data retrieval. [1] [2]
  • Added a /api/creator/:id/stats endpoint to retrieve creator statistics, including a cached subscriber count.

Database and Dependency Updates:

  • Replaced the node:sqlite library with better-sqlite3 for database operations, improving performance and reliability. [1] [2]
  • Refactored and streamlined SQL queries throughout appDatabase.js for clarity and efficiency. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Schema and Data Model Improvements:

  • Added a subscriptions table to the database schema for tracking active and inactive subscriptions, including timestamps and wallet addresses.
  • Implemented logic to ensure the creators table includes a subscriber_count column, supporting efficient subscriber count retrieval and caching.

Other Cleanups:

  • Removed redundant or duplicate middleware and route registrations from index.js for a cleaner server startup.
  • Ensured proper initialization and exposure of new services and dependencies within the Express app. [1] [2]

These changes lay the groundwork for more robust subscription tracking and payout management, while also modernizing the database layer for future scalability.

close #4

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@Skinny001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@elizabetheonoja-art
Copy link
Copy Markdown
Member

resolve conflicts

Skinny001 and others added 4 commits March 25, 2026 13:42
- Add VideoTranscodingService with FFmpeg-based HLS transcoding
- Support multiple resolutions (360p, 720p, 1080p) for adaptive streaming
- Implement VideoProcessingWorker with Redis-based job queue
- Create video upload and streaming API endpoints
- Add IPFS and S3 storage integration for transcoded segments
- Build adaptive bitrate streaming logic for connection-based quality selection
- Update database schema for video metadata and transcoding results
- Fix CI/CD pipeline with Node.js 20.11.0+ and FFmpeg support
- Add comprehensive API documentation and test suite
- Integrate with existing pay-per-second subscription system

Resolves: Users on different internet speeds need smooth viewing experience
@Skinny001
Copy link
Copy Markdown
Contributor Author

No conflicts with base branch

Changes can be cleanly merged.

@elizabetheonoja-art done

@Skinny001
Copy link
Copy Markdown
Contributor Author

resolve conflicts

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#4 Issue: [API] Creator Payout History

3 participants