Sign in

Internal operations. Authorized staff only.
🔔3 Nour

Owner Dashboard

Good morning, Moetaz
Your command deck — every department at a glance.
Money
Needs you today
Needs attention todayact before it costs you
Today’s plan

Loading…

Department pulse
The week & what's next
This week at Betna
Your weekly summary appears here once data loads.
Top production opportunity — what your stock can unlockSee all →

Sign in to scan production opportunities…

Trends
Sales Sales details →
Sales over time by product
Sales by channel EGP 45,800 total
Income vs expenses

Loading…

Production & stock in handStock detail →
Top stock blocker: Xanthan Gum is limiting Baby Laundry Gel production.
Production by product
Revenue at risk · blocked salesOpen planner →
Expenses & bills · this monthOpen expenses →
Total bills
Outstanding
Paid
Business health · score & weak spotstap to expand
Operations log
Recent activityFull log →

Sign in to see recent changes…

Planning calendarOpen calendar →
System readinessDeployment plan →

What's wired up vs. still needed before going fully live.

Lab OS deployment
1 done · 4 in progress · 17 to go · roughly 10–12 weeks calendar time once started.
Forecasts

Forward-looking projections based on your current pace and stock. Decision aids, not crystal-ball promises — they sharpen as the system runs on your real history.

ℹ Today the selling pace is an assumed run rate (a starting point). Once connected to live sales, each product's pace is measured from your actual orders and these forecasts get noticeably sharper.
Run-out risk
products to restock soon
Waste risk
batches likely to expire unsold
Sales next month
EGP —
projected
Estimated profit
EGP —
next month, before tax
Stock run-out & reorder timing
ProductStockSales/dayDays leftAction

Days left = stock ÷ selling pace. The action factors in production / supplier lead time so you start in time, not just when you're empty.

Waste risk — batches vs sell-through
BatchProductQtyDays to expiryExpected to sellLikely wasteAction

Compares each batch's remaining shelf life with the product's selling pace. If "expected to sell" is less than "qty," the gap is likely waste — promote, bundle, or write off.

Sales forecast — next month, by product
Profit projection — next month
Demand per product — next 30 days
ProductSales/dayProjected units (30 d)Suggested batch

Use this to plan production runs. Suggested batch covers 60 days of pace rounded up — generous enough to avoid frequent small batches.

Planning

Plan company tasks by month, assign owners, and track progress.

Tasks · loading…

Live — saves to your database. Click a day to add a task, or a task to advance its status.

Planning history · loading…

Sign in to load history…

Filter Clear

Drag tasks to reschedule. Use status, priority, and owner filters to manage execution.

Production

Plan what to make and check you have the materials, then turn the plan into production orders and track them as they move through the lab.

📅 Calendar & timeline — when each plan runs, stage by stage

Sign in to load the production calendar…

Plan Gantt · same plans & stages as the calendar — drag bars to reschedule

Loading timeline…

📊 What you've made — semi-finished vs finished, by product

Loading chart…

🏭 Plans & batches · loading…

Each plan groups its own batches & schedule — click a plan's 🧪 batches link to expand. Use + Add batch to record a run. (Plans are separate from purchase orders in Stock.)

PlanProductQtyScheduledOperatorStatus
Sign in to load plans…
Batches tracked
Expiring / expired
within 60 days
Compliance items due
within 90 days
Written off (cost)
this period
QC checks · loading…
BatchCheckResultChecked byDate
Sign in to load QC checks…
Compliance register · loading…
ObligationTypeAuthorityReferenceExpiresStatus
Sign in to load obligations…
Damaged / wasted stock
DateProductQtyReasonCost

Writing off removes the units from stock and records the cost, so spoilage and breakage don't quietly throw your counts off.

⚙️ Capacity settings — working hours, operators, equipment & default durations
🧪 Planning — check materials before you make

Build a plan of products to make — add as many different products as you like. Edit any target and the whole plan recalculates live; products share the same raw stock, so raising one shows what's left for the others.

