Price Genie: Inside the Engineering of a Free Pricing Simulator for Filipino MSMEs and Entrepreneurs


Project Overview
A casual conversation with a taho vendor who couldn’t accept GCash sparked a question: What if every micro‑vendor had access to a lightweight pricing sandbox? That question turned into wireframes in MS Paint, prototype logic in Notepad, and finally Price Genie — a free, browser‑based tool for Filipino MSMEs.
Tech Stack at a Glance
Layer | Choices | Rationale |
Framework | Next.js 15 (App Router) | File‑based routing, API routes, built‑in ISR. |
UI & Styling | Tailwind CSS for primitives • shadcn/ui for composables • styled‑components for custom widgets | Balances speed (utility classes) with design consistency and theming. |
State & Logic | React context + custom hooks | Keeps the global slider state decoupled from UI. |
Core Engine | PriceGenie TypeScript class | Encapsulates all pricing math, enums, and simulation logic. |
Persistence | Encrypted .zworld JSON files | Offline version control & user privacy. |
Export | React PDF | One‑click, print‑ready summaries. |
Why no database?
MVP latency trumps realtime sync. All data lives client‑side, encrypted, with optional file export. A serverless mode keeps infra bills at ₱0.
Anatomy of the PriceGenie
Core
I coded the entire PriceGenie
class myself. Key elements:
- Strong typing – enums (
PricingType
,OPEXType
,CAPEXType
, etc.) and interfaces ensure compile‑time safety.
Four primary methods
computeCostingBreakdown()
•computeTargetProfitMargin()
•simulate()
•exportEncrypted()
Simulation multipliers – Global (
srp
,totalSupply
) + per‑item (unitPrice
,quantity
).
- Utility helpers –
getMostExpensiveCostItem()
for instant cost‑optimization hints.
I chose a class over Redux to keep domain logic isolated and portable. The UI consumes pure functions; the core never touches React.
The Four Main Sliders
To activate them, users flip the Genie Mode toggle. From there, every change is debounced and rendered instantaneously.
Global Total Supply – Scales projected output; triggers factor‑based recalculation.
Global SRP – Adjusts selling price; propagates to revenue and margin immediately.
Per‑Item Unit Price – Models supplier price swings without editing the base cost table.
Per‑Item Quantity – Tests formulation tweaks or waste reduction scenarios.
File Import / Export Workflow
Export (.zworld) – Serializes the entire
PriceGenie
instance, AES‑256 encrypts, and attaches a version stamp.Import (.zworld) – Decrypts and hydrates state, zero copy.
PDF Export – Implemented using
@react-pdf/renderer
, the app transforms user data into a styled React component that mirrors the interface layout. This component is passed to a serverless function that renders and streams it as a downloadable PDF
Instant Insights
Each recalculation surfaces:
- Target vs. Projected Profit Margin – Highlights gaps in desired vs. actual returns.
- Most Expensive Cost Item – Name, share %, and a plain‑language suggestion to optimize or renegotiate.
Roadmap
Service‑Based Pricing – Extend the schema to duration‑based billing.
Flexible Pricing Models – Per‑unit, base + unit, fixed SRP.
AI‑Generated Insights – Serverless embeddings + cost data → actionable tips.
OPEX / CAPEX Input – Full P&L snapshots.
Tax‑Aware Mode – VAT, percentage tax, withholding.
Closing Thoughts
I built Price Genie to give micro‑entrepreneurs the same analytical firepower large firms enjoy, minus the complexity. If you’re a developer, investor, or potential partner interested in taking this further, let’s talk.
I am passionate about art, music, fashion, and technology. My curiosity and strong work ethic drive me to excel and innovate across multiple domains.
Let’s work! Your vision, my magic.
Email: business@thezelijah.world
Subscribe to my newsletter
Read articles from Josef Elijah Fabian directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Josef Elijah Fabian
Josef Elijah Fabian
Zelijah — born Josef Elijah Fabian — is a Filipino modern-day Renaissance man, a multi-disciplinary artist, entrepreneur, and creative technologist based in Metro Manila, Philippines. With over 11 years of experience since 2014, his dynamic career spans music, software engineering, 3D animation, game audio, branding, and visual storytelling. Known for fusing technical expertise with deeply emotional and cinematic expression, Zelijah bridges the worlds of art, sound, and technology—consistently pushing creative and cultural boundaries through visionary execution.