⚓

Staff Panel

Enter your access code

⚓

Staff Panel

📦 Inventory 📸 Library ✓ Daily Work 🏭 Warehouses 📥 Stock Received 🧮 AI Calculator 📦 Packing ⬆ Import 🏷 Tags 🔐 Admin ⚙ Settings
🕒 Kiosk
Insert-between: OFF

📦 Import photos from URL

Photos

Product

📸
Drop images here
or paste (Ctrl/⌘ V) · or click to pick files · max 25 MB each
OR
📌 Saved links for this product

🗂 Arrange categories

Click ▲ / ▼ to move a category up or down. Order saves automatically.

    ⚡ Bulk add products

    📄 Sample CSV
    Preview
    NamePrice SizeColor StockTag

    commas split tasks · @name assigns · #tag categorises · type "1 done" to tick off

    0 open

    Task

      🧮 AI Calculator

      Type orders freely — local parser handles math, AI fallback fills missing prices from catalog.

      📦 Order

      ASIN Product name Size Color Qty

      📥 Stock receipt

      Product Size Color Qty Unit ₹ Notes

      ⬆ Import from Excel / CSV

      Upload an .xlsx, .xls, or .csv file. We'll map columns (name, size, color, price, stock, notes) automatically, show you all rows, flag duplicates, then import only what you approve. Choose AUTO to round-trip an exported inventory CSV — each row's id + category_name drive an update / insert with full diff preview.

      📦 Track stock and cost of packing materials (boxes, tape, bubble wrap...).

      👥 Staff

        📱 Open clock-in kiosk

        📅 Company calendar —

        Click any day to add a short note (meeting, visit, closure). Red shading marks weekends.

        Pick a staff member on the left to see their attendance. The + button adds a new member.

        🕒
        Pick a staff member on the left, or + to add one.

        Attendance —

        Full Half Absent Holiday Manual

        🏷 Tag library

        Tags appear on every product (e.g. Captain, C/O, Cadet). Group them by category for easier browsing.
        🔐

        Admin area locked

        Enter your admin PIN. Default is 1990 — change it in Settings.

        💰 Salary Deposits

        Enter this month's staff and owner deposits per employee. Both add to the staff member's cumulative savings shown on every slip. Staff deposit is subtracted from net pay; owner deposit is held in savings only (does not affect monthly take-home). Re-saving the same month overwrites the previous entry.

        📋 Salary History

        Every salary slip ever generated is logged here with a unique SLIP-… ID. Click View to open the original — slips always render from their stored snapshot, so amendments to attendance or deposits never retro-mutate old slips.

        📁 Projects

          Entry

          📸 Image Library

          Dump loose images here (WhatsApp screenshots, client photos, reference shots). Gemini auto-tags every upload with a category + keywords + short description so you can find them later. Click any image → "Assign to product" to link it into a product's 💾 Raw tab (no duplicate R2 upload).

          📸
          Drop many images here
          or paste (Ctrl/⌘ V) · or click to pick files · 50 MB max each

          Assign image to product

          Lands in the product's 💾 Raw tab by default. Pick a different tab if you want:

          📊 Inventory Statistics

          Live view of your catalog. Numbers ignore empty rows.

          Categories
          —
          Products
          —
          Stock units
          —
          Stock value
          —
          Low stock (1–5)
          —
          Out of stock
          —
          📦 Packing cats
          —
          📦 Packing SKUs
          —
          📦 Packing units
          —
          📦 Packing value
          —

          ⚙ AI Provider & keys ▾

          API keys are stored in the database and used by the AI calculator and smart search.

          Pick which AI suggests tags inside the inventory tag picker. "Both" shows Gemini vs OpenAI side-by-side. Uses the API keys configured below.

          Get from aistudio.google.com/apikey — Gemini 2.5 Flash has a generous free tier (10 RPM · 500 req/day).

          Get from platform.deepseek.com/api_keys

          Get from platform.openai.com/api-keys

          USD → INR rate
          Default GST %
          Default currency

          AI uses the USD rate to convert any "$" or "USD" amounts in the calculator.

          🔗 Default product sites (for photo import) ▾

          Pre-filled URLs for the photo-drawer "Fetch images" dropdown — saves typing the same Amazon / Flipkart / Etsy / Meesho prefix every time. Drag rows to reorder.

            🌐 Public API (ecommerce + WhatsApp bot) ▾

            Read-only token-authed API for your ecommerce site or WhatsApp bot to pull live product + photo data. Set a secret token below — clients send Authorization: Bearer <token> or ?api_key=<token>. CORS is open so any domain can call it; the token is the gate. Rate limit: 120 req/min/token.

            API Token
            Company name (for SEO blob)
            Currency (ISO 4217)
            Available endpoints
            GET  /api/public/health
            GET  /api/public/categories
            GET  /api/public/products
                   ?category_id=  &tag=  &q=  &limit=  &offset=  &with_photos=1
            GET  /api/public/products/:id          # single, full photos
            GET  /api/public/products/:id/seo      # title, description, og_image, JSON-LD
            GET  /api/public/search?q=...
                      
            Quick test from your terminal:
            curl -H "Authorization: Bearer YOUR_TOKEN" https://staff.nodesurge.tech/api/public/health

            📲 WhatsApp forward (product share) ▾

            The green 📲 button on every product row sends name + price + main-image link to this WhatsApp number via the existing Chatwoot inbox. Use your OWN phone number here — then forward manually to clients so it goes out as a personal message instead of from the business number.

            Forward target (WhatsApp number)
            Needs to have messaged the Chatwoot inbox in the last 24h for free-form replies. (Outside that window WhatsApp requires a pre-approved template — configurable later.)
            Daily summary time (IST)
            Each Daily-Work box with a phone number receives an AI-summarised pending-task list once daily at this time.
            Product-share template name
            The exact name Meta approved (e.g. product_share). Leave blank to fall back to free-form text.
            Language code
            Category
            Whatever Meta finally classified it as.
            ⚠ Outside the 24h window: for marketing-category templates, the recipient must have either messaged this Chatwoot inbox at least once OR explicitly opted in via Meta. If the toast says "Recipient has not opted in", send a "hi" from your phone to the staff WhatsApp number — that opens the window.
            Template variables (comma-separated, in order)
            Which product fields fill {{1}}, {{2}}, … in your approved template body. Order matters. Available: name, price, specs (size · color), size, color, stock. Example: a 2-variable template body "Order: {{1}} — {{2}}" should use name,price. Edit this field if Meta returns (#132000) Number of parameters does not match — change the comma-list until the count matches the {{n}} placeholders in your template.
            📋 Daily-summary template name
            For sending the morning task push outside the 24h window. Body example: "Hi {{1}}, here are your pending tasks today:\n\n{{2}}" — we send [name, bullet list]. Leave blank to use free-form only (24h window required).
            Language
            Category
            Daily summaries are usually utility (no marketing opt-in needed).
            Click to fetch every approved WhatsApp template from your Chatwoot inbox and count its {{n}} placeholders. Use the count to set "Template variables" above (e.g. name,price for a 2-var template, name,price,specs for 3-var).

            📒 WhatsApp Templates (registry) ▾

            Templates the panel knows how to send (defined in lib/templates.js). The status badge reflects the most recent whatsapp_log outcome — green = sent, red = last attempt failed. Click Test send to fire a sample send to the first admin's WhatsApp number; this proves the template is approved AND wired correctly without leaving the Settings page.

            💬 WhatsApp (Chatwoot) ▾

            Connect your Chatwoot WhatsApp inbox so verified staff can run commands over WhatsApp with the #STAFF trigger.

            Your Chatwoot instance URL (no trailing slash).

            Account ID
            Inbox ID
            Webhook secret

            Found under Chatwoot → Profile Settings → Access Token, or create an Agent Bot token.

            In Chatwoot: Inbox → Configuration → Webhook URL. Save the secret first.

            Every WhatsApp message must start with this word to be processed. Default: #STAFF. Keep it short and unusual so regular chat doesn't trip it.

            👥 Staff members ▾

            Names that show up as @mention autocomplete in Daily Work tasks and comments. Type a name + Enter to add. Full profile (phone, salary, PIN, etc.) is edited on the Staff tab.

              🎨 Theme

              Pick a visual palette. Saves instantly for everyone using this panel.

              🏢 Company info (for salary slip) ▾

              These appear on the salary-slip PDF. Upload a logo, paste both office addresses.

              Company name
              Phone
              Email
              GST / Tax ID
              🇮🇳 India address
              🇺🇸 USA address

              Appears above the salary-slip title. Optional.

              Signature image (goes on salary slip)
              Stamp image
              Holidays per month (display on slip)

              Just the number shown on the slip — does not change salary math. Default 1.

              ☁ Cloudflare R2 (product photos) ▾

              Where all product images are stored. 10 GB free, unlimited egress. Create a bucket at dash.cloudflare.com/?to=/:account/r2 then paste the credentials below. All four fields required.

              Account ID
              Bucket name
              Public URL prefix
              Access Key ID
              Secret Access Key

              🔍 Replicate (image upscaler) ▾

              Used by the 🔍 Upscale button on any photo tile to 4× a low-res image via Real-ESRGAN. Get a free token at replicate.com/account/api-tokens. Cost is roughly ₹0.50–1.50 per image.

              API Token

              🔐 Admin vault PIN

              Second PIN that unlocks the Admin tab. Default 1990.

              Current PIN
              New PIN (4–8 digits)

              🏷 Tag library

              Tag management has its own page now — open the 🏷 Tags tab for category groups, search, and bulk-add.

              ✅ Verified WhatsApp numbers

              Only these numbers can trigger #STAFF commands. Everyone else is ignored.

                🧪 WhatsApp test tool

                Dry-run a #STAFF command without sending anything via Chatwoot. Stock updates WILL apply if the intent is "receive_stock".

                Sender phone (optional)
                Message
                
                        

                🤖 TaskFlow WhatsApp Bot (JIA) ▾

                Bidirectional bot for the Daily Work module. Distinct from the legacy #STAFF webhook below — both can run side-by-side. Inbound URL for Chatwoot: POST /api/webhook/chatwoot.

                Other bots can GET /api/internal/numbers (currently public per spec §9.11) to skip messages from registered staff. The token below is for future bearer-auth use.

                Admins must start their message with this word for the bot to act on it. Staff numbers are captive — every message processed.

                📜 WhatsApp activity log ▾

                Every hit to the #STAFF webhook — including rejected and skipped ones. Use this to debug Chatwoot wiring.

                🛒 Order Cart

                Items: 0 Total qty: 0

                🖨 Print Stock Sheet (A4)

                Select categories to print. Stock column is blank for manual counting. ~30 rows per page.

                  ⚙ Customize WhatsApp Copy

                  Choose which fields to include. Labels follow each category's own column names.

                    🏭 Manage warehouses

                      👤 Manage vendors

                        📥 Record received stock

                        Items: 0 Total qty: 0