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

Project Overview

Just a random Taho

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

LayerChoicesRationale
FrameworkNext.js 15 (App Router)File‑based routing, API routes, built‑in ISR.
UI & StylingTailwind CSS for primitives • shadcn/ui for composables • styled‑components for custom widgetsBalances speed (utility classes) with design consistency and theming.
State & LogicReact context + custom hooksKeeps the global slider state decoupled from UI.
Core EnginePriceGenie TypeScript classEncapsulates all pricing math, enums, and simulation logic.
PersistenceEncrypted .zworld JSON filesOffline version control & user privacy.
ExportReact PDFOne‑click, print‑ready summaries.

Price Genie Wireframe

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

PriceGenie Class Constructor

I coded the entire PriceGenie class myself. Key elements:

PriceGenie interfaces

  • Strong typing – enums (PricingType, OPEXType, CAPEXType, etc.) and interfaces ensure compile‑time safety.

Preview of computeCostingBreakdown() method

  • Four primary methods
    computeCostingBreakdown()computeTargetProfitMargin()simulate()exportEncrypted()

  • Simulation multipliers – Global (srp, totalSupply) + per‑item (unitPrice, quantity).

Preview of getMostExpensiveCostItem() method

  • Utility helpersgetMostExpensiveCostItem() 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

Price Genie Demo Preview

Genie Mode Toggle

To activate them, users flip the Genie Mode toggle. From there, every change is debounced and rendered instantaneously.

  1. Global Total Supply – Scales projected output; triggers factor‑based recalculation.

  2. Global SRP – Adjusts selling price; propagates to revenue and margin immediately.

  3. Per‑Item Unit Price – Models supplier price swings without editing the base cost table.

  4. 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:

Projected vs Optimized Profit Margin

  • Target vs. Projected Profit Margin – Highlights gaps in desired vs. actual returns.

Key Insight Preview

  • 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

My LinkedIn Banner

Follow Me on LinkedIn

0
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.