🧪 Add products to the plan
Add a product (or all approved at once), then set each one’s target with its bar below — the plan recalculates live, and raising one product shrinks the from-stock window of others that share its materials.
PriorityProductTarget units · dragCan make now from stock, after the rest of the planStatus
No products in the plan yet — add one above.

Production calendar

Planned and scheduled production across time — buying, production, QC, packaging and finished-goods release. Orders without a saved schedule show an earliest-possible preview.

People & HR

Track attendance, leave, advances, payroll estimates, and team performance.

Employees (HR records) · loading…
NameTitleTypeSalaryPhoneStatusAccess
Sign in to load the team…

Team members submit leave, advance, and check-in through the worker app — submissions appear in the approval queues below.

Headcount
Active workers
Pending approvals
Leave + advances
Open leave requests
0
Awaiting decision
Advances
This month
Attendance today
Present
2
Late in
1
On leave
0
Absent
1

Based on today's scheduled workers and check-in records.

Today's team status
WorkerRoleScheduledCheck inCheck outStatusNotes
Loading…
People actions
PriorityActionImpactOwnerStatus
Leave requestsawaiting decision
WorkerTypeDatesDaysStatusAction
Salary advances

WorkerAmountReasonDateDeduct fromStatusAction
Attendance trend · last 6 weeks
Loading attendance…

Present days · Late days · Absent days

Attendance, work & deductions — this month
WorkerPresentAbsentLateEarlyMissed punchHours workedAuto deductionAction

Counts for the selected period. Present = days with a check-in · Absent = scheduled days with no check-in · Late = checked in after start + grace · Early = checked out before end − grace · Missed punch = checked in but never checked out. Auto deduction is calculated from the Pay rules. Tap − Deduct to add a manual deduction (e.g. a late day or absence not auto-caught), or ▸ days to see each day with check-in, check-out, hours and status.

Team — this monthtap a name for the full profile
WorkerRoleAttendanceHoursLateEarly outAbsencesLeave leftPointsStatus
Recruitment & onboarding

Add potential candidates and attach their CV. Move them through interview → approval, collect documents at sign-up, then they join the team. Use 🔗 Apply page to share a public link where people apply themselves.

CandidateTypeRoleStageContactCVDocsAction
Recent recognition
WorkerReasonPointsAdded byDate
Loading…
Upcoming holidays
HolidayDateTypeWork impact
Eid al-Adha approx.2026-06-06Public holidayProduction closed
Revolution Day2026-06-30Public holidayCheck schedule

People & HR feeds Production capacity (via attendance), Finance (via payroll & advances), and Planning (via leave & holidays). Tap 👤 Profile on any worker row for their full record — identity, documents, pay, targets and leave.

People & HR

Standard shift Sat–Thu, 08:00–17:00 · late-in / early-out flagged · holidays excluded from absences.

Team directory — everything per person
WorkerHoursPresentAbsentLate × · minSalaryAdvances
Sign in to load the team…
Work schedulesstart & end time per person
PersonStartEnd
Loading…

Late = checking in more than 15 min after start. Early = checking out before end. The 15-minute grace is shared for now.

Upcoming national holidays
Salary advances

R&D Lab

Where your recipes live. Test and refine a formula, then approve it to turn it into a product you can make or sell. You own every recipe here.

Workflow: Product idea Trial Testing Approved formula Packaging Production
Products · loading…

Your product library — concepts under development. Set each one's targets, then open it to run trials, cost them, approve the best, add packaging and send to production.

Sign in to load products…
New trials · loading…

Start a trial for a product (new or existing) using a formula (new or existing), then move it through the process. Each trial has three stages — tap the stage to move it: Testing → Passed / Failed. A passed trial becomes the product’s formula.

ProductTrial #DateByIngredientsStepsProcess
Sign in to load trials…
Trial history by product · loading…

Sign in to load history…

