From 5bc7a72a92ddbdbb846ee5b37dd7542821ab816e Mon Sep 17 00:00:00 2001 From: Stefano Date: Fri, 16 May 2025 14:37:35 -0500 Subject: [PATCH] Initial README version representing the current progress --- README.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2139787..a488f39 100644 --- a/README.md +++ b/README.md @@ -1 +1,99 @@ -# To do +# IPTV Management System + +**Status**: Actively in development ⚠️ + +A modern IPTV management system that leverages AWS Cognito for secure user authentication and provides tools for EPG generation, stream validation, and cloud deployment via AWS CDK. + +## Key Features + +✅ **Implemented** + +- **User Authentication**: + - AWS Cognito integration for secure user sign-in + - JWT token generation & validation + - Role-based access control (RBAC) with the `require_roles` decorator + (_Endpoints include both general and admin-protected routes_) + +- **Stream & EPG Management**: + - EPG generation from M3U8 playlists ([`app/iptv/createEpg.py`](app/iptv/createEpg.py)) + - Playlist creation utility ([`app/iptv/createPlaylist.py`](app/iptv/createPlaylist.py)) + - Stream validation tooling ([`app/utils/check_streams.py`](app/utils/check_streams.py)) + +- **Deployment & Infrastructure**: + - Infrastructure provisioning using AWS CDK ([`app.py`](app.py), [`infrastructure/stack.py`](infrastructure/stack.py)) + - Deployment scripts to deploy/destroy the stack and update running instances ([`scripts/deploy.sh`](scripts/deploy.sh), [`scripts/destroy.sh`](scripts/destroy.sh)) + - Environment configuration driven by a `.env` file ([`app/utils/constants.py`](app/utils/constants.py)) + +🛠️ **In Progress** + +- User management interface and additional API endpoints +- Automated EPG updates and playlist management endpoints +- Refresh token implementation and enhanced security features +- Comprehensive API documentation + +## Installation & Deployment + +### Local Setup + +1. **Clone the repository:** + + ```bash + git clone [repository-url] + cd iptv-updater-aws + ``` + +2. **Set up the virtual environment:** + + ```bash + uv venv .venv + source .venv/bin/activate + uv pip install -r requirements.txt + ``` + +3. **Configure environment variables:** + + Copy `.env.example` to `.env` and update credentials as needed. + +### Deploying Infrastructure + +The project uses AWS CDK to provision the required AWS resources. + +1. **Install dependencies and CDK globally:** + + ```bash + ./install.sh + ``` + +2. **Deploy the stack:** + + ```bash + ./scripts/deploy.sh + ``` + +3. **Update application on running instances:** + + The deployment script also updates code on EC2 instances automatically via AWS SSM. + +4. **Destroy the stack:** + + ```bash + ./scripts/destroy.sh + ``` + +## Usage + +- **API Endpoints**: + - Sign-in: `/signin` + - Protected endpoints: `/protected` and `/protected_admin` + +- **EPG & Playlist Generation**: + - Create playlists using [`app/iptv/createPlaylist.py`](app/iptv/createPlaylist.py) + - Generate EPG data using [`app/iptv/createEpg.py`](app/iptv/createEpg.py) + +- **Stream Validation**: + - Validate stream URLs using the utility ([`app/utils/check_streams.py`](app/utils/check_streams.py)) + +## Notes + +- This project is under active development. Expect additional functionality and improvements in upcoming releases. +- For deployment details and troubleshooting, refer to the deployment scripts and AWS CDK documentation.