| Cloudflare Product | Free Tier Limits | RUH AERIOS Usage | Verdict |
|---|---|---|---|
| CF Pages (Hosting) | 500 builds/mo · Unlimited bandwidth | Platform frontend, landing pages | ✓ Perfect |
| CF Workers (Compute) | 100,000 req/day · 10ms CPU/req | API routes, credit logic, webhooks | ✓ Excellent |
| CF D1 (SQLite DB) | 5GB storage · 5M reads/day free | Credit ledger, user aliases, projects | ✓ Sufficient to 100k users |
| CF R2 (Object Store) | 10GB/mo · Zero egress fees | Course videos, project files, docs | ✓ Zero egress = massive saving |
| CF DNS | Unlimited · DDoS protected | ruhaeriostech.com routing | ✓ Free forever |
| CF SSL/TLS | Free HTTPS for all domains | All endpoints secured | ✓ Enterprise SSL free |
| CF WAF (Basic) | Free managed ruleset | OWASP top 10 protection | ✓ Good enough at launch |
| CF Email Routing | Unlimited email addresses | hello@, support@, noreply@ | ✓ Perfect |
| CF Tunnel | Free forever | Secure origin, zero-trust access | ✓ Enterprise security free |
| CF Images | Paid ($5/mo for 100k) | Profile avatars, course thumbnails | Use R2 + transform instead |
| CF Stream (Video) | Paid ($5/mo per 1k min) | Course video hosting | Use R2 + direct play at launch |
// Cloudflare Worker: Credit Transfer Handler // Deploy free at: workers.dev export default { async fetch(request, env) { const { action, from, to, amount, projectId } = await request.json(); // All operations are atomic via D1 transactions const db = env.DB; // Cloudflare D1 binding if (action === 'transfer') { await db.batch([ // Debit sender db.prepare(`UPDATE credit_ledger SET balance = balance - ? WHERE alias_id = ? AND balance >= ?`) .bind(amount, from, amount), // Credit receiver (90% of amount) db.prepare(`UPDATE credit_ledger SET balance = balance + ? WHERE alias_id = ?`) .bind(amount * 0.9, to), // Platform fee (10%) goes to RUH AERIOS treasury db.prepare(`UPDATE credit_ledger SET balance = balance + ? WHERE alias_id = 'RUHAERIOSLLC'`) .bind(amount * 0.1), // Log transaction db.prepare(`INSERT INTO transactions (from_alias, to_alias, amount, fee, project_id, ts) VALUES (?, ?, ?, ?, ?, datetime('now'))`) .bind(from, to, amount, amount * 0.1, projectId) ]); return Response.json({ success: true }); } } }
# wrangler.toml — Cloudflare configuration name = "ruh-aerios" compatibility_date = "2024-01-01" pages_build_output_dir = ".next" [[d1_databases]] binding = "DB" database_name = "ruh-aerios-prod" database_id = "your-d1-id-here" [[r2_buckets]] binding = "STORAGE" bucket_name = "ruh-aerios-files" [vars] PLATFORM_ALIAS = "RUHAERIOSLLC" PROJECT_FEE_PCT = "0.10" TRAINING_FEE_PCT = "0.15"
// lib/alterEgo.ts — Alter Ego generation and management export function generateNexaId(): string { // Format: NX-XXXX where X is alphanumeric const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789'; const code = Array.from( { length: 4 }, () => chars[Math.floor(Math.random() * chars.length)] ).join(''); return `NX-${code}`; } export async function createAlterEgo( supabase: SupabaseClient, userId: string, role: 'talent' | 'client' | 'trainer', skills: string[] ) { const alias_id = generateNexaId(); // Create in Supabase (profile data) const { data } = await supabase .from('alter_egos') .insert({ alias_id, role, skills, skill_score: 0 }); // Create in D1 (credit ledger) await fetch('/api/ledger/create', { method: 'POST', body: JSON.stringify({ alias_id, balance: 0 }) }); // Link real user to alias (server-side only) await supabase.from('users') .update({ alias_id }).eq('id', userId); return alias_id; } // Reputation score calculation export function calcRepScore(stats: { completedProjects: number; avgRating: number; onTimeDelivery: number; coownAssets: number; }): number { return ( stats.completedProjects * 10 + stats.avgRating * 20 + stats.onTimeDelivery * 15 + stats.coownAssets * 5 ); }
| Delivery Type | Auto-Detect Trigger | Platform % | Record Type |
|---|---|---|---|
| Freelance Project | Project milestone approved | 10% | Revenue share per payment |
| SaaS / Software | Project tagged 'product-build' | 20% | Equity stake on all sales |
| Training Course | Course published to marketplace | 15% | Per-sale royalty forever |
| Consulting | Consulting session completed | 12% | Per-session revenue share |
| IP / Patent | Project tagged 'ip-creation' | 30% | Licensing royalty stream |
// Co-ownership registration — runs on every delivery completion export async function registerCoOwnership( delivery: Delivery, creatorAlias: string ) { const platformPct = getPlatformPct(delivery.type); await supabase.from('coownership').insert({ delivery_id: delivery.id, delivery_type: delivery.type, creator_alias: creatorAlias, platform_pct: platformPct, status: 'active' }); // Generate on-platform "certificate" for the creator await issueCertificate(creatorAlias, delivery, platformPct); } function getPlatformPct(type: string): number { const rates: Record<string, number> = { project: 0.10, saas: 0.20, course: 0.15, consulting: 0.12, ip: 0.30, hardware: 0.25, ai_model: 0.30 }; return rates[type] ?? 0.10; }
Go to cloudflare.com → Create free account. Add your domain (ruhaeriostech.com from Namecheap ~$10). Point nameservers to Cloudflare. SSL automatically provisioned in <5 min.
Install Wrangler CLI: npm install -g wrangler. Run: wrangler d1 create ruh-aerios-prod. Copy the database_id. Run the D1 schema SQL above to initialize the credit ledger tables.
Go to supabase.com → New project. Run the Supabase schema SQL above. Copy your SUPABASE_URL and SUPABASE_ANON_KEY. Enable Email auth. Set up Row Level Security (RLS) — critical: users can only see their own alias_id, never others' real emails.
Run: npx create-next-app@latest ruh-aerios --typescript. Push to GitHub. In CF Pages → New Project → Connect GitHub → Select repo. Set build command: npm run build. Set env vars: SUPABASE_URL, SUPABASE_KEY, etc. Deploy. Done.
Create workers/ directory. Paste the credit transfer Worker code above. Run: wrangler deploy. Worker runs at: api.ruhaeriostech.com/ledger/*. 100,000 requests/day free.
Run: wrangler r2 bucket create ruh-aerios-files. Use signed URLs for secure access: files are private, URLs expire in 24h. No egress fees ever — Cloudflare absorbs CDN bandwidth cost entirely.
Create free Stripe account. Enable Stripe Connect (for paying out to talent globally). Add STRIPE_SECRET_KEY to CF Pages env vars. Stripe charges 0.25% + $0.25 per payout — only cost is on actual earned money, which is already revenue. Zero setup cost.
In CF Dashboard → Email Routing → Add: [email protected], support@, noreply@. Route to a Gmail inbox. For transactional emails, create free Resend.com account (3,000 emails/month free). Add RESEND_API_KEY to env vars. Done.
| Layer | Tool | Cost | Free Until | Cloudflare? |
|---|---|---|---|---|
| Frontend Hosting | Cloudflare Pages | $0 | Forever | ✓ CF |
| Frontend Framework | Next.js 14 | $0 | Forever | — |
| Styling | Tailwind CSS | $0 | Forever | — |
| Edge Compute | Cloudflare Workers | $0 | 100k req/day | ✓ CF |
| Edge Database | Cloudflare D1 | $0 | 5GB / 5M reads/day | ✓ CF |
| Main Database | Supabase PostgreSQL | $0 | 500MB / 2 projects | — |
| Authentication | Supabase Auth | $0 | 50k MAU free | — |
| File Storage | Cloudflare R2 | $0 | 10GB/mo + free egress | ✓ CF |
| CDN | Cloudflare CDN | $0 | Unlimited bandwidth | ✓ CF |
| SSL/HTTPS | Cloudflare SSL | $0 | Forever | ✓ CF |
| DNS | Cloudflare DNS | $0 | Forever | ✓ CF |
| Email Routing | Cloudflare Email | $0 | Forever | ✓ CF |
| Transactional Email | Resend.com | $0 | 3,000/mo free | — |
| Security / WAF | Cloudflare WAF | $0 | Forever (basic) | ✓ CF |
| DDoS Protection | Cloudflare | $0 | Forever | ✓ CF |
| Payments (payout) | Stripe Connect | % only | On earned money only | — |
| Intl Payouts | Wise Business | Low fee | On earned money only | — |
| Community | Discord | $0 | Forever | — |
| Scheduling | Cal.com | $0 | Forever (basic) | — |
| Forms | Tally.so | $0 | Forever (basic) | — |
| Newsletter | Beehiiv | $0 | 2,500 subscribers | — |