Watch And Earn docs
v4.0.0
Live demoConsole demo Get help
● Set up · admin/

Operator console
run the app without code.

A small Node server you host yourself. It serves the MIKODES Admin Kit console at /admin, writes the app's settings to Firestore and gives you pages for users, wallets, payouts, the business page, the review queue, redemptions, revenue and growth, the ledger, fraud flags, leaderboards, teams, sponsors, the rewards store, events, promo codes, quizzes, tasks, offers and push campaigns.

Node 22SQLite or PostgresDockerfile included

01What the console does

  • Settings → Firestore. The console is the source of truth for the app's configuration. On every save, and once at start, it writes config/public (read by the app) and config/private (read only by Cloud Functions: verification and postback secrets, store verification, revenue reporting keys). Both documents are rewritten as a whole, so values added to them by hand do not survive the next save.
  • Server-side access only. It uses the Firebase Admin SDK on the server. The browser never talks to Firestore.
  • Every write is audited in an append-only audit log: who changed what, and why.
  • Roles. Viewers read, managers write, only owners create or rotate offer secrets and change secret settings. For payouts: managers approve, reject, mark paid, grant cash and freeze; only the owner sends money through PayPal Payouts and changes the PayPal settings (four-eyes).
  • The console never moves money. Each payout or wallet action is one walletOps document that the backend applies once (how).
  • Real counts, no estimates. The Overview shows users, active today, DAU, ARPDAU from measured revenue, day-1 and day-7 retention, the sign-up funnel, points issued and verified ads, offerwall conversions, open fraud flags and open review items. Revenue is only what was recorded with a reference. Anything not measured says so (Revenue centre).
Operator console overview
The console overview, on the read-only demo console with sample data.

02Environment variables

Copy admin/.env.example to admin/.env (never commit it) or set these in your host's environment.

VariablePurposeWhere to get it
ADMIN_SECRET_KEY RequiredEncrypts the secrets the console stores (ad network keys, offerwall secrets, reporting keys, the Apple .p8 key).Generate: openssl rand -hex 32. Back it up. Without it the stored secrets cannot be read. If it is missing, the console generates one in data/.admin-secret-key and warns in the log; move it into your environment.
GOOGLE_APPLICATION_CREDENTIALSPath to a service-account key file of your Firebase project.Firebase console → Project settings → Service accounts → Generate new private key. Leave empty on Cloud Run or GCE to use the attached service account.
FIREBASE_PROJECT_IDOptional. Set it when the credentials do not name the project.Your project id.
FIRESTORE_EMULATOR_HOSTLocal development only: use the Firestore emulator, e.g. 127.0.0.1:8080, with no credentials.—
ADMIN_DATAsample = built-in sample data and no Firebase (public demo). Empty = Firestore.Leave empty on your install.
ADMIN_DEMO_PASSWORDOnly on a public demo host: makes the console a read-only demo (account demo@watchandearn.demo).Leave empty on your install.
PORTHTTP port.Default 8790.
DATABASE_URLOptional Postgres for the console's own data (team, sessions, settings, audit) instead of data/admin.sqlite.Neon, Supabase, Cloud SQL… Use a pooled URL with sslmode=require.
The service account bypasses security rules

Keep its key file on the console's server only. Never put it in the app, in git or in a support message.

03Run it and create the owner

cd admin
npm ci
cp .env.example .env   # fill in ADMIN_SECRET_KEY and GOOGLE_APPLICATION_CREDENTIALS
npm start              # http://localhost:8790/admin
  1. Find the setup codeOn first start the log prints a one-time setup code. Each start before an owner exists prints a new one; any printed code works.
  2. Create the ownerOpen /admin, choose Create the owner, enter the code, your e-mail and a password of 12 or more characters.
  3. Add your teamUnder Team, add managers and viewers.

Compiled build instead of tsx: npm run build && npm run start:dist.

04Deploy options

