Inspiration

Did you know that only between 3-20% of day traders make money? That means that 80-97% of day traders lose money. I’m talking about day traders here, not long-term investors. But why does that happen? It’s because most traders have already responded to the market event, before you even knew about it.

What it does

Trade Alert scrapes recent news on the market. The user specifies what companies or market events they want to track and gets notified when an event occurs. They can also quickly buy/sell stocks via TradeAlert.

The system monitors news sources every 10 seconds, uses AI to determine if the news is relevant to the user's alerts, and instantly notifies them with actionable insights. Users receive real-time balance and transaction updates across both the web interface and WhatsApp.

How we built it

Frontend: React with Tailwind CSS, Socket.IO client for real-time updates, and Firebase Authentication for secure user sessions. Backend: Node.js with Express, Socket.IO for WebSocket connections, Puppeteer and Cheerio for automated news scraping, PostgreSQL for data persistence, Firebase Admin SDK for authentication verification, Google Gemini API for intelligent news analysis, and Twilio for WhatsApp messaging. Architecture: The web scraper runs continuously, monitoring news sources and detecting changes. When new content appears, Gemini analyzes whether it's relevant to each user's alerts. If triggered, the system sends formatted WhatsApp messages with buy/sell options. Users can respond conversationally, and their transactions are instantly reflected in the web dashboard via WebSocket events.

Challenges we ran into

Managing various tables in PostgreSQL. Deployment and configuring DNS for a goDaddy domain. (Deployed half the app) Firebase Auth.

Accomplishments that we're proud of

Completing our project in time and successfully integrating multiple complex APIs (Firebase, Gemini, Twilio, PostgreSQL, Socket.IO)

What we learned

We learned how to implement secure WebSocket authentication, verifying Firebase tokens, working with Gemini's API and effective prompt engineering. We deepened our understanding of PostgreSQL relationships and transaction handling, especially ensuring data consistency when updating balances and recording trades. We also learned valuable lessons about state management in conversational interfaces, discovering that simple in-memory objects work well for MVP but would need Redis or similar in production.

What's next for TradeAlert

Implement RAG (Retrieval-Augmented Generation) for scalability, which would reduce the number of calls to Gemini API by storing and querying relevant market context. Connect to a real brokerage API (like Alpaca or Interactive Brokers) to enable actual stock trading. Add the ability to scrape real news sources like Bloomberg, Reuters, and Financial Times for better market coverage. Improve decision accuracy through fine-tuning and add optional automation where users can set rules to auto-execute trades. Expand notification options beyond WhatsApp to include SMS, email, Discord, and Telegram. Implement portfolio tracking and performance analytics so users can visualize their trading history and returns over time.

Share this project:

Updates