Streamlytics is a real-time data analytics platform that collects, processes, and visualizes streaming data. It uses FastAPI for the backend, MySQL for data storage, and Streamlit for the frontend dashboard.
- Real-time data ingestion from external API
- FastAPI backend for data management
- MySQL database for data storage
- Streamlit dashboard for data visualization
- Dockerized setup for easy deployment
- Docker and Docker Compose
- Python 3.8+
- Git
-
Clone the repository:
-
git clone https://github.com/crs7617/Streamlytics.git cd Streamlytics Copy
-
Copy the sample environment file and edit it with your credentials: cp .env.sample .env CopyEdit the
.env
file with your actual database credentials and API key. -
Build and run the Docker containers: docker-compose up -d Copy
main.py
: FastAPI backend serverdashboard.py
: Streamlit dashboard applicationdata-ingestion.py
: Script for fetching and storing datadocker-compose.yml
: Docker Compose configurationDockerfile
: Docker configuration for the web servicerequirements.txt
: Python dependencies
- Access the FastAPI backend at
http://localhost:80
- View the Streamlit dashboard at
http://localhost:8501
- API endpoints:
- POST
/data
: Add new data point - GET
/data
: Retrieve all data points
The data-ingestion.py
script fetches data from an external API and stores it in the MySQL database. To run it manually:
python data-ingestion.py
Copy
To run the services individually for development:
- Start the MySQL database: docker-compose up db Copy
- Run the FastAPI server: uvicorn main:app --reload Copy
- Run the Streamlit dashboard: streamlit run dashboard.py Copy
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.