Hey there! 👋 Welcome to Stock Alertify, your go-to tool for keeping an eye on the stock market without breaking a sweat. Ever noticed how stock investments can be a rollercoaster? High returns, but oh-so-volatile. That's where we come in. With Stock Alertify, you can peek at the latest prices and set alerts for when your favorite stocks hit your dream (or nightmare) prices. Ready to make smarter investment moves? Let's get started!
Want to dive in right away? Check out our live demo and get a feel of Stock Alertify in action!
- Python: 3.11 🐍
- FastAPI: Web framework
- SQLAlchemy: ORM
- CockroachDB: Scales horizontally 🪳
- Pydantic: For strict data validation
- DigitalOcean: Hosting? Handled
Access the live demo here: stock.mosaibah.com
For access to the Retool dashboard, Contact us at: [email protected]
Ensure you meet the following requirements before starting:
- Docker & Docker Compose: Installed and running on your machine.
- RapidAPI Key: Obtainable by signing up at RapidAPI.
- Make: Installed via
brew install make
on your machine.
Follow these steps to set up your project locally:
- Clone the repository:
git clone https://github.com/Mosaibah/Stock-Alertify.git
- Copy the environment variables template to create your own
.env
file:cp .env.example .env
- Open the
.env
file and add your RapidAPI key to the RAPID_API_KEY field. - Use the Makefile to build and start docker:
make up
Check out this handy list of make
commands
Command | Action |
---|---|
make up |
Builds and starts docker compose |
make down |
Stops and removes the Docker Compose services. |
make worker-logs |
Display logs from the worker service |
make beat-logs |
Display logs from the beat service |
make consumer-logs |
Display logs from the consumer service |
make publish-event |
Publish a new event |
You can access the API documentation generated by FastAPI to test the endpoints. By default, the documentation is available at http://localhost:8005/docs.
- Get Market Price:
GET /market-price/
- Retrieves the current market price.
- Get Rules:
GET /rules/
- Fetches all the rules.
- Create Rule:
POST /rules/
- Creates a new rule.
- Update Rule:
PATCH /rules/{rule_id}
- Updates an existing rule.
- Delete Rule:
DELETE /rules/{rule_id}
- Deletes a rule.
- Alerts:
GET /alerts/
- Retrieves all alerts.
Got ideas or found a bug? Feel free to open a PR or an issue. All contributions are welcome!