Vladimir HlobchastyiSoftware Engineer
Back to work
Case Study
AI rescue / production refactor

Prepry AI

Full-stack education platform for clinical, academic and AI-driven workflows, brought from scattered AI output to production-ready architecture.

Role

Frontend Engineer

Focus

Architecture cleanup, RBAC, institution scope, route stability, legacy removal and production hardening.

Stack

React 19TypeScriptViteTanStack QueryReact RouterTailwind CSS 4SupabaseFirebase AuthFirebase FunctionsFastifyPrismaOpenAIAnthropicZodRadix UIshadcn/uiZustandSentry
Preview & Screenshots
01 / 04
Prepry AI — image 1
Prepry AI — image 2
Prepry AI — image 3
Prepry AI — image 4

Overview

Prepry is a large education platform for clinical, academic and AI-assisted workflows. The codebase spans a React frontend, backend services, serverless functions, Supabase/Postgres, Firebase Auth and multiple AI features. My work focused on turning an unstable AI-generated foundation into a maintainable product architecture.

Challenge

The main challenge was not adding a small feature, but rescuing a large codebase with scattered logic, duplicate legacy paths, inconsistent institution scope, broken routes and weak separation between domains. The platform needed real structural cleanup before it could be treated like production software.

Outcome

The result was a production-oriented refactor: clearer feature boundaries, safer access control, consistent tenant scoping, removed legacy dead ends, better data flow and a codebase that could actually be extended without compounding the earlier AI-generated mess.

Responsibilities

04 areas
01

Architecture rescue

Reworked scattered AI-generated code into clearer domain boundaries, reduced duplication and aligned the frontend with a predictable project structure.

02

RBAC and tenant scope

Audited and fixed role checks, institution-scoped data flow and route protection so selected institution data stayed isolated and predictable.

03

Legacy cleanup

Removed or planned removal of dead routes, legacy hooks, stale screens and mock data that were blocking production readiness.

04

AI feature hardening

Kept AI features usable while moving risky logic into safer backend boundaries and making the product easier to maintain.