How bharathganji/pikpak-plus works
Main Components
a. Client Application (pikpak-plus-client)
• Web UI: Built with React, Vite, and IonicFramework.
• Mobile APK: Android project using Capacitor for native integration.
• Components and features: Authentication (sign-up/login), search functionality (using Jackett), file download/rename process, UI elements (forms, spinners, helpers).
b. Backend Application (pikpak-plus-server)
• Flask API: Acts as the gateway for client requests.
• API Modules: Key Python modules (api.py, apiscrape.py, flask_storage.py) handle core business logic.
• PikPak Integration: Communicates with the PikPak API via internal modules.
• Third-Party Integration: Uses Jackett (for torrent search) and Supabase (for user management and database operations).
• Deployment Configurations: Gunicorn configuration for production and Dockerfile for containerized delivery.
c. External Services and Infrastructure
• Supabase: Provides authentication and a MySQL (or similar) database with Row-Level Security policies.
• PikPak: The underlying storage/service account whose features are being shared.
• Jackett: For performing torrent searches and boosting the platform's search functionality.
d. Containerization & Orchestration
• Docker & docker-compose: Orchestrate both the frontend and backend containers, ensuring configuration via provided example.env and docker-compose.yml files.
Relationships and Interactions
• The Client Application (whether accessed via a web browser or Android APK) communicates with the Backend through REST API endpoints.
• The Frontend sends user authentication requests, search queries, and file download requests to the Flask backend.
• The Backend authenticates requests using Supabase and serves backend logic – fetching data from PikPak and returning results to the client.
• There is also an external trigger (/ping endpoint) to keep the backend active (via cron-job or similar scheduling service).
• Docker containers encapsulate both frontend and backend, highlighting the separation of concerns and deployment isolation.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly partitioning the UI components (React with Ionic) from the backend logic (Flask).
• Containerization: Use Docker to manage dependencies and deploy the system consistently.
• External Integration: Leverage external API services (Supabase for authentication and Jackett for search) to focus internal development on application-specific logic.
• Modular Design: The project’s file structure reflects a modular design for both UI components (each in separate folders with their own CSS, TSX files) and backend modules.
Relevant Technologies
• Frontend: React.js, IonicFramework, Vitejs.
• Backend: Python Flask, Gunicorn.
• DevOps: Docker, docker-compose.
• Additional Tools: Supabase for auth & database, Jackett for torrent search (integrated in the backend).
Additional Recommendations
• Detail out each container with its sub-components where necessary (for instance, splitting the client into a UI module and an Android-specific module if relevant).