Skip to content

Dependency Reduction & Decoupling #6237

@masenf

Description

@masenf

Tracking issue for reducing Reflex's dependency footprint and decoupling optional functionality into separate packages. The monorepo structure keeps everything in one repo for compatibility and testing, but each package is independently installable — users only pay for what they use.

Theme

Modularity. The core framework should be minimal. Everything else — component libraries, ORM integration, icon sets — lives in co-maintained packages that are optional at install time.

Scope

Remove Unsupported Pydantic v1 Hacks (ENG-9184)

Remove the framework's reliance on unsupported Pydantic v1 compatibility shims and internal API hacks. Move core internals to stdlib dataclasses. Pydantic (v2) remains fully supported for user State classes.

Remove SqlModel as Hard Dependency

Decouple SqlModel/SQLAlchemy/Alembic from core so users of other databases (Mongo, Supabase, etc.) skip unneeded dependencies. See ENG-9181 for what replaces rx.Model.

Remove JSON5 Dependency (#5820)

Monorepo Split (ENG-9185)

Split the reflex repo into separate pip distributions maintained in a single monorepo:

  • reflex-core — runtime, event system, compiler
  • reflex-html — base HTML elements with Tailwind support
  • reflex-radix — Radix Themes component library
  • reflex-lucide — Lucide icon set
  • reflex-orm — database/ORM functionality (see ENG-9181)

The monorepo structure means all packages are tested together and released in lockstep, but users only install the packages they need. The top-level reflex meta-package depends on all of them for backward compatibility.

Existing Issues

  • ENG-4952 — Reduce External Dependencies (high-level plan)
  • #5820 — Remove JSON5 dependency
  • ENG-4556 — Make reflex-hosting-cli optional

Related

  • ENG-9189 — Interoperability & Standardization (ASGI, pyproject.toml config)
  • ENG-9181 — Database & ORM Standardization (reflex-orm extraction)

Roadmap

Part of the Reflex Framework Roadmap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmaphttps://github.com/reflex-dev/reflex/issues/2727

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions