LiveDataStream is a project for real-time data streaming between a server and clients using FastAPI for the server and React with Vite for the client.
The server directory contains the server-side code written in FastAPI, a modern web framework for building APIs with Python.
- Provides REST API endpoints for adding values to the database and streaming real-time updates to clients.
- Utilizes Server-Sent Events (SSE) for real-time communication with clients.
- Uses SQLite database for storing data.
To run the server:
-
Navigate to the
serverdirectory. -
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment: On Windows:
bash .venv\Scripts\activateOn macOS and Linux:
source .venv/bin/activate -
Install the dependencies by running:
pip install -r requirements.txt
-
Start the server by running:
uvicorn main:app --reload
For more details on the server-side code and usage, see the document.
The client directory contains the client-side code written in React with Vite, a fast build tool that significantly improves the development experience.
- Built with React for a dynamic and interactive user interface.
- Utilizes Vite for fast and optimized development.
- Communicates with the server to display real-time updates.
To run the client:
- Navigate to the
clientdirectory. - Install the dependencies:
- If using npm, run:
npm install
- If using Yarn, run:
yarn install
- If using npm, run:
- Start the development server:
- If using npm, run:
npm run dev
- If using Yarn, run:
yarn run dev
- If using npm, run:
For more details on the client-side code and usage, see the document.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, feel free to open an issue or submit a pull request.
- FastAPI: A modern, fast (high-performance), web framework for building APIs with Python 3.10+.
- React: A JavaScript library for building user interfaces.
- Vite: A fast build tool that significantly improves the development experience for modern web projects.
This project is maintained by Azim Miah. Feel free to contact me at azimruet28@gmail.com for any inquiries or collaborations.