A full-stack, real-time simulation platform for customer operations teams. This project combines backend automation (FastAPI) and an interactive dashboard (Streamlit) to simulate rule-based portfolio operations, ticket handling, and performance analytics.
- Customer and Rule Simulation Engine
- Daily Rule Execution with Log Tracking
- Support Ticket Auto-Generation on Failure
- Status Update API for Ticket Management
- MySQL Database Integration
- Scheduled Background Tasks with APScheduler
- Dashboard for Executions, Tickets, and KPIs
- Filters by Customer Priority, Status, Name
- Success/Failure Bar Chart (Stacked Altair)
- Execution Trend Line Chart (Daily View)
- CSV Export for Reporting
- Summary Tables and Drilldowns
customer_ops_simulator/
├── main.py # FastAPI app entrypoint
├── db.py # MySQL connection handler
├── engine.py # Rule execution logic
├── scheduler.py # Background job scheduler
├── routers/ # FastAPI routes
│ ├── customers.py
│ ├── rules.py
│ ├── logs.py
│ └── tickets.py
├── dashboard/ # Streamlit app
│ └── dashboard.py
├── requirements.txt # Python dependencies
├── .gitignore # Ignore venv, cache, .env, etc
└── README.md # Project overview
- Backend: FastAPI, MySQL, SQLAlchemy
- Frontend: Streamlit, Altair, Pandas
- Scheduler: APScheduler
- Deployment: Render (or local via Uvicorn/Streamlit)
git clone https://github.com/yourusername/customer-ops-simulator.git
cd customer-ops-simulatorpython -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windowspip install -r requirements.txt- Ensure MySQL is running locally.
- Create database:
customer_ops_simulator - Update
db.pywith your DB credentials
uvicorn main:app --reloadstreamlit run dashboard/dashboard.py- Web Service 1 (FastAPI):
main.py - Web Service 2 (Streamlit):
dashboard/dashboard.py - Add
requirements.txt, set ports to 10000/10001 respectively
Displays the daily volume of rule executions. Highlights anomalies and trends in rule processing.
Stacked bar chart showing how each customer performed (green = success, red = failure).
Tabular view of execution metrics per customer including computed success rate.
Full audit trail of rule executions by customer with timestamps and statuses.
Filtered insights per customer using name search and drop-down filters.
- Execution logs are exportable as
.csv - Success/Failure summary available for reports
Sahran Altaf
Data Science & Robotics @ Symbiosis Institute of Technology
GitHub: DarSahran
MIT License. Free to use, improve, and distribute.




