No description
Find a file
Shardul Vaidya 72221faf47
Merge pull request #1 from 5herlocked/dependabot/uv/bcrypt-5.0.0
chore(deps): bump bcrypt from 4.3.0 to 5.0.0
2025-10-17 17:59:44 -04:00
.devcontainer feat: basic dev container configuration 2025-08-27 11:09:26 -04:00
.github Create dependabot.yml 2025-08-27 10:53:29 -04:00
docs feat: implement Firebase authentication for service workers 2025-09-13 15:36:50 +00:00
scripts fix: add HTMX library to templates to resolve runtime errors 2025-09-15 00:26:27 +00:00
src/stock_agent feat: persist device tokens in database 2025-09-16 01:49:32 +00:00
.dockerignore feat: add optimized Docker deployment configuration 2025-08-23 23:58:05 -04:00
.env feat: implement Firebase authentication for service workers 2025-09-13 15:36:50 +00:00
.env.example feat: implement Firebase authentication for service workers 2025-09-13 15:36:50 +00:00
.gitignore feat: implement Firebase authentication for service workers 2025-09-13 15:36:50 +00:00
.python-version Added a whole bunch of things, we can interact with the polygon flat s3 system 2025-08-20 23:23:10 -04:00
AGENTS.md docs: update AGENTS.md with Firebase service worker sessions architecture 2025-09-16 01:00:56 +00:00
docker-compose.yml feat: add optimized Docker deployment configuration 2025-08-23 23:58:05 -04:00
Dockerfile Trend calculation added to stock_service 2025-09-13 10:22:24 -04:00
LICENSE Initial commit 2025-08-20 23:22:27 -04:00
pyproject.toml fix: correct service architecture in documentation 2025-08-24 12:28:53 +00:00
README.md notification service intializes just fine 2025-08-20 23:34:32 -04:00
uv.lock Merge pull request #1 from 5herlocked/dependabot/uv/bcrypt-5.0.0 2025-10-17 17:59:44 -04:00

Stock Agent: Real-Time Market Notifications

The Problem We Solve

Stock markets move fast, and information is currency. Traditional tracking tools are either overwhelming or insufficient. Stock Agent bridges this gap by delivering precise, timely notifications about market movements directly to your devices.

How We Built It

Our approach combines robust Python backend infrastructure with real-time messaging technology. By leveraging Robyn's lightweight web framework, Firebase Cloud Messaging, and a modular JavaScript frontend, we've created a notification system that's both powerful and elegant.

The core philosophy is simple: transform complex market data into actionable, immediate insights. No noise, just signal.

Technical Architecture

The system is built on a carefully chosen technology stack. Python handles backend logic and data processing, providing a stable and flexible foundation. Robyn serves as our web framework, ensuring low-latency communication. Firebase Cloud Messaging acts as our real-time notification conductor, pushing updates across devices with minimal overhead.

Our frontend uses vanilla JavaScript and HTMX, creating an interactive experience without unnecessary complexity. The entire system is managed through UV, ensuring clean and reproducible Python environments.

Setup and Installation

Setting up Stock Agent is straightforward. Follow these steps precisely:

  1. Clone the repository
git clone [repository-url]
cd stock-agent
  1. Initialize Python environment
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
  1. Configure Firebase
  • Create a Firebase project
  • Generate service account credentials
  • Save credentials as firebase_creds.json
  1. Set environment variables in .env
FIREBASE_CREDS_PATH=./firebase-credentials.json
FIREBASE_API_KEY=[your-key]
FIREBASE_PROJECT_ID=[your-project]
  1. Launch the application
uv run python -m stock_agent.main

Notification Strategy

We track two primary market dynamics: gainers and losers. When a stock crosses predefined thresholds, a notification is immediately dispatched. This approach cuts through market noise, delivering only what matters.

Security Considerations

Security isn't an afterthought—it's fundamental. We implement:

  • Dynamic configuration fetching
  • Server-side VAPID key management
  • Secure token registration protocols

Contributing

This is an open system. If you see potential improvements, challenge our implementation. Fork the repository, implement your vision, and submit a pull request.

Disclaimer

Stock markets involve inherent risks. Stock Agent provides information, not financial advice.

License

MIT License. See LICENSE for details.