How slash217/ipo-alert works
IPO Alert monitors Sharesansar for open Nepalese IPOs, suppresses repeat notifications, and emails configured recipients. The main runtime is initiated by either the Python entry point or CLI, then coordinated by IPOAlert: fetch and parse the source, check notification history, send alerts, and persist successful notifications. CLI health, statistics, and cleanup operations are additional product branches. The README documents automated scheduling and monitoring; workflow internals beyond the sampled runtime are not expanded here.
Main entry points: main_app.py Alert coordinator · email_service.py Email service · database.py Notification history · cli.py CLI commands
Components 17
Entry points
- Python entry
main.py - CLI commands
cli.py
Alert workflow
- Alert coordinator
src/main_app.py - Configuration
src/config.py - IPO scraper
src/scraper.py - Fetched HTML
src/scraper.py - IPO model
src/models.py
Notification state
- Notification history
src/database.py - IPO history JSON
data/ipo_history.json - Notification record
src/models.py
Email delivery
- Email service
src/email_service.py - Gmail SMTP
- Resend API
Operations
- Logging
src/logger.py
Other components
- Operator
- Sharesansar
- Email recipients
Connections 30
- Operator → Python entry: runs
README.md - Operator → CLI commands: runs commands
README.md - Python entry → Alert coordinator: runs
main.py - CLI commands → Alert coordinator: dispatches
cli.py - Alert coordinator → Configuration: loads
src/main_app.py - Alert coordinator → IPO scraper: fetches and parses
src/main_app.py - IPO scraper → Sharesansar: requests data
src/scraper.py - IPO scraper → Fetched HTML: saves and reads
src/scraper.py - IPO scraper → IPO model: creates
src/scraper.py - Alert coordinator → Notification history: checks history
src/main_app.py - Alert coordinator → Email service: sends alert
src/main_app.py - Alert coordinator → Notification history: saves success
src/main_app.py - Notification history → IPO history JSON: reads and writes
src/database.py - Notification history → Notification record: serializes
src/database.py - Notification history → IPO model: records IPO
src/database.py - Email service → IPO model: formats alert
src/email_service.py - Email service → Configuration: uses settings
src/email_service.py - Email service → Gmail SMTP: sends via
src/email_service.py - Email service → Resend API: optionally sends via
src/email_service.py - Email service → Email recipients: delivers to
src/email_service.py - CLI commands → Alert coordinator: checks health
cli.py - Alert coordinator → Email service: tests connection
src/main_app.py - Alert coordinator → IPO scraper: checks source
src/main_app.py - CLI commands → Alert coordinator: requests statistics
cli.py - Alert coordinator → Notification history: gets statistics
src/main_app.py - CLI commands → Alert coordinator: requests cleanup
cli.py - Alert coordinator → Notification history: cleans records
src/main_app.py - Python entry → Logging: configures
main.py - CLI commands → Logging: configures
cli.py - Alert coordinator → Logging: configures
src/main_app.py