Ingredients · available materials
— pick a category to find a replacement quickly

Add an ingredient and check what's available with its cost and category. These feed the trial recipe builder above and your stock.

IngredientCategoryUnitSupplierUsed inCost/unit
Sign in to load ingredients…
Change history · who changed what, and when

No changes recorded yet.

Packaging Inventory · bottles, closures, labels

Your packaging — bottle types, closures/caps, and labels — with cost. Used in each product's packaging and deducted from stock when you pack final products.

PhotoPackagingTypeUnitSupplierUsed inCost/unit
Sign in to load packaging…

Sales & Customers

Sales & Customers
Website & wholesale, every order, and who owes you — in one place.
This period
Overview
Trends
Sales over time
Sales by product
Sales by category
Orders & delivery
Website orderssynced from betnacare.com
CustomerOrdersTotalPaymentDeliveryUnpaidLast order
All orders · set each order's stage — saves to the database
OrderCustomerTotalPaymentDateStatus
Sign in to load live orders…
Courier & COD — live · loading…
OrderCustomerCourierPaymentCODShippingStatus
Sign in to load deliveries…

This list is live and saves to the database. Track what each courier is holding so COD cash doesn't go missing — set a delivery to Remitted once the courier pays you.

Customers
Business customersWholesale deals, quotes & invoices
AccountContactStageQuotesInvoicedUnpaidExpectedNext follow-upOwnerStatus
Quotes & invoices
After-sale
Returns & refunds
DateProductChannelQtyRefundReasonStock

A returned item is refunded and — unless it's damaged — put back into stock automatically.

Storefront

Manage what shoppers see on betnacare.com — product prices, coupons, and store settings. This replaces the old hidden admin page on the website.

ℹ Sales reports, charts, and analytics aren't here — those live on the Dashboard and Marketing pages, which do it better.
Everything your old website admin did — now in Lab OS tap to see the map

Once these are all here, the admin page can be deleted from the website and the site becomes a simple, faster shop. Here's where each part moved:

OrdersSales
Products, prices & bundles → here on Storefront
Coupons & discount codes → here on Storefront
Shipping & store settings → here on Storefront
Sales performance, trends, top products & customers, geographyDashboard
Marketing sources & website analyticsMarketing
Low-stock alertsProduction & Supply & the bell

Nothing is lost — it's all here, and most of it is clearer than before.

Preview website see your live storefront

Check how the storefront looks after you add a product or change photos, content, or branding — in mobile or full view, with a jump-to-product picker, without leaving the Lab.

Look & branding

Logo & branding your logo on site & Lab

Upload your logo once — it appears in the Lab header and on betnacare.com. A transparent PNG works best. Saves within the hour.

Homepage & featured headline + featured order

Change the big headline and subline on the homepage, and choose which products appear first in the shop. Live within the hour.

Homepage sections show / hide blocks
Announcement bar top strip on the site
Website photos product & category images

Upload or replace the photos shown on betnacare.com. Each photo is hosted in Supabase storage (not baked into the site), so changes here go live within the hour — no code edits.

Products

New website product add a product to betnacare.com

Publish a brand-new product to the website — name, price, photo, description, ingredients, and category. It appears on betnacare.com within the hour.

Create a bundle discounted sets

Bundle a few products at a special price — it shows on the site like any product, with an optional “was” price and save %. Live within the hour.

Product content descriptions, ingredients, plant-based %

Edit each product's description, ingredients and plant-based / environmental score. Saves to Supabase and appears on betnacare.com within the hour.

Product photos multiple photos per product

Add several photos to any product so customers can click through a gallery on the product page. The first photo is the main one shown on cards. Saves to betnacare.com within the hour.

Prices & names edit existing products

Change the price or display name of any product already on the store — including a price per scent for PH9 and oils. The web address stays the same. Updates the live site within the hour.

Mark sold out per product or scent

