OpenEC UI
Web Dashboard for OpenEC - Ecommerce & Retail Analytics
OpenEC UI is a React-based web dashboard that provides interactive visualizations and data tables for the OpenEC analytics platform. Install it with pip, run one command, and access a full analytics dashboard in your browser.
Prerequisites
- Python 3.9 - 3.12
- openec (
pip install openec) - the core analytics engine (installed automatically as a dependency)
Installation
pip install openec-ui
This installs the dashboard along with all dependencies including openec, uvicorn, typer, and rich.
Quick Start
# Start the dashboard (default: http://0.0.0.0:6900)
openec-ui
# Custom host and port
openec-ui --host 127.0.0.1 --port 8080
Open your browser to http://localhost:6900 to access the dashboard.
Dashboard Pages
| Page | Route | Description |
|---|---|---|
| Overview | / |
KPI summary, revenue trends, sales by category, marketing spend vs revenue, inventory status |
| Products | /products |
Product performance, daily units sold, revenue by product, sales data table |
| Orders | /orders |
Order metrics, revenue trends, average order value, cancellations and returns |
| Customers | /customers |
Customer segmentation, RFM analysis, segment distribution |
| Inventory | /inventory |
Stock levels by warehouse, low stock alerts, inventory status breakdown |
| Marketing | /marketing |
Campaign performance, spend vs revenue, ROAS by channel |
| Analytics | /analytics |
Conversion funnel, daily visitors trend, funnel stage analysis |
| Pricing | /pricing |
Competitor price comparison, price difference distribution, stock tracking |
How It Works
OpenEC UI bundles a pre-built React single-page application (SPA) inside the pip package. When you run openec-ui, it starts a FastAPI server that:
- Serves the React dashboard at the root URL (
/) - Mounts the OpenEC API at
/apiso the frontend can fetch analytics data - Provides Swagger docs at
/docsfor API exploration
The dashboard fetches data from the OpenEC API using the provider system. By default, the built-in demo provider returns mock data so you can explore the dashboard immediately without any external API keys or data sources.
Browser (React SPA)
|
|--> GET /api/api/v1/sales/historical?provider=demo
|--> GET /api/api/v1/orders/summary?provider=demo
|--> GET /api/api/v1/campaigns/performance?provider=demo
|
FastAPI Server (openec-ui)
|
|--> OpenEC Core (command runner + router + providers)
Using Custom Providers
If you have custom OpenEC providers installed (e.g., Shopify, Amazon, WooCommerce), you can switch providers directly from the dashboard using the provider selector in the header.
# Install a custom provider
pip install openec-provider-shopify
# Start the dashboard - your provider will appear in the dropdown
openec-ui
API Documentation
While the dashboard is running, access the interactive API docs:
- Swagger UI:
http://localhost:6900/docs - All endpoints:
http://localhost:6900/api/docs
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript 5 |
| Build Tool | Vite 5 |
| Charts | Chart.js 4 + react-chartjs-2 |
| Styling | Tailwind CSS 3 |
| Icons | Lucide React |
| Routing | React Router 6 |
| Backend | FastAPI + Uvicorn |
| CLI | Typer + Rich |
Development
To modify the frontend and rebuild:
# Clone the repo
git clone https://github.com/bankyresearch/OpenEC.git
cd OpenEC/openec-ui/frontend
# Install dependencies
npm install
# Dev server (with hot reload, proxies API to localhost:6900)
npm run dev
# Production build (outputs to ../openec_ui/static/)
npm run build
For frontend development, run the OpenEC API server separately:
# Terminal 1: Start the backend API
openec api
# Terminal 2: Start Vite dev server (auto-proxies to backend)
cd openec-ui/frontend && npm run dev
License
AGPL-3.0
Metadata
Release files for openec-ui 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openec_ui-0.1.1.tar.gz | 142.5 kB | Without provenance | Details for openec_ui-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openec_ui-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for openec_ui-0.1.1-py3-none-any.whl |
Total release size: 285.5 kB
Release files / openec_ui-0.1.1.tar.gz
| Download URL | openec_ui-0.1.1.tar.gz |
|---|---|
| Size | 142.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76112382d62ab41126a90bf0fbc4c6e1ed419b1fecd71863fc3836825798afaf
|
|
BLAKE2b-256 checksum How to use checksums |
ffe7544c99d4ec8c951d0ce99087d8d459b8327da3bf6ff4ce3e25893d3223a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / openec_ui-0.1.1-py3-none-any.whl
| Download URL | openec_ui-0.1.1-py3-none-any.whl |
|---|---|
| Size | 143.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d58533acec7656e96718f40c44ea4763d8016a499f395b55297c10ae449ec4c5
|
|
BLAKE2b-256 checksum How to use checksums |
7f570608b5cd4bab1174b24c49a416a36ce3bf0761017cbf6bdf53b2bf644918
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for openec-ui 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.