How I built Stock Stalker ?

How I built Stock Stalker ?

·

3 min read

Story Behind Stock Stalker

Back in 2020, when the world went into lockdown and everyone was stuck at home, I, like many others, found myself exploring new hobbies. The stock market was everywhere—on the news, social media, and even group chats. People were diving into trading, talking about stocks like they were the hottest new thing. Curious, I decided to jump in and see what all the hype was about.

It didn’t take long to realize how overwhelming it all was. Endless charts, confusing numbers, and predictions that felt like pure guesswork. I wanted something simpler—something that could visualize performance clearly, predict future trends, and show me real-time data without driving me nuts. That’s when it hit me: Why not build something that does all of this in one place?

So, with plenty of time on my hands and a lot of coffee, I created Stock Stalker during the pandemic. It became my way of turning all that chaotic market noise into something people could actually use and understand.

Features

  • Live Broadcasting of Real-Time Data
    The stock market doesn't wait, and neither should you. With live broadcasting, Stock Stalker delivers up-to-the-second data, allowing users to stay ahead of the curve without refreshing their screens.

  • Efficient Task Management
    Why let idle tasks waste resources? Stock Stalker deletes any periodic task that isn't in use, optimizing performance. However, if a task has multiple consumers, it continues seamlessly, ensuring the app runs efficiently even at high demand.

  • Dedicated WebSockets for Individual Stocks
    Every stock is unique, and so are its data streams. With individual WebSockets for live prices, Stock Stalker ensures real-time updates that are accurate, focused, and customizable.

  • Comprehensive Stock Analysis
    Beyond numbers, the app dives deep into individual stock performance, offering detailed stats and trends to help users make informed decisions.

  • Future Predictions Made Accessible
    Powered by advanced algorithms, Stock Stalker forecasts stock values, giving users an edge in planning their investments and strategies.

TechStack

  • Django

  • Redis

  • Celery

  • Tailwind

  • JavaScript

Architecture

Client: The client makes HTTP requests and receives HTTP responses from the Django web application.

Django: The Django web application acts as the "Task Producer", handling the client's requests and generating tasks to be processed.

Redis: Redis is used as a Task Queue, storing the tasks generated by Django and allowing them to be processed asynchronously by the Worker.

Celery: Celery is the "task scheduler" that pulls tasks from the Redis queue and distributes them to the Worker processes for execution.

Worker: The Worker processes execute the tasks asynchronously, independent of the main web application. This allows the web application to respond quickly to the client without waiting for long-running tasks to complete.

Broker: The Broker, in this case Redis, acts as the intermediary between the Django web application and the Celery workers, managing the task queue.

The final result of the asynchronous task execution is stored and can be retrieved by the client or other parts of the system.

This architecture allows the Django web application to offload time-consuming tasks to the background, improving the responsiveness and scalability of the overall system. The use of Redis and Celery provides a reliable and scalable task processing infrastructure.

Explore the Project on GitHub

You can check out the project on my GitHub.
Here’s the link: https://github.com/yashbrid03/Stock-Stalker. The repository includes all the instructions for getting started, along with detailed information about the project in the README file.

Did you find this article valuable?

Support Yash Nilesh Brid by becoming a sponsor. Any amount is appreciated!