Flag a product — or a single scent — as sold out. The site shows a “Sold out” badge and disables Add to cart. Switch it back anytime; nothing is deleted. Live within the hour.

Hide / remove products take items off the store

Hide a product from betnacare.com (and bring it back anytime), or permanently remove a product you published. Updates the live site within the hour.

Stock on website show / hide “Sold out”

When on, any product with 0 stock shows “Sold out” + a Notify-me button and can’t be bought. Preview first →

Offers & delivery

Coupon usage stats + on/off

See every discount code with real usage from your orders — times used, discount given, sales — and turn a code off or expire it instantly.

Delivery fee checkout charge

Reviews, policies & trust

Customer reviews approve before they show

Customers can leave star ratings and reviews on each product. New ones stay hidden until you approve them here — you can also reply, hide, or delete. Approved reviews appear within the hour.

Policies & FAQ shipping, returns, FAQ…

Write your own Shipping, Returns, Terms and Privacy text (blank keeps the standard wording), and add FAQ questions. Updates the site within the hour.

About page your story
Shown under the “About” link in the footer.
Social links Instagram, TikTok, WhatsApp
WhatsApp number updates every “Message us” button too.
Older tools & detailed tables products, bundles, categories & content tables — tap to open
Products & prices
ProductPriceCostMarginStockOn website

Price is what shoppers pay. Cost is what it costs you. “On website” controls whether shoppers can see and buy it. Changes here update the live shop.

Website content — anything that ever changes lives here
Categories

Business Accounts

Your three B2B channels at a glance — Wholesale, Consignment, and White-label. See which channel earns most and where cash is tied up, then open a channel to record a sale.

Channel comparison

Channel profitabilityproduct cost only

Loading\u2026

Wholesale = your brand, sold to a reseller (income when invoiced). Consignment = your stock in their store, still yours until sold (income when they sell). White-label = made under their brand, to order (income when invoiced/paid).

Wholesale

Business buyers who resell your products under your brand — shops, pharmacies, distributors. They pay you on invoice; income counts when you invoice. Quotes & invoices are managed in Sales.

Invoiced
this period
Unpaid
owed to you
Active accounts
with activity
Pipeline
expected value
Business customers
AccountContactStageQuotesInvoicedUnpaidExpectedNext follow-upOwnerStatus

Tap a row to edit. These accounts are shared with the Sales page — changes here show there too.

Wholesale is your product sold under your own brand to a business that resells it. Different from white-label (their brand) and consignment (still your stock until sold). Income counts when you invoice.

Consignment

Products placed in partner stores (rdna and others). They stay yours until the store sells them — separate from your website and wholesale sales.

ℹ Stock here has left your lab but isn't sold yet — it still belongs to you. A sale (and your income) only counts when the store sells a unit. Unsold units can come back.
Units out now
unsold · still yours
Your stock out
at your cost
Sold
units to date
Owed to you
sold units + open invoices
What's out on consignment
PartnerProductSentSoldReturnedStill thereRetailStore's cutYou get / unit

"You get / unit" is what reaches you after the store's cut. The cut is a placeholder and is fully editable per row (tap a row).

How consignment payment works

Set how each store gets paid. This tracker supports any of these — just set the "cut" accordingly:

Commission % — the store keeps a share of each sale (set the cut as a %).
Fixed transfer price — you're paid a set amount; the store marks it up (set the cut to the gap between retail and your price).
Flat shelf fee — the store pays nothing per unit; record the fee separately as a bill (set cut to 0%).

rdna is your sister company — keeping consignment clean and at arm's length keeps every partner's books tidy.

Quality & compliance

Track each batch you make — when it was made, when it expires, how much is left — and keep your regulatory obligations (registrations, safety tests, labelling, audits) on a calendar so nothing lapses. Especially important for baby and cosmetic products.

White-label

When you make products that another business sells under their brand — hotels, spas, salons, other retailers. Different from wholesale (their brand, not yours) and from consignment (they pay outright, not on commission). White-label orders are made-to-order; they don't draw from your retail stock.

