How vamshi-glex/share_hub works
Clonecat is a Flask app for opening named, shared text pages that expire after two days. A visitor enters a page name, then the page route finds or creates the page and renders it; the creator receives an owner cookie. Users can edit page text through an API, while owners can manage access by locking or unlocking edits. Page data is persisted through Flask-SQLAlchemy. The graph reflects the sampled routes and source; page templates and static assets are included from the tree, but their internal behavior was not inspected.
Main entry points: pages.py Page routes · models.py Page model · extensions.py Database extension · app.py App setup
Components 14
Web interface
- App setup
app.py - App config
config.py - Name validation
static/script.js - Home page
templates/index.html - Page view
templates/page.html - Management view
templates/manage.html - Info and error views
templates
Page workflows
- Page routes
routes/pages.py - Page lookup and creation
services/page_service.py - Owner authorization
services/page_service.py
Persistence
- Page model
models.py - Database extension
extensions.py - SQL database
Other components
- Visitor
Connections 21
- Visitor → Name validation: enters name
static/script.js - Name validation → Page routes: navigates to
static/script.js - Visitor → Page routes: requests page
routes/pages.py - App setup → App config: loads config
app.py - App setup → Database extension: initializes
app.py - App setup → Page routes: registers routes
app.py - App setup → Page model: creates tables
app.py - Page routes → Page lookup and creation: looks up or creates
routes/pages.py - Page routes → Owner authorization: checks ownership
routes/pages.py - Page routes → Page model: deletes expired page
routes/pages.py - Page routes → Page model: updates page fields
routes/pages.py - Page routes → Database extension: commits changes
routes/pages.py - Page lookup and creation → Page model: queries and creates
services/page_service.py - Page lookup and creation → Database extension: persists page
services/page_service.py - Owner authorization → Page model: checks token hash
services/page_service.py - Page model → Database extension: uses ORM
models.py - Database extension → SQL database: stores records
- Page routes → Home page: renders
routes/pages.py - Page routes → Page view: renders
routes/pages.py - Page routes → Management view: renders
routes/pages.py - Page routes → Info and error views: renders
routes/pages.py