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
|
|
|
| 1 |
+
🚀 Upniso Backend (v2.0)
|
| 2 |
+
Merit-First Creator Ecosystem & AI Feed Engine
|
| 3 |
+
|
| 4 |
+
Upniso Backend is a production-ready, high-performance backend powering a merit-based creator discovery system and a brand–creator marketplace.
|
| 5 |
+
It is designed to prioritize quality, consistency, and fairness over vanity metrics.
|
| 6 |
+
|
| 7 |
+
This repository represents the core intelligence and infrastructure layer behind Upniso.
|
| 8 |
+
|
| 9 |
+
🏗️ System Architecture
|
| 10 |
+
|
| 11 |
+
The platform is intentionally split into two isolated execution environments for scalability, trust, and abuse prevention.
|
| 12 |
+
|
| 13 |
+
1️⃣ Core Feed Engine (Protected)
|
| 14 |
+
|
| 15 |
+
Powered by a proprietary Merit Algorithm (281 lines)
|
| 16 |
+
|
| 17 |
+
Enforces strict quality controls
|
| 18 |
+
|
| 19 |
+
Includes:
|
| 20 |
+
|
| 21 |
+
Spam protection
|
| 22 |
+
|
| 23 |
+
Rolling 24-hour upload limits
|
| 24 |
+
|
| 25 |
+
Merit-based ranking (not engagement bait)
|
| 26 |
+
|
| 27 |
+
2️⃣ Community & Brand Hub (Unlimited)
|
| 28 |
+
|
| 29 |
+
Open interaction layer for:
|
| 30 |
+
|
| 31 |
+
Brands
|
| 32 |
+
|
| 33 |
+
Agencies
|
| 34 |
+
|
| 35 |
+
Creators
|
| 36 |
+
|
| 37 |
+
Supports:
|
| 38 |
+
|
| 39 |
+
Brand briefs
|
| 40 |
+
|
| 41 |
+
Reviews & feedback
|
| 42 |
+
|
| 43 |
+
Collaboration without feed penalties
|
| 44 |
+
|
| 45 |
+
This separation ensures the main feed remains signal-rich, while collaboration remains frictionless.
|
| 46 |
+
|
| 47 |
+
🧠 Core Capabilities
|
| 48 |
+
|
| 49 |
+
Merit-First Discovery
|
| 50 |
+
|
| 51 |
+
Talent Score
|
| 52 |
+
|
| 53 |
+
Progress Score
|
| 54 |
+
|
| 55 |
+
Consistency-weighted ranking
|
| 56 |
+
|
| 57 |
+
Multi-Format Content Support
|
| 58 |
+
|
| 59 |
+
Short-form video (Reels)
|
| 60 |
+
|
| 61 |
+
Long-form video
|
| 62 |
+
|
| 63 |
+
Text posts (X-style)
|
| 64 |
+
|
| 65 |
+
Artwork & images
|
| 66 |
+
|
| 67 |
+
Full-length music tracks
|
| 68 |
+
|
| 69 |
+
Spam & Abuse Shield
|
| 70 |
+
|
| 71 |
+
Rolling 24-hour upload quotas (e.g. 5 Reels/day)
|
| 72 |
+
|
| 73 |
+
Automatic quality preservation
|
| 74 |
+
|
| 75 |
+
Brand Connect Layer
|
| 76 |
+
|
| 77 |
+
Fixed $2 brand brief fee
|
| 78 |
+
|
| 79 |
+
Built-in review & feedback loop
|
| 80 |
+
|
| 81 |
+
Transparent creator selection
|
| 82 |
+
|
| 83 |
+
AI-Ready Infrastructure
|
| 84 |
+
|
| 85 |
+
Semantic scoring & matching
|
| 86 |
+
|
| 87 |
+
ML models loaded at build time (zero cold start)
|
| 88 |
+
|
| 89 |
+
CPU-optimized for predictable cost
|
| 90 |
+
|
| 91 |
+
🛠️ Tech Stack
|
| 92 |
+
|
| 93 |
+
Language: Python 3.11
|
| 94 |
+
|
| 95 |
+
Framework: FastAPI
|
| 96 |
+
|
| 97 |
+
Database: Firebase Firestore
|
| 98 |
+
|
| 99 |
+
AI Engine: Cross-Encoder (MS-Marco MiniLM)
|
| 100 |
+
|
| 101 |
+
Deployment: Docker
|
| 102 |
+
|
| 103 |
+
Target Platforms: Hugging Face Spaces, Oracle Cloud
|
| 104 |
+
|
| 105 |
+
🔐 Architecture Notes
|
| 106 |
+
|
| 107 |
+
Firebase is used internally as a control plane for:
|
| 108 |
+
|
| 109 |
+
Metadata
|
| 110 |
+
|
| 111 |
+
Usage limits
|
| 112 |
+
|
| 113 |
+
Platform logic
|
| 114 |
+
|
| 115 |
+
Clients never interact with Firebase directly.
|
| 116 |
+
|
| 117 |
+
Designed for API monetization, rate limiting, and future multi-tenant usage.
|
| 118 |
+
|
| 119 |
+
🚀 Quick Start (Docker)
|
| 120 |
+
|
| 121 |
+
Ensure the following environment variable is set:
|
| 122 |
+
|
| 123 |
+
FIREBASE_KEY_B64=<base64-encoded-firebase-key>
|
| 124 |
+
|
| 125 |
+
Build the image
|
| 126 |
+
docker build -t upniso-backend .
|
| 127 |
+
|
| 128 |
+
Run the container
|
| 129 |
+
docker run -p 7860:7860 upniso-backend
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
The API will be available at:
|
| 133 |
+
|
| 134 |
+
http://localhost:7860
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
Swagger docs:
|
| 138 |
+
|
| 139 |
+
http://localhost:7860/docs
|
| 140 |
+
|
| 141 |
+
📜 License
|
| 142 |
+
|
| 143 |
+
This project is licensed under the Apache License 2.0.
|
| 144 |
+
|
| 145 |
+
Commercial usage is provided via hosted API access and managed deployments.
|
| 146 |
+
|
| 147 |
+
🧭 Project Status
|
| 148 |
+
|
| 149 |
+
Backend: Production-ready
|
| 150 |
+
|
| 151 |
+
API monetization: In progress
|
| 152 |
+
|
| 153 |
+
Frontend: Intentionally minimal / decoupled
|