Active clients
0
Open projects
0
Units committed · next 60d
0
Revenue this period
EGP 0
Clients
Projects · pipeline
Capacity at a glancewhite-label vs lab capacity

Follow-ups

Two kinds of follow-up in one place. Leads — people who asked to join the community (via the website form or added by you) that you want to nurture and convert. Customers — after every website order, a planned message, email, WhatsApp, or call to ask "how is it?", capture feedback, and earn a review.

Leads · loading…
NamePhoneEmailSourceStatus
Sign in to load leads…

These are the leads captured by your website's sign-up form — live from the same database.

Customer reviews · loading…
CustomerRatingReviewSourceStatus
Sign in to load reviews…

Log the feedback you earn from follow-ups. Set a review to Published once it's live on your site.

Due today
0
Overdue
0
Upcoming · next 14d
0
Done this period
0
Pending follow-ups sorted by due date
Completedfeedback captured

Follow-ups will be created automatically for delivered website orders once the website is connected to the database. You can also add one manually for any customer.

Documents

Your legal and business documents in one place — and a one-tap way to share a pack with a business customer (vendor onboarding, wholesale setup, tenders).

Documents
Need renewal
expiring / expired
Shared this period
with businesses
Documents
DocumentTypeRenewalStatusShareable

“Shareable” marks which documents go into the pack you send to businesses. Documents with a renewal date are flagged before they expire.

Shared with businesses
DateBusinessDocumentsLink

Sharing creates a private link to your shareable documents that you can send the business. In the live system the link can expire and be revoked.

Marketing

Social accounts, website analytics, content planning, ads, and customer conversations in one place.

Campaigns · loading…
NamePlatformObjectiveBudgetSpendStatus
Sign in to load campaigns…

Stock

Suggested purchase orders · loading…

Covers anything below its reorder point or short for the open production orders. Suggested quantity = reorder buffer + open-order demand − on hand, rounded up to MOQ. Drafts open under Purchase orders for review.

MaterialOn handReorder ptOpen ordersSuggest qtyEst. costWhy
Sign in to load suggestions…
Materials & inventory · loading…
PhotoMaterialCategoryOn handAvailableCost/unitMOQValueStatusActions
Sign in to load materials…
Stock value — where it sits · live
MaterialOn handUnitCost/unitValue
Sign in to load stock value…
Total

Stock updates by itself every time something is produced, packaged, or sold — so it's always accurate. Best not to edit it by hand. Capture snapshot

Total stock value
raw materials on hand
Raw materials & packaging
Finished goods
Record what you make and pack

Liquid (bulk) is what you mix in tanks before bottling — it can't be sold yet. Units are finished bottles ready to sell. You make liquid first, then package it into units.

Dish Cleanser — liquid
1,750 ml
Dish Cleanser — bottles
3
Can package now
+2
Stock movement history
WhenMaterialChangeReasonReferenceBy
Sign in to load stock movements…
Finished goods — liquid & bottled
Current stock levels
CodeMaterialCategoryStockMinBest priceSuppliers (cost)Status
Where the value sits
By category
Value by material
MaterialQtyCost/uValueShare
Total
Finished goods value
ProductUnits on handUnit costTotal value
Total
History & admin
Stock value over time
Stock adjustments — lab requests, owner approves
Labels & packaging designs

Raw value uses each material's current price per unit; finished‑goods value uses each product's costed unit cost. Quantities derive from movements, never edited directly.

🕘 Change history — every stock & purchasing change, newest first

Loading history…

Production opportunities

✨ Production opportunities — what your stock can unlock right now

Reads your current raw & packaging stock and tells you what you can make today — first with zero spend, then the cheapest buys that unlock the most output. Each product is judged on its own (they share stock, so making one reduces the others).

Sign in to scan production opportunities…

