The backend API for Rugplay Enhanced. Runs entirely on Cloudflare's free tier.
- Cloudflare Workers (serverless runtime)
- Cloudflare D1 (SQLite database)
- Cloudflare KV (key-value store)
- TypeScript
- A free Cloudflare account at cloudflare.com
- Node.js installed on your machine
- Git installed on your machine
npm install -g wranglerwrangler loginThis opens your browser. Log in with your Cloudflare account.
git clone https://github.com/devbyego/rugplay-enhanced-api
cd rugplay-enhanced-api
npm installwrangler d1 create rugplay-enhanced-dbCopy the database_id from the output and paste it into wrangler.toml replacing REPLACE_WITH_YOUR_D1_ID.
wrangler kv namespace create KVCopy the id from the output and paste it into wrangler.toml replacing REPLACE_WITH_YOUR_KV_ID.
npm run db:init:remotewrangler secret put ADMIN_SECRETEnter a strong secret key when prompted. Save this somewhere safe — you will need it to manage reports, tags, and changelogs.
npm run deployYour API is now live at https://rugplay-enhanced-api.YOUR_SUBDOMAIN.workers.dev.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/reports |
Get approved reports. Supports ?page=, ?limit=, ?symbol=, ?username= |
| POST | /v1/reports/submit |
Submit a new report |
| POST | /v1/reports/vote |
Vote on a report |
| POST | /v1/reports/delete |
Delete a report (admin only) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/tags |
Get all user tags |
| GET | /v1/tags/user?username= |
Get tag for a specific user |
| GET | /v1/tags/styles |
Get all available tag styles |
| POST | /v1/tags/set |
Set a user tag (admin only) |
| POST | /v1/tags/remove |
Remove a user tag (admin only) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/update |
Get latest version string |
| POST | /v1/update/push |
Set latest version (admin only) |
| GET | /v1/changelog |
Get changelog for latest or ?version= |
| GET | /v1/changelog/all |
Get all changelogs |
| POST | /v1/changelog/push |
Push a new changelog entry (admin only) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/analytics |
Track an event (install or active_session) |
| GET | /v1/analytics/stats |
Get stats (admin only) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/health |
Health check |
All admin endpoints require the header:
X-Admin-Secret: YOUR_SECRET
This API stores no usernames, no IP addresses, and no personal identifiers. IP addresses are one-way hashed before any comparison and never stored. Analytics only count events by day — no user profiling of any kind.
npm run dev