# LOLE OS

> LOLE OS is a staff-only internal operating system for LOLE Boutique — Shopify commerce mirrors, inventory, customers, contribution reporting, AI-assisted workflows, and platform administration. Built as independent contractor client work by Andres Echeverria.

- HTML: https://estebanech.com/projects/lole-os
- Markdown: https://estebanech.com/projects/lole-os.md

## Building an Internal Commerce Operating System for LOLE Boutique

LOLE OS is a secure staff-only command center that brings Shopify commerce operations, inventory, customers, contribution reporting, AI-assisted workflows, and platform administration into one application. It is designed around a clear separation of responsibility: Shopify owns commerce truth, Supabase owns internal state and authorization, and LOLE OS owns staff workflows and business interpretation.

## Metadata

- Role: Freelance Software Engineer
- Client: LOLE Boutique
- Type: Independent Contractor
- Status: Completed Client Engagement
- Dates: July 2026
- Location: Remote
- Version: lole-os@0.1.0
- Delivered scope: Feature Freeze v1.0
- Repository: Private

## Overview

LOLE OS is a production-oriented internal business operating system built for LOLE Boutique staff. It is not a storefront, Shopify theme, Shopify Admin clone, or analytics dashboard — it is the operational layer where authorized staff manage commerce mirrors, inventory interpretation, customers, contribution reporting, platform health, and controlled AI workflows.

The platform was designed and developed as paid freelance independent contractor work. Platform access and ownership belong to the client. Andres Echeverria delivered the engineering as sole engineer: architecture, frontend, backend, database design, integrations, deployment planning, and technical documentation.

## Problem

Boutique retail operations often fragment across Shopify Admin, spreadsheets, social platforms, invoice inboxes, and ad-hoc messaging. Staff need a secure internal surface that interprets business reality without replacing Shopify as the commerce source of truth — and without exposing secrets or inventing financial KPIs through unconstrained AI.

The engineering question behind LOLE OS was:

> How do you build a staff-only operating system that mirrors Shopify commerce, enforces real authorization, keeps numbers deterministic, and adds AI only where extraction and interpretation help — without becoming a shadow storefront or an ungoverned chatbot?

## Solution

### Staff operating surfaces

Operational views for daily alerts, store management, inventory, contribution reporting, clients, collections, marketing, staff access, strategy, and platform settings — bilingual English/Spanish where staff workflows require it.

### Dual-source architecture

Shopify remains authoritative for products, inventory, orders, and customers. LOLE OS mirrors commerce data and adds internal operational context in Supabase without attempting to replace Shopify's responsibilities.

### Authorization and audit

Supabase Auth, PostgreSQL row-level security, server-side capability checks, role assignment RPCs, audit trails, and feature flags keep access and platform controls enforceable outside the browser.

### Synchronization and workers

Shopify Admin GraphQL sync with signed webhooks, deduplicated delivery processing, scheduled reconciliation, and a Railway background worker for products, orders, customers, Instagram analytics, reports, AI briefs, and platform health.

### Controlled AI subsystem

OpenAI powers grounded staff assistance, multimodal invoice intake with human review, and daily operational briefs based on precomputed metrics. Models extract or explain; they do not invent business KPIs.

## Capabilities

### Commerce operations

Staff workflows over mirrored Shopify products, inventory, orders, customers, fulfillment context, and contribution reporting.

### Role-based access

Staff roles including owner, engineer, developer, admin, and pending/customer resolved server-side with RLS and capability checks.

### Developer control portal

Platform health, integrations, jobs, webhooks, AI usage, feature flags, audit trails, and environment-presence diagnostics.

### Bilingual workflows

English and Spanish support via next-intl, stored locale preferences, and business-specific Latin American Spanish terminology.

### Invoice intake with review

Multimodal invoice extraction with staff review, inventory application, cost authorization, failure states, and reversible snapshots.

### Grounded operations assistant

A read-oriented staff assistant limited to a small number of tool rounds, backed by business tools rather than unconstrained freeform tool use.

### Daily operational briefs

Automated briefs based on precomputed metrics so models explain and summarize rather than invent KPIs.

### Shopify freshness

Signed webhooks plus scheduled reconciliation keep mirrors current while deduplicating delivery processing.

## Principles

### Shopify remains the commerce source of truth.

LOLE OS mirrors commerce data and adds internal operational context without attempting to replace Shopify's responsibility for products, inventory, orders, and customers.

### Supabase owns internal state.

Supabase stores authentication, staff profiles, role data, operational mirrors, alerts, reports, audit history, assistant threads, AI usage, feature flags, and invoice workflows.

### Server-side authorization.

Roles are resolved through authenticated server state. Client-supplied roles are never trusted.

### Deterministic numbers before AI.

Contribution, shipping absorption, stock logic, VIP classification, and operational metrics are computed in code. AI is used for extraction, summarization, and interpretation.

### Human approval for AI actions.

Invoice extraction does not directly mutate inventory without staff review and authorization. Invoice applications support reversible snapshots.

### Feature flags as platform controls.

AI, synchronization, reporting, commerce writes, and health checks can be disabled globally without redeploying the application. Kill switches are enforced in both UI and API routes.

### Secrets remain server-side.

Client interfaces may show whether an integration is configured, but never reveal secret values such as tokens or API keys.

## Highlights

- Product version: lole-os@0.1.0
- Delivered scope: Feature Freeze v1.0
- Supported languages: English and Spanish
- Staff roles: owner, engineer, developer, admin, pending/customer
- AI assistant limited to a maximum of three tool rounds
- Shopify freshness via webhooks plus scheduled reconciliation
- Background processing on a separate Railway worker
- Platform-wide AI kill switches in UI and API routes
- Invoice applications support reversible snapshots
- Dedicated developer control portal

## Technology

### Core application

- Next.js 16
- React 19
- TypeScript
- Node.js
- Tailwind CSS
- Zod

### Infrastructure and persistence

- Supabase Auth
- PostgreSQL
- Row-Level Security
- Supabase Storage
- Vercel
- Railway
- Docker

### Integrations

- Shopify Admin GraphQL
- Shopify Webhooks
- OpenAI
- Vercel AI SDK
- Google OAuth
- Instagram Graph API

### Product capabilities

- Server Actions
- Background Workers
- Webhooks
- Feature Flags
- Audit Logging
- Internationalization
- Role-Based Access Control

## Status

LOLE OS was delivered as a freelance independent contractor engagement in July 2026 at Feature Freeze v1.0 (lole-os@0.1.0).

The production repository remains private because it contains client configuration conventions, integration credentials handling, operational workflows, and internal business logic. A public case study describes architecture and engineering responsibility without exposing secrets, customer data, or confidential client strategy.

Built by Andres Echeverria for LOLE Boutique as freelance independent contractor work. Platform access and ownership belong to the client. This is not employment at LOLE Boutique.

## Next Steps

- Expand messaging integrations and operational alerts under existing authorization and feature-flag controls
- Continue hardening reconciliation and webhook failure diagnostics
- Deepen contribution and inventory reporting views using deterministic metric pipelines
- Improve operator documentation for bilingual staff workflows
- Iterate on AI brief quality while preserving deterministic KPI computation

Author: Andres Echeverria (estebanech)