Purchasing
Purchase orders by production plan and supplier — what to buy, from whom, and how much it costs.
Spend on order
Spend on order, by period · live
Sign in to load purchase orders…
Purchasing
Purchasing · what to buy & your purchase orders · live
Still to buy across all plans — by supplier (tap to expand)
Sign in to load purchase orders…
Purchase orders — by plan & supplier · live
Sign in to load purchase orders…
Add a purchase order · loading…

Workflow: when you add a production order needing materials you\u2019re short on, a Draft purchase order is created automatically \u2014 one per supplier. Edit it (supplier + items) → owner Approves or Rejects → once approved, Download to send the supplier and Receive to log stock and post the bill to Finance. Rejecting an order stops it being re-ordered automatically.

PO settings
Next will look like
Suppliers
Suppliers · loading…
NameSuppliesContactPhoneEmailLead time
Sign in to load suppliers…

People & HR

Assign each person to a department. As owner, you can change roles; access updates everywhere instantly.

PersonRolesStatus
People & access · loading…

First create the person's login in Supabase → Authentication → Add user. Then assign their role here by the same email — they'll see only their area next time they sign in.

Roles (tick one or more)
EmailRoles
Sign in as owner to manage people…
Role access · tick which sections each role can see

Sign in as owner to manage role access…

Each person's menu is limited to the sections ticked for their role. Owner / Admin always sees everything. This controls what people see; deeper database-level locks can be added later.

My space

My space

Working hours (mo)
— h
Absences
0
Late check-ins
0
Early check-outs
0
📊 My month — hours, pay & targets

Sign in to see your month…

📅 My day & tasks

Loading your tasks…

Annual leave balance
18
days remaining
3 used of 21
Today
Not checked in yet.
Check-in
Check-out
Worked today

A daily report is required before checking out. The system will ask for it if you try to leave without one.

Requests

Time off must be requested at least 3 days ahead. Salary advances: from the middle of the month (day 16) through month-end, once per month.

Mentions for you
Past daily reports

Admin & Settings

Company settings, users & roles, integrations, document numbering, and the audit log. Owner / Admin only.

Data backup
Download every business table — orders, invoices, stock, payroll — as one Excel workbook.
Company profile

Company name and tax details are also used in Finance → Tax & Invoice Setup. Editing here updates both.

Admin & Settings is the system-level configuration page. Day-to-day work lives in the other pages.

Deployment plan

From polished prototype to a fully integrated production system. Starting point: betnacare.com is live on Supabase with orders, coupons, inventory, analytics_events, product_overrides, plus Paymob (paymob-create-intention) and Resend (send-order-emails) Edge Functions, plus CallMeBot WhatsApp pings. The plan below closes the remaining gaps.

🚀 Version & publishingchecking…
App version
v1.0
Running from
Database
Supabase
How to publish an update to the team
  1. Get the newest index.html file (the latest build).
  2. Go to app.netlify.com → your betna-lab-os site → Deploys.
  3. Drag the new file onto the "Drag and drop your site output folder here" area.
  4. Wait for "Published", then refresh — everyone on the live link gets the update.

The database (logins, attendance, tasks, formulas, etc.) is shared and always live — only the app screens themselves need re-publishing when they change. The build roadmap below shows what's left to connect.

What needs to happen next
StatusAreaWhat & howTime

Your website is live and selling. This list shows what's left to build so Lab OS connects to it fully. Filter by phase to focus on one area at a time.

