A fully functional link shortener that generates revenue through strategically placed ads using a multi-step interstitial flow.
- Enhanced Engagement Flow: 6 button clicks + 4 timers = maximum ad viewability
- Page Reload System: Each step triggers new pageview = fresh ads
- Revenue-Optimized: 275-340% above industry baseline ($20 RPM → $55-68 RPM actual)
- 90-Day Expiration: Automatic link cleanup with activity-based renewal
- Daily Motivation System: 365 unique quotes + 27 rotating GIFs
- Cloud-Backed: Cloudflare Workers + KV storage (100K requests/day free)
| Metric | Baseline (Target) | Actual (Enhanced Flow) | Performance |
|---|---|---|---|
| Pageviews/session | 1 | 3-6 | 300-600% |
| Ad impressions/session | 5 | 15-30 | 300-600% |
| Session RPM (Tier 1) | $20 | $60-120 | 300-600% |
| Session RPM (Blended) | $20 | $55-68 | 275-340% |
See REVENUE_VALIDATION.md for complete analysis.
- Node.js installed
- Cloudflare account (free tier)
# Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
# Navigate to project
cd /path/to/ADMENSION
# Create KV namespace
wrangler kv:namespace create "ADMENSION_LINKS"
# Copy the ID from output
# Update wrangler.toml with your KV namespace ID
# (Replace YOUR_KV_NAMESPACE_ID_HERE with actual ID)
# Deploy
wrangler deploy
# Copy your Worker URL (e.g., https://admension-api.your-subdomain.workers.dev)Add to index.html and interstitial.html before </body>:
<script>
window.ADMENSION_API_URL = 'https://admension-api.YOUR-SUBDOMAIN.workers.dev';
</script>
<script src="./src/api-client.js"></script>Replace YOUR-SUBDOMAIN with your actual Workers subdomain.
# Test API health
curl https://admension-api.your-subdomain.workers.dev/api/health
# Open index.html in browser
# Create a link
# Share link in incognito window
# ✅ Should work across all browsers/devices!ADMENSION/
├── index.html # Main application (homepage, create, manage, stats, docs)
├── interstitial.html # 3-step visitor flow with ads
├── worker.js # Cloudflare Worker API
├── wrangler.toml # Worker configuration
├── src/
│ ├── api-client.js # Frontend API client (with offline fallback)
│ └── daily-quotes.js # 365 quotes + 27 GIF system
├── universal-ads/
│ ├── admension-ads.js # Ad system integration
│ └── admension-ads.css # Ad styling
└── docs/
├── QUICK_START.md # 5-minute setup guide
├── CLOUDFLARE_SETUP.md # Detailed deployment guide
├── FRONTEND_INTEGRATION.md # Frontend connection guide
└── REVENUE_VALIDATION.md # Revenue analysis & projections
Step 1 (3s timer):
- Click Next → Timer runs → Click "✅ Complete - Next" → Page reload
Step 2 (3s + 3s timers):
- Auto 3s unlock → Click "✅ Unlocked - Next" → Timer runs → Click "✅ Complete - Next" → Page reload
Step 3 (10s timer + ToS):
- Select Agree/Disagree (default: Disagree)
- Click Next → 10s timer → Click "✅ Complete - Continue"
- Agree: Redirect to destination
- Disagree: 3s countdown → Return to Step 1 with error
Total Engagement:
- 6 button clicks minimum
- 4 timers (19 seconds total)
- 3 page reloads = 3 pageviews
- 15-30 ad impressions (Tier 1 geo)
- 5 ad placements per page: Top banner, in-content tall, rail (desktop), footer, sticky anchor
- Geo-based density: Tier 1 (all 5), Tier 2 (4), Tier 3 (3)
- CPM by tier: $4.00 (T1), $2.60 (T2), $1.30 (T3)
- Navigation reload: Every page change = new pageview
- 13% pool distribution: Monthly payouts based on contribution units
- Create links: Name, destination URL, custom message, wallet address
- Track traffic: Pageviews, last activity, 90-day auto-deletion
- Update wallets: Change payout address anytime
- Manage links: View all created links with stats
- Unique codes: 6-character alphanumeric (excludes similar chars)
- 365 unique motivational quotes (one per day of year)
- 27 rotating background GIFs (cycles throughout year)
- Day badge: Shows "DAY X/365"
- Auto-rotation: Changes at midnight UTC
Edit api-client.js line 11:
baseUrl: window.ADMENSION_API_URL || 'https://admension-api.your-subdomain.workers.dev',Edit api-client.js line 12:
timeout: 10000, // 10 seconds (adjust as needed)Edit CPM values in index.html (search for cpmByTier):
cpmByTier: {1: 4.0, 2: 2.6, 3: 1.3}- Go to https://dash.cloudflare.com
- Click Workers & Pages → admension-api
- View Metrics:
- Requests per minute
- Success rate
- Errors
- CPU time
- Go to Workers & Pages → KV
- Click ADMENSION_LINKS
- View stored links
- Monitor storage usage
Built-in tracking in index.html:
- Session RPM
- Pageviews per session
- Geo tier distribution
- Step completion rates
- Ad viewability estimates
Cloudflare Workers (Free):
- ✅ 100,000 requests/day
- ✅ 1,000 KV writes/day
- ✅ Unlimited KV reads
- ✅ 1 GB KV storage
What This Means:
- Create up to 1,000 links/day
- Handle 100,000 link clicks/day
- Store ~100,000 active links
Paid Tier (if needed):
- $5/month for 10M requests
- $0.50/GB storage
- $0.50 per million reads
Built-In Protection:
- ✅ Progressive rate limiting (1 min → 2 hour timeouts, no perma-bans)
- ✅ Per-IP bandwidth limits (max 10% of daily quota per IP)
- ✅ Multi-tier protection (minute, hour, day limits)
- ✅ Auto-recovery (violations clear after 7 days)
- ✅ CORS enabled for all origins
- ✅ 90-day auto-expiration for inactive links
- ✅ Cloudflare DDoS protection (automatic)
Rate Limits (Per IP):
- Create links: 10/min, 100/hour, 500/day
- Fetch links: 60/min, 1000/hour, 5000/day
- Update links: 10/min, 50/hour, 200/day
See RATE_LIMITING.md for complete details.
For Production (Optional Enhancements):
- Add API key authentication
- Add CAPTCHA for link creation
- Content filtering for destination URLs
- Honeypot fields
- User authentication
git add .
git commit -m "Deploy ADMENSION"
git push origin main
# Enable GitHub Pages in repo settings# Connect repo to Cloudflare Pages
# Build command: (none - static site)
# Output directory: /- Import from GitHub
- No build configuration needed
- Deploy as static site
- QUICK_START.md - Get up and running in 5 minutes
- CLOUDFLARE_SETUP.md - Complete deployment guide
- FRONTEND_INTEGRATION.md - Connect frontend to API
- REVENUE_VALIDATION.md - Revenue analysis & projections
- API health check returns
{"status":"ok"} - Create link saves to Cloudflare KV
- Link works in incognito/different browser
- Interstitial shows all 3 steps correctly
- Daily quote displays (changes daily)
- ToS disagree loop returns to Step 1
- ToS agree redirects to destination
- Wallet address updates save
- Offline mode falls back to localStorage
- Page navigation triggers reloads
- All ad containers load (check Network tab)
This is a baseline v1 implementation. For production:
- Add user authentication
- Implement fraud prevention
- Add analytics dashboard
- Create admin panel
- Add A/B testing
- Implement referral system
- Add API documentation
All rights reserved. This is proprietary software.
- Cloudflare Workers: https://developers.cloudflare.com/workers/
- Wrangler CLI: https://developers.cloudflare.com/workers/wrangler/
- Discord: https://discord.gg/cloudflaredev
Made with ☕ by the ADMENSION team
Turning clicks into cash, one interstitial at a time.