Toolsbd Admin
High Scale Architecture & Quota Defense

Dual Firebase & 50k Free Quota Protection Console

Toolsbd.com separates web payments from desktop tool licensing. With in-memory RAM caching and 12-hour signed tokens, 10,000+ daily desktop tools will never exhaust Firestore's 50,000 free daily reads limit!

Firebase Project 1 (Website Backend)● ACTIVE
Project ID:asik-billaha-weabsite
Collections Managed:users, orders, wallet_deposits
Purpose:User profiles, bKash & Rocket payments, wallet balance
Isolated Quota Protection:Desktop tool license heartbeats do NOT touch this database, guaranteeing your website and payment flow never stall!
Firebase Project 2 (Tool & HWID Licensing)● DUAL PROJECT ACTIVE
Project ID:fb-resend-otp
Collections Managed:licenses, hwid_keys, machine_locks
Ready for 2nd Firebase:Yes — paste credentials in .env.local anytime!
When you have your 2nd Firebase ready:Just paste `NEXT_PUBLIC_LICENSE_FIREBASE_*` in your Vercel or local environment variables. The server automatically routes licenses there with zero downtime!

50,000 Free Daily Read Quota Defense Status

Live statistics from Toolsbd.com license verification engine.

Total Verifications Checked
0
Since server boot
In-Memory RAM Cache Hits
0
0 Firestore Reads Used
Free Quota Reads Saved
0
Prevented quota burn
Offline Signed Token Validity
12 Hours
HMAC-SHA256 Signed

Server Barabo Kivabe? (How to Scale for 50,000+ Daily Members)

Follow these 3 foolproof steps so your server and databases can scale effortlessly without crashing or paying high bills:

1

Vercel Serverless Auto-Scale

Your website is hosted on Vercel Serverless Edge. It automatically allocates more CPU and memory when traffic surges from 1,000 to 100,000 visitors. You never need to configure Apache, Nginx, or server RAM manually!

2

Firebase Blaze Plan (Pay as you go)

In Firebase Spark (Free), when 50,000 reads is reached, it stops. If you upgrade to Blaze, the first 50,000 reads EVERY DAY are still 100% FREE ($0.00)! Extra 100,000 reads only cost $0.06 (~৳8 BDT).

3

12-Hour Desktop Offline Token

Desktop tools store the signed cryptographic token for 12 hours. Even with 10,000 active members using the tool 24 hours a day, the server only receives ~20,000 requests per day (well within the 50,000 free quota)!

Desktop Tool Heartbeat Code (Zero-Quota-Drain Algorithm)

Give this code snippet to your software developer so your desktop tool caches the 12-hour signed token:

Python Desktop Client
# Toolsbd.com Zero-Quota Desktop Heartbeat Client (Python)
import requests, os, json, time

API_URL = "https://toolsbd.com/api/license/verify"
CACHE_FILE = "license_token.dat"
LICENSE_KEY = "TBD-YOUR-KEY"
MACHINE_HWID = "YOUR-HARDWARE-HWID"

def verify_license():
    # 1. Check local offline cache first (Zero server pings for 12 hours!)
    if os.path.exists(CACHE_FILE):
        with open(CACHE_FILE, "r") as f:
            cached = json.load(f)
            if time.time() < cached.get("valid_until_timestamp", 0):
                print("[OK] Validated offline via 12-hour signed cryptographic token.")
                return True

    # 2. Ping Toolsbd server only once every 12 hours
    res = requests.post(API_URL, json={"key": LICENSE_KEY, "hwid": MACHINE_HWID})
    data = res.json()
    if data.get("success"):
        # Save 12h signed session token locally
        with open(CACHE_FILE, "w") as f:
            json.dump({
                "token": data["data"]["offlineToken"],
                "valid_until_timestamp": time.time() + (12 * 3600)
            }, f)
        print("[OK] License validated & refreshed for 12 hours.")
        return True
    else:
        print("[ERROR]", data.get("error"))
        return False
C# / .NET Desktop Client
// Toolsbd.com Zero-Quota Desktop Heartbeat Client (C# / .NET)
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

public class ToolsbdGuard {
    private const string ApiUrl = "https://toolsbd.com/api/license/verify";
    private const string CacheFile = "license_session.dat";

    public static async Task<bool> VerifyAsync(string key, string hwid) {
        // Step 1: Check 12-hour offline token first
        if (File.Exists(CacheFile)) {
            var cachedJson = File.ReadAllText(CacheFile);
            var cache = JsonSerializer.Deserialize<JsonElement>(cachedJson);
            long expiry = cache.GetProperty("validUntilTimestamp").GetInt64();
            if (DateTimeOffset.UtcNow.ToUnixTimeSeconds() < expiry) {
                return true; // 100% offline, 0 Firestore reads!
            }
        }

        // Step 2: Contact server once every 12 hours
        using var client = new HttpClient();
        var body = JsonSerializer.Serialize(new { key, hwid });
        var res = await client.PostAsync(ApiUrl, new StringContent(body, Encoding.UTF8, "application/json"));
        var content = await res.Content.ReadAsStringAsync();
        // Save new 12h token locally...
        return res.IsSuccessStatusCode;
    }
}