@startuml source-organization skinparam backgroundColor white skinparam packageStyle rectangle title SmartTools Source Code Organization package "src/smarttools/" { package "CLI Core" { [cli.py] as CLI [tool.py] as Tool [runner.py] as Runner [providers.py] as Providers [config.py] as Config [manifest.py] as Manifest } package "Registry API" { [registry/app.py] as RegApp [registry/db.py] as RegDB [registry/rate_limit.py] as RateLimit [registry/sync.py] as Sync [registry/categorize.py] as Cat [registry/similarity.py] as Sim } package "Web UI" { [web/app.py] as WebApp [web/routes.py] as Routes [web/auth.py] as Auth [web/sessions.py] as Sessions [web/docs_content.py] as Docs [web/seo.py] as SEO [web/filters.py] as Filters } package "Client" { [registry_client.py] as Client [resolver.py] as Resolver } package "TUI" { [ui.py] as UI [ui_urwid.py] as Urwid [ui_snack.py] as Snack } } package "web/templates/" { [base.html] as Base [home.html] as Home [tools/*.html] as ToolsT [docs/*.html] as DocsT [auth/*.html] as AuthT [dashboard/*.html] as DashT } package "web/static/" { [css/output.css] as CSS [robots.txt] as Robots } CLI --> Tool : loads CLI --> Runner : executes Runner --> Providers : calls AI Runner --> Tool : reads steps WebApp --> Routes : registers Routes --> RegDB : queries Routes --> Auth : authenticates Routes --> Sessions : manages Client --> RegApp : REST API RegApp --> RegDB : database ops RegApp --> RateLimit : enforces note right of CLI Entry point for smarttools command end note note right of RegApp Flask API for tool registry end note note right of WebApp Flask web app with Sentry end note @enduml