WhereHow
Any Node 22 host (VPS, Render, Railway, Fly)npm ci && npm start. Data lives in data/admin.sqlite: put data/ on a persistent disk, back it up together with ADMIN_SECRET_KEY, and run one instance.
DockerSee below. The volume keeps /app/data.
Serverless or several instances (Cloud Run with autoscaling)Set DATABASE_URL to Postgres; tables are named mk_watchandearn_*. Give the service account the Firebase Admin SDK Administrator Service Agent role (or Cloud Datastore User plus Firebase Cloud Messaging Admin) and leave GOOGLE_APPLICATION_CREDENTIALS empty.
cd admin
docker build -t watchandearn-admin .
docker run -p 8790:8790 -v wae-admin-data:/app/data --env-file .env watchandearn-admin

Put HTTPS in front of it (a reverse proxy or the platform's TLS). The session cookie is marked Secure over HTTPS and the server honours x-forwarded-proto.

05Settings sections

The Get started and Status screens show what is still missing. Sections new in 3.1 and 4.0 are marked.

SectionWhat you set
BrandProduct name (default "Watch And Earn"), accent colour (default #EC4899), support e-mail, and "Name of the points" (see Rebranding).
LegalTerms of service URL, privacy policy URL, rewards rules URL, and the points notice (shown in onboarding, settings and the rules screen). The Status page warns while privacy and terms are empty.
AdsThe 3.0 network choice and pacing, now a fallback. See Ads.
Mediation 3.1Waterfall or mediator, the order of networks per format. See Mediation and placements.
Ad placements 3.1App open, interstitial, banner, native, rewarded interstitial, global caps. All off by default.
AdMob / AppLovin MAX / Unity Ads / ironSource LevelPlay unitsUnit ids and app keys per network, and that network's verification secret.
Offerwalls and surveys 3.1AdGem, Lootably, BitLabs, CPX Research: id, wall URL, secret, points per USD. 4.0 adds the reward mode (points or cash) and the platforms (Android on, iOS and web off). See Offerwalls and surveys and Cash mode.
Wallet & payouts 4.0The cash wallet on or off, currency and USD rate, platforms, user share and VIP share, hold days, referral commission, account age, verified sign-in, limits, review threshold, auto-approve, the wallet notice. All money switches off by default. See Wallet and payouts.
Payout methods 4.0PayPal, crypto, bank transfer, gift cards: on or off, minimum, fees, countries, name and processing time; crypto assets, bank fields, gift-card catalog. See Payout methods.
PayPal Payouts 4.0Owner only: sandbox or live, client id, secret (write-only, with a Test button), webhook id. Empty = manual payouts. See PayPal setup.
Rewards economyPoints, caps, wheel, scratch prizes, quizzes, referrals (incl. the second level), levels, VIP multiplier, check-in calendar. See Rewards economy.
FeaturesSwitch each feature on or off (20 switches).
Subscriptions and purchasesVIP, remove-ads, boosters, point packs, store verification. All off by default. See In-app purchases and VIP, boosters and packs.
Season pass 3.1Season id, name, dates, XP per level, tiers.
Achievements 3.1The achievement list.
Mystery box and mini-games 3.1Mystery box, memory and word games, team size; since 4.0 also the six new games. See Engagement features and Mini-games.
Anti-fraud 3.1Device limit, velocity, emulators, VPN, offerwall hold in points and (4.0) in cents. See Anti-fraud.
A/B experiments 3.1Two-variant tests of economy and ad values. See Growth tools.
Revenue reporting 3.1Currency for ARPDAU, AppLovin MAX Report Key, AdMob API credentials, with Test buttons. See Revenue centre.
Push defaultsDefault title and message for the Push campaigns page.
BackendCloud Functions base URL, e.g. https://us-central1-<project-id>.cloudfunctions.net. The console uses it to show the exact callback and postback URLs.
NotificationsAn e-mail and a signed webhook for alerts when a blocking check starts failing.

Kit screens beside these: Overview, Status, Team, Audit log, History and Export.

06Product pages

Users

Search by uid, display name (starts with) or referral code. Open a profile to see the last 50 ledger rows. Adjust points with a mandatory reason: the ledger row has type admin, leaderboards do not change, and a deduction can never take the balance below 0. Ban and unban: a banned user is refused by every function except account deletion.

Ledger

The latest credits across all users: type, amount, balance after, note.

Ledger page with recent credits across users
Ledger, on sample data.

Fraud flags

Open flags from verification mismatches, for example a callback for another user's session or an expired one. Review and clear with a reason; the user's flagged mark is removed when no other open flag remains.

Fraud flags page
Fraud flags, on sample data.

Leaderboard

Today, this week and all time. On the sample demo console it is empty on purpose: the demo ranks no invented players.

Quizzes

Create and edit quizzes with a title, category, order, optional points per correct answer and questions with options. Correct answers are stored separately in quizAnswers, which the app can never read.

Quizzes page listing quizzes
Quizzes, on sample data.

Tasks

Daily tasks with a type (ads, spins, scratches, quizzes, offers, streak or points), a target count and points. Progress is computed on the server from today's counters; each task can be claimed once per UTC day.

Offers

Partner offers with title, description, URL, points, partner and optional image. Each offer gets a postback secret, shown once. See Partner offers. Offerwalls and surveys are configured in Settings, not here.

Push campaigns

Compose a notification, pick a segment (for "Users in a team", pick the team) and a time, or send one right away to everyone. Managers and owners only. See Push campaigns.

Payouts, Wallets, Business 4.0

The payout queue with flags and actions, one user's cash balances with grants and freezing, and the measured business figures with an example calculator that is not a forecast. See Payouts, Wallets, Business.

Review queue 3.1

Held offerwall conversions (in cash mode with their cash amount) and anti-fraud alerts (device, emulator, root, VPN, velocity). Approve or reject with a note. Rejecting can also ban the user. Approving an offerwall hold makes the backend credit it once. See Review queue workflow.

Redemptions 3.1

Operator rewards users bought with points. Fulfil once you delivered it, or Reject: the points are refunded unless you untick "refund on reject". See Rewards store.

Revenue and growth 3.1

Measured revenue by source and currency, DAU, ARPDAU, retention and the funnel over 7, 30 or 90 days. See Revenue centre.

Teams 3.1

Search teams by tag, see members, disband with a reason.

Sponsors 3.1

Sponsored banners, tasks and quizzes, with daily impressions and clicks and the booking amount. See Sponsored campaigns.

Rewards store, Events, Promo codes 3.1

Store items (the Id column is the id you use for season, mystery-box and event cosmetic prizes), tournaments with live standings, and promo codes. See Engagement features.

07Public read-only demo console

To show the console to others without Firebase, run a separate instance with ADMIN_DATA=sample and ADMIN_DEMO_PASSWORD=<a password you publish>. Visitors sign in as demo@watchandearn.demo, a viewer. No owner exists, every write answers 403, every row is labelled "Sample" and the Overview tiles are marked "demo". Never set these two variables on your real console.

The sample console tells the same story as the web demo app (admin/src/sample-settings.ts, admin/src/sample.ts, cross-checked by admin/test/sample.test.ts): the same ad placements and caps, the "Sample season" of the current month, the same achievements, mystery box, games, boosters and sample walls, the same quizzes, tasks, partner offer and store items, the event "Sample weekly event", the promo code DEMO25 and the sample sponsors. It shows no revenue and ranks no invented players. The sample settings switch the wallet on, like the demo app; the Payouts page shows four example requests (ids sample-payout-…, labelled "Sample", with example.com and placeholder destinations), Wallets shows their example balances, and the Business page says "not measured" everywhere.