This is a Flask-based web application for managing user identities. It provides a simple interface to handle user data and integrates with the OpenRouter API for additional functionalities. The application uses a SQLite database through Flask-SQLAlchemy for data persistence.
You can access the live version of the project at:
https://ds.sambhav-surana.online
Follow these steps to set up the project locally.
- Python 3.x
pippackage manager
-
Clone the repository:
git clone https://github.com/Sambhav242005/SentinelID.git cd SentinelID -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activateOn Windows, use:
venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
-
Install Playwright browsers: This is required for the browser automation features.
playwright install
-
Install additional system dependencies (if needed): For video streaming capabilities, you may need to install system-level dependencies:
- Windows: The required packages are included in the requirements.txt
- Linux:
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev - macOS:
brew install ffmpeg
-
Set up environment variables: Create a
.envfile in the root directory and add the necessary environment variables. For example:SECRET_KEY='your_secret_key' OPENROUTER_API_KEY='your_openrouter_api_key'
- User Authentication: Secure login and registration system
- Session Management: Create, manage, and monitor browser sessions
- Browser Automation: Real-time browser control with WebRTC streaming
- Session Persistence: Save and restore browser sessions
- Real-time Interaction: Click, type, scroll, and navigate in browser sessions
- WebRTC Support: Live video streaming of browser sessions
- RESTful API: Comprehensive API endpoints for easy integration
- Isolated Sessions: Secure, sandboxed browser environments
To run the application, use the following command:
python app.pyThe application will be available at http://127.0.0.1:5000.
POST /sessions- Create a new browser sessionGET /sessions- List all active sessionsDELETE /sessions/<session_id>- Delete a specific sessionPOST /sessions/<session_id>/save- Save a session for later restorationGET /sessions/saved- List all saved sessionsPOST /sessions/<saved_id>/restore- Restore a saved session
POST /webrtc/offer- Initialize WebRTC connectionPOST /webrtc/candidate- Add ICE candidate to WebRTC connection
GET /health- Health check endpointGET /session/isolated_session- Get isolated session template
This project relies on the following major libraries:
- Flask: A micro web framework for Python.
- Flask-SQLAlchemy: An extension for Flask that adds support for SQLAlchemy.
- Flask-CORS: Cross-Origin Resource Sharing support for Flask applications.
- Playwright: A Python library to automate Chromium, Firefox and WebKit browsers.
- aiortc: WebRTC library for real-time communication and video streaming.
- Pillow (PIL): Python Imaging Library for image processing.
- PyAV: Pythonic bindings for FFmpeg, providing video and audio processing.
- requests: A simple, yet elegant, HTTP library.
Please refer to requirements.txt for a full list of dependencies.