Calendar time
10–12 weeks
end-to-end with all integrations live
Dev effort
~25 days
~5 working weeks of focused build
Phases
6
Foundation → ETA
Tasks
22
incl. 6 third-party approval waits
Gantt — 12 weekssolid bars = active dev · hatched bars = third-party approval wait
w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 1 · Foundation weeks 1–2 Migrate admin to Supabase Auth Add ERP tables (additive) Set RLS on new ERP tables Reconcile orders schema 2 · Connect Lab OS to site weeks 2–4 Lab OS → same Supabase Delete web admin, slim the site Make Stock source of truth Realtime orders → Lab OS Sales GA4: gtag.js + Data API wiring 3 · Close the order loop weeks 3–5 Paymob payment webhook Reconcile Paymob fees & net Bosta signup (wait) Bosta shipment + tracking 4 · Customer comms weeks 4–7 Invoice PDF via Resend WhatsApp Cloud API (wait) Route inbound WhatsApp → Inbox 5 · Social weeks 5–10 Meta App Review (wait) Convert IG to Business (5 min) Sync Meta Ads spend → Lab OS TikTok Content API (wait) 6 · Tax / ETA weeks 8–12 ETA portal registration (wait) Build ETA submission flow
Milestones
By end ofWhat's liveWhy it matters
Week 2Lab OS connected to the same Supabase as betnacare.com · RLS on all ERP tables · admin moved off hardcoded passwordLab OS becomes safe to open internally. Orders stream into Sales in real time. ERP data can't leak through the anon key anymore.
Week 5Paymob auto-marks orders paid · Bosta labels & tracking · invoice PDFs going out by emailThe order loop is closed end-to-end. Owner stops chasing payments and shipments manually.
Week 7WhatsApp Business inbox live in MarketingReplaces CallMeBot one-way pings with real two-way customer messaging in one place.
Week 10Meta & TikTok publishing live · Meta Ads spend syncs into Marketing → AdsMarketing operations move out of phone apps and into Lab OS. Real ROAS instead of guesses.
Week 12ETA e-invoicing liveCan issue official B2B invoices that comply with Egypt tax requirements.
What's already in placelive on betnacare.com
Supabase — project qedauewjqivlwttgvoyd live; orders, coupons, inventory, analytics_events, product_overrides in production use
Paymob payment initiation — paymob-create-intention Edge Function deployed
Transactional email — send-order-emails Edge Function with RESEND_API_KEY held server-side
Order ping to owner — CallMeBot WhatsApp ping wired (one-way notifications only)
Custom analytics — pageview events captured in analytics_events
Product editing — product_overrides table for price/copy changes without redeploy
Coupons — coupons table with code-based discount logic
What's missingto build
Lab OS ERP schema — R&D trials, production orders, batches, ledger, bills, payroll
RLS policies — ERP tables would leak through publishable key without them
Auth — hardcoded ADMIN_PASS is the biggest security gap
Paymob webhook — order status doesn't auto-flip to paid today
Bosta shipping — no integration; labels likely manual
Invoice PDFs — emails go out, but no attached invoice
Real WhatsApp Business API — only one-way CallMeBot today
Meta & TikTok APIs — manual posting today
ETA e-invoicing — no government tax submission flow
Phase 1 — Foundationweeks 1–2 · ~4 dev days
Lab OS connects to the same Supabase project as the site. The existing site tables (orders, coupons, inventory, analytics_events, product_overrides) stay exactly as they are — every migration is additive. New tables are added for ERP modules (trials, production orders, batches, ledger, bills, payroll). RLS is enabled on every new ERP table with policies keyed on auth role; site tables can keep their current anon read access. The hardcoded ADMIN_PASS in client JS is replaced with a real Supabase Auth user, since publishing a password in static HTML is the project's biggest security gap.

End state: Lab OS reads real live data from betnacare.com, can't be opened by anyone without a real account, and ERP data can't be scraped through the publishable key.

Phase 2 — Connect Lab OS to siteweeks 2–4 · ~4 dev days
The website admin moves into Lab OS. Today, prices, coupons, and store settings are managed from a hidden admin page bundled inside betnacare.com — which also exposes the admin password in the public site code. Instead, Lab OS becomes the single control panel: a Storefront page writes prices, coupons, and settings to Supabase, and the website simply reads those values to display the shop. The website becomes display-only (lighter and faster), and its admin code is removed. Stock also becomes the source of truth: a Supabase view exposes finished-goods stock minus reservations, the site reads it on each page load, and out-of-stock products disable Add to cart automatically. New orders flow into Lab OS Sales the moment they're placed. Google Analytics is optional alongside the existing tracking; if added, it brings channel mix and conversion data into Marketing.

