Hours
Months
Commits
Role

Mozhe Server Next
Multi-tenant AI billing, orchestration, and access control for e‑commerce organizations
Mozhe Server Next powers a multi-tenant e‑commerce platform where organizations share AI resources, subscriptions, and back offices across many sites.
markoradak/mozhe-server-next
Mozhe Server Next powers a multi-tenant e‑commerce platform where organizations share AI resources, subscriptions, and back offices across many sites. It solves the problem of turning messy, per-model token usage into clear, billable organization credits while keeping usage attributable at the site level. Merchants get AI-assisted page sections, catalog imports, and builder tooling, all tied into one subscription and invoicing system instead of a tangle of per-site plans and manual accounting. Under the hood, Mozhe Server Next uses a tRPC-based TypeScript backend as the single API surface for admin, site back offices, and automation. AI features are implemented as multi-agent workflows (using OpenAI, Anthropic, and Google Generative AI SDKs) where specialized agents design layout, imagery, and code, each reporting token usage into a centralized credit manager. A custom billing engine maps those tokens into org-level credits, schedules per-org billing days, applies proration and volume discounts, and prepares invoice data for PDF generation and Serbian fiscalization. Permissions are modeled as focused helpers that encode concrete rules across organizations, sites, partners, and affiliates, instead of a generic role matrix. Security and automation are first-class: cron-aware tRPC procedures inject a constrained SYSTEM session instead of relying on admin backdoors, and one-time, IP-bound tokens enable safe jumps between global admin and site back offices. AI-driven product import combines CSV parsing, chat guidance, multilingual entity creation, and image analysis with stepwise progress reporting, letting teams manage complex catalogs without fragile manual workflows.
Engineered organization-level subscription and AI credit accounting that converts per-model token usage into shared org credits with idempotent deductions, soft enforcement, and per-site attribution.
Built a multi-tenant billing engine that schedules per-organization billing days, handles proration and volume discounts, and generates consolidated invoices ready for PDF and Serbian fiscalization integration.
Orchestrated a multi-agent AI section generation workflow where specialized agents collaborate on layout, imagery, branding, and code, while aggregating token usage and streaming structured progress updates.
Created an AI-driven product import pipeline that ingests CSV and chat input, auto-creates multilingual catalog entities, resolves dependencies, analyzes images, and reports stepwise progress to users.
Implemented fuzzy natural-language context switching that maps user phrases to organizations or sites, validates permissions, and rewrites URLs to navigate securely without breaking dashboard routing.
Designed granular permission helpers across organizations, sites, partners, and affiliates, encoding complex admin and COD-edit rules into composable functions reused throughout dashboard CRUD handlers.
Developed a secure admin-site access system using one-time, IP-bound tokens and environment-aware URL construction to safely jump between global admin and per-site back offices.
Introduced cron-aware tRPC procedures that inject a constrained SYSTEM user session for scheduled jobs, enabling automation without generic admin backdoors or weakened authorization checks.
Mozhe provides a multi-tenant e-commerce platform that blends AI-assisted storefront building and catalog management with robust subscription billing for agencies and merchants managing many online shops.