BACKEND - AI Video/Image SaaS Platform
ABOUT THE PROJECT
We are developing an AI SaaS platform for content generation. Architecturally, the project is a "Wrapper" orchestrator that connects the user interface with the GPU cluster (RunPod Serverless). We do not have the task of writing the infrastructure from scratch. We use ready-made templates.
Stack: Frontend on Next.js 14 + SupaStarter, Backend/DB on Supabase (PostgreSQL), Storage Cloudflare R2.
We do not need a Fullstack developer who will "fix a button." We need an architect who will build a reliable Backend, design the queue system, and ensure data consistency during asynchronous generation.
Deadline: 8-10 weeks
The system works as follows:
User sends a request for generation (text, parameters, model).
Backend receives the request, checks the balance, and queues the task.
Asynchronous worker takes the task from the queue and sends it to RunPod.
RunPod generates a video of 2-3 minutes and sends the result back.
Backend saves the video in cloud storage (R2), updates the status and balance.
Frontend sees that the video is ready and shows it to the user.
All of this must work reliably: if something fails, the system will recover, money will not be lost, and videos will not be lost.
WHAT NEEDS TO BE DONE
1. Design the Architecture
Draw how everything moves: from the front request to the finished video.
Determine where the data is stored and how it is updated.
Consider what will happen if RunPod fails, a payment is lost, or a webhook arrives twice.
2. Design the Database
Table
users(credit balance).Table
video_generations(all video orders and their statuses).Table
balance_ledger(journal of all payments and expenses — for auditing).Table
payment_transactions(all credit purchases).Constraints and indexes to ensure the system does not break during errors.
3. Define all API Endpoints
Endpoints for video generation (request and status check).
Endpoints for managing balance and payments.
Endpoints for order history.
Endpoints for webhooks (notifications from RunPod and the payment system).
4. Write FastAPI Backend
API for the frontend (accepting requests, validation, returning results).
Handlers for webhooks (when RunPod says "video is ready," when the payment system says "money has arrived").
Logic for checking balance, reserving credits, and deducting after success.
5. Set Up Queue (Redis/BullMQ)
When a user starts generation, the task goes into the queue.
Background worker takes tasks from the queue and sends them to RunPod.
The queue distributes the load to avoid overloading RunPod.
6. Write Background Worker
The worker listens to the queue.
Takes a task, sends it to RunPod with a callback URL.
Waits for the result via webhook.
7. Set Up Docker
Production Docker image with ComfyUI, all models, and Python code.
Optimize for the container to start quickly on RunPod.
Use Network Volume so that heavy models do not take up space in the image.
8. Integration with RunPod
Set up how the backend sends tasks to RunPod.
Set the callback URL so that RunPod can send the result back.
Handle errors (if RunPod fails, the task hangs, the result is lost).
9. Integration with Cloudflare R2
When the video is ready, save it to R2.
Return the user a link to the video.
10. Integration with Payment System
Connect Stripe / Crypto gateway / both.
Receive webhooks on successful payment.
Update the user's balance.
11. Handling Edge Cases & Failures
If RunPod fails in the middle of generation — refund the user.
If the payment arrives twice (duplicate webhooks) — credit only once.
If the user sends 10 requests simultaneously and wants to spend 50 credits, but has 30 — do not allow them to spend more.
If the webhook is lost on the internet — periodically check the payment status.
12. Monitoring & Logging
Log all events (requests, generation, payments, errors).
Have the ability to trace what happened with each video and each payment.
You are creating a complete, reliable system where all parts (generation, billing, asynchronicity, error handling) work together.
There is no need to write from scratch. It is necessary to design correctly and then implement.
-
410 11 0 Good day!
I have done the same thing, only within the framework of a video streaming service.
Backend in Python, queue in Redis, payment service Stripe.
No problem, write to me privately, we will discuss the plan further.
-
321 1 Hello.
Your project concerns creating a reliable orchestration layer between the user interface, payments, and data generation using a graphics processor, and this is what I focus on as an architect, not as a button fixer. I would start by developing a clear asynchronous flow with reliable guarantees: idempotent webhooks, balance reservation through a ledger, reusable queues, and recoverable workers, so that no video or credit is lost. From there, I would first define the database constraints, API contracts, and queue semantics, and then I would implement a FastAPI backend and Redis-based workers that behave predictably even in the event of RunPod failures, payment issues, or network calls. The goal is simple: every generation and every credit is traceable, consistent, and secure, even under load or partial failures.
-
1455 8 0 Good day, I have experience working with Python as well as Telegram bots, I can complete everything quickly and efficiently, write to me and we will discuss the details.
-
2161 4 2 👋 Welcome!
We are Spectrium LLP — a team from the United Kingdom specializing in the development of reliable SaaS platforms and complex asynchronous systems for AI and fintech projects.
⸻
✅ Ready to design and implement a full-fledged AI SaaS platform for content generation with asynchronous processing and integration with a GPU cluster.
What the work will include:
… 🧱 1. System Architecture
• Documenting the flows from user request to finished video
• Planning data storage and updates
• Handling RunPod failures, webhook duplication, payment reservations
💾 2. Database
• Tables users, video_generations, balance_ledger, payment_transactions
• Constraints and indexes for consistency in case of errors
🔗 3. API Endpoints
• Video generation (creation and status checking)
• Balance and payment management
• Order history
• Webhooks from RunPod and payment system
⚡ 4. Backend on FastAPI
• Receiving requests from the frontend and validation
• Processing webhooks (finished video, successful payment)
• Logic for reserving and deducting credits
🚀 5. Task Queue (Redis/BullMQ)
• Asynchronous processing of video generations
• Load distribution on RunPod
🤖 6. Background Worker
• Sending tasks to RunPod and processing callback URL
• Stable task completion with result verification
🐳 7. Docker and Optimization
• Production Docker image with ComfyUI and Python code
• Using Network Volume for heavy models
• Quick start of containers on RunPod
☁️ 8. Integrations
• RunPod: task and error processing
• Cloudflare R2: storage of finished videos
• Payment system (Stripe / crypto-gateway)
🛠 9. Edge Case Handling
• Credit returns in case of RunPod failure
• Avoiding payment duplication
• User expense control based on balance
• Reliable handling of lost webhooks
📊 10. Monitoring and Logging
• Logs of all events, generations, payments, and errors
• Tracking the status of each video and payment
⸻
🧠 We work with a clear technical specification and guarantee the construction of a reliable system where all components (generation, billing, asynchronous processing, error handling) work together without data loss.
⸻
💼 Ready to start the project and provide an architectural solution along with implementation.
🙌 Examples of our work:
👉Google Drive
-
"Не нужно писать с нуля. Нужно спроектировать правильно, а потом реализовать." 😁
Ох уж эти ТЗ сгенерированные в нейронке.. Ради интереса закинул это тз в нейронку и попросил ее подсказать какой бюджет на разработку тут должен быть. Она посчитала 32000 евро в среднем.
Интересно знать какой бюджет у клиента -
Current freelance projects in the category Databases & SQL
Accounting, planning, and sales system for a mushroom farm
600 USD
Here is the complete, final text of the Technical Assignment (TA). It combines all your requirements: 16 chambers, 20 contractors, a schedule by days, accounting for containers, profitability calculation, and a mandatory division into three grades of mushrooms. You can fully… Databases & SQL, Client Management & CRM ∙ 1 day 6 hours back ∙ 51 proposals |
External report 1C 8.3 — forecast of goods balances
22 USD
An external report (.erf) is needed for 1C:Enterprise 8.3 (configuration to be specified). What it should do: Extract product balances from the database Analyze sales history for the last 30 days Calculate the average sales rate for each product Determine how many days until the… Databases & SQL, Client Management & CRM ∙ 1 day 6 hours back ∙ 11 proposals |
Web Application & Database Security Audit for Custom CRM — BaaS / Database-as-API Specialist (PenetrProject Overview We operate a custom-built customer relationship management (CRM) platform that runs two service businesses on a single system. It is a modern JavaScript web application backed by a backend-as-a-service (BaaS) database and deployed on a serverless hosting… Databases & SQL, Testing & QA ∙ 1 day 19 hours back ∙ 9 proposals |
Database synchronizationSynchronization of Microsoft Access programs and CRM SalesDrive. Data transfer from CRM to Microsoft Access in the first stage (changing the funnel status). Data transfer from Microsoft Access to CRM in the second stage (changing the status in the program). Databases & SQL ∙ 2 days 1 hour back ∙ 11 proposals |
Setting up a backup system and optimizing server infrastructureObjective of the work: Ensure reliable data storage for the CRM system and application by implementing an automated backup system, as well as carry out a series of server improvements to enhance the stability, security, and performance of the infrastructure. DevOps, Databases & SQL ∙ 2 days 23 hours back ∙ 24 proposals |