How cybodexx/filesharebot works
Purpose and Shape
This is a mixed React/TypeScript frontend and Python backend repository for an authenticated creator/commerce-style application. It includes HTML views for dashboard, earnings, playlists, files, profile, wallet, and upload flows, plus integrations with Whop, Shopify, Telegram, and likely Replit-managed auth/deployment.
Entry Points and Runtime Boundary
The frontend has multiple likely bootstraps: main/index.tsx, main/main.tsx, and main/App.tsx; Vite configuration is in main/vite.config.ts. The Python service entry point is main/app.py, with production process declaration in main/Procfile and dependencies in main/requirements.txt. main/render.yaml indicates Render deployment support.
Backend Application and Routing
Python routes appear separated into application routing and authentication concerns:
• main/app.py
• main/routes.py
• main/auth_routes.py
main/auth.py likely supplies identity/session logic consumed by protected route handlers. HTML documents such as main/dashboard.html, main/earnings.html, and main/login.html suggest the backend may directly serve server-rendered or static page shells alongside API behavior.
Persistence and Configuration
Database access is centralized at main/database.py, with settings/environment loading in main/config.py and main/config.env. The .env.example file documents required deployment configuration. This is the primary boundary for credentials, database connectivity, and provider keys:
• main/database.py
• main/config.py
• main/.env.example
Frontend Composition and Design System
The UI is built from a local component library rather than a conventional src/ hierarchy. Application screens compose reusable primitives such as dialogs, navigation, tables, charts, forms, and sidebar controls. Key composition and design-system locations are:
• main/App.tsx
• main/DesignSystemBrowser.tsx
• main/registry.tsx
Styling/token infrastructure is shared through main/index.css, main/tokens.json, and main/tokens.tsx.
Media/Slide Rendering Pipeline
A distinct TypeScript rendering subsystem models slide-based/video artifacts. It loads a manifest, validates schemas/layouts, renders slide content, and supports runtime hot reload:
• main/slideLoader.ts
• main/slidesManifest.ts
• main/render.tsx
Related control points include main/sdmRuntime.ts, main/sdmValidation.ts, main/validate-slides.ts, and main/slides-manifest.json. This subsystem is architecturally separate from the core dashboard UI and may produce video or presentation assets.
External Services and Integrations
Commerce/platform access is encapsulated in provider-specific clients:
• Whop: main/whop-client.ts, main/whop-api.mjs, main/whop-mcp.mjs
• Shopify: main/shopifyStorefrontClient.ts, main/shopify-admin-api.mjs
• Telegram: main/telegram.py
These should remain behind provider adapters so frontend screens and core routes do not directly own API credentials or provider protocol details. Provider documentation files indicate additional planned/optional AI, media, scraping, and content-generation integrations.
Primary Control Flow
A request enters the Python process (app.py), passes through auth/session handling (auth.py, auth_routes.py), then routes to page/API handlers (routes.py) and persistence (database.py) or provider adapters. Browser-facing React/Vite entry points mount application UI and reusable controls. Separately, slide manifests flow through loader/validation/runtime modules into React-based rendering, with generated media artifacts kept distinct from user/account and commerce operations.
Main entry points: routes.py Application routes · config.py Service configuration · registry.tsx Component registry · app.py Python application
Components 20
React Frontend
- Vite bootstraps · Browser entry points and Vite setup.
main/index.tsx - Application UI
main/App.tsx - Component registry
main/registry.tsx - Design system browser
main/DesignSystemBrowser.tsx - Design tokens
main/tokens.tsx
Python Service
- Python application
main/app.py - Authentication
main/auth.py - Auth routes
main/auth_routes.py - Application routes · Serves application pages and API behavior.
main/routes.py - Database access
main/database.py - Service configuration · Loads database and provider credentials.
main/config.py - HTML page shells
main/dashboard.html
Slide Rendering
- Slide manifest
main/slides-manifest.json - Slide loader
main/slideLoader.ts - Slide validation
main/sdmValidation.ts - Slide runtime
main/sdmRuntime.ts - Slide renderer · Renders slide-based media artifacts.
main/render.tsx
Provider Adapters
- Whop client
main/whop-client.ts - Shopify storefront client
main/shopifyStorefrontClient.ts - Telegram adapter
main/telegram.py
Connections 20
- Vite bootstraps → Application UI: mounts
- Application UI → Component registry: composes
- Design system browser → Component registry: browses
- Component registry → Design tokens: uses
- Python application → Auth routes: registers
- Python application → Application routes: dispatches to
- Auth routes → Authentication: uses
- Application routes → Authentication: protects with
- Application routes → Database access: reads and writes
- Application routes → HTML page shells: serves
- Service configuration → Database access: configures
- Service configuration → Whop client: supplies credentials
- Service configuration → Shopify storefront client: supplies credentials
- Application routes → Whop client: uses
- Application routes → Shopify storefront client: uses
- Application routes → Telegram adapter: uses
- Slide manifest → Slide loader: defines slides for
- Slide loader → Slide validation: validates
- Slide validation → Slide runtime: enables
- Slide runtime → Slide renderer: drives