End state: Lab OS is internally useful. The team can run daily operations out of it without touching the site admin for ops work.

Phase 3 — Close the order loopweeks 3–5 · ~3 dev days + Bosta wait
The paymob-create-intention Edge Function already exists; the missing piece is the webhook that fires on payment success. A new paymob-webhook Edge Function verifies the HMAC, sets orders.pay = 'paid', writes the Paymob fee and net amount, and posts to Finance. Bosta business signup runs in parallel during the wait (typically 2–3 days for Egypt business verification). Once approved, a bosta-create-shipment Edge Function is called from Lab OS Sales, and a delivery webhook updates the order status through Picked up → In transit → Delivered.

End state: The owner stops manually reconciling payments and shipments. Orders move through the full lifecycle on their own.

Phase 4 — Customer commsweeks 4–7 · ~4 dev days + WhatsApp wait
The send-order-emails Edge Function already sends order confirmations via Resend with the API key held server-side. The gap is invoice attachments — extend the function with Puppeteer or React Email to generate a PDF invoice and attach it. WhatsApp Business Cloud API replaces CallMeBot's one-way owner pings with real two-way messaging: customer replies route into Marketing → Inbox via a webhook, and outbound message templates send order updates. The WhatsApp business verification with Meta takes 1–2 weeks of calendar time, but the dev work afterward is fast.

End state: Customers receive proper invoiced receipts. The owner answers customer messages from one inbox instead of switching between phone and Instagram.

Phase 5 — Socialweeks 5–10 · ~3 dev days + Meta/TikTok waits
Meta App Review takes 1–4 weeks of calendar time and runs in parallel with everything else. The trivial first step is converting @ph9.egypt Instagram to a Business account — required for API access. TikTok Content Posting API approval is similar in shape (1–2 weeks). Once approved, the Marketing API pulls daily campaign spend and results into Marketing → Ads, replacing the current manual entry with live ROAS calculations.

End state: Marketing operations move out of phone apps. Real ad performance numbers feed the Owner Dashboard.

Phase 6 — Tax / ETAweeks 8–12 · ~4 dev days + ETA registration wait
Registration on the Egyptian Tax Authority portal requires the tax registration number and takes 1–2 weeks of calendar time. Once issued, an ETA issuer ID lets you sign and submit B2B invoices through the official channel. The submission flow uses the ETA SDK with a signing token (USB or cloud HSM). Status updates from ETA come back via webhook and write into Finance → Tax & Invoice Setup.

End state: Official tax-compliant B2B invoices issued from Lab OS without leaving the app.

Critical path
Three things must happen in order; everything else can run in parallel:
  1. Auth migration → RLS → Lab OS connection (weeks 1–2). Without this, Lab OS can't safely read ERP data and the hardcoded admin password remains a liability.
  2. Paymob webhook → automated order paid status (week 4). Without this, every payment needs manual reconciliation in Finance.
  3. Bosta business signup → label flow (weeks 3–5). The signup approval blocks the dev work, which blocks closing the fulfillment loop.

If the WhatsApp, Meta, and TikTok applications are submitted in week 4 instead of waiting, the whole timeline holds at 10–12 weeks. If those applications slip to week 7, the project extends to roughly week 14.

The Action Center on the Owner Dashboard mirrors this plan as a live work queue. Each row links to the Lab OS page that integration will land in.

C

Betna Lab OS

The internal operating system for the Betna lab — inventory, formulas, production, capacity, procurement, finance and people, with a smart-insights advisor watching for issues. This is an interactive preview with sample data.

Try: Receive a PO · toggle an ingredient inactive on Raw materials · Draft PO from the dashboard's sourcing list · Check in on My space.

Preview only · the deployable app is the Next.js + Supabase codebase