How coopjr/redash works
Project type and purpose
• This is a full-stack, open-source data analytics and visualization platform (Redash).
• Frontend: Single-Page Application (React, Redux, LESS, Webpack) in client/ and shared viz components in viz-lib/.
• Backend: Python Flask app with REST API, authentication, scheduled tasks, and a plugin architecture for data-source connectors.
• Background workers: RQ-driven jobs for query execution, scheduling, and alerts.
• Persistence: Relational database (PostgreSQL via SQLAlchemy/Alembic migrations) and Redis as broker/cache.
• External integrations: SMTP/email, OAuth providers, third-party messaging/webhooks, and 35+ data sources via pluggable query runners.
File structure
• Top-level:
• client/ – React UI, Cypress tests, build configs.
• viz-lib/ – Shared visualization library.
• redash/ – Flask app (handlers, models, query runners, tasks, serializers, settings).
• migrations/ – Alembic scripts for DB schema evolution.
• manage.py, wsgi.py – CLI entrypoint and WSGI server loader.
• Dockerfile, docker-compose.yml, .ci/ – Containerization and CI pipeline.
• Patterns & Components:
• MVC/API pattern in Flask: handlers/ (controllers) → models/ → DB.
• Plugin architecture: redash/query_runner/ modules loaded dynamically.
• Task queue: redash/tasks/ invoked by RQ workers (redash/worker.py).
• Configuration-driven: redash/settings/ and dynamic settings loader.
README for additional insights
• Confirms browser-based SPA, REST API covering all UI actions, scheduling, alerts, pluggable data sources.
• Highlights ease of setup, supported data sources, and use cases (visualizations, dashboards, sharing, alerts).
Elements
– Labels: each component (e.g., “Flask API”, “RQ Worker”, “PostgreSQL”)
• Blue for user-facing components (Browser, SPA)
• Green for data stores (Postgres, Redis)
• Orange for compute/processing (API server, Workers)
Detail
– Capture every essential piece: static asset build → served by web server → API → queue → worker → external DS → DB → API → SPA.
– Don’t overthink—split into as many logical components as needed to reflect real deployment.