### Manual Backend Setup Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Install dependencies and start the development server manually. ```bash cd server npm install npm run dev ``` -------------------------------- ### Run with Docker Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Pull the pre-built images and start the services using Docker Compose. ```bash docker pull ghcr.io/amintacccp/github-stars-manager-server:latest docker pull ghcr.io/amintacccp/github-stars-manager-frontend:latest docker-compose up -d ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Example content for a .env file to customize secrets and image versions. ```text API_SECRET=my-strong-secret ENCRYPTION_KEY=my-encryption-key BACKEND_IMAGE_TAG=0.6.2 # pin backend image version (default: latest) FRONTEND_IMAGE_TAG=0.6.2 # pin frontend image version (default: latest) # BACKEND_HOST=backend:3000 # target for the frontend's /api proxy (default: backend:3000) ``` -------------------------------- ### Start Application with Docker Compose Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Use Docker Compose to pull and run the pre-built images from GHCR. ```bash # Using Docker Compose (pulls images automatically) docker-compose up -d # The application will be available at http://localhost:8080 ``` -------------------------------- ### Start Full Stack with Docker Compose Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Launches the backend and frontend services in detached mode. ```bash docker-compose up -d ``` -------------------------------- ### Start aria2 with RPC Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Command to initialize an aria2 daemon with RPC enabled for remote download integration. ```bash aria2c --enable-rpc --rpc-listen-port=6800 ``` -------------------------------- ### Run Backend Server with Docker Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Commands to run the backend container with various configurations for persistence, security, and port mapping. ```bash # Basic — no auth, port 3000, data persisted in volume docker run -d \ --name github-stars-backend \ -v github-stars-data:/app/data \ -p 3000:3000 \ ghcr.io/amintacccp/github-stars-manager-server:latest # With custom API secret and encryption key docker run -d \ --name github-stars-backend \ -v github-stars-data:/app/data \ -p 3000:3000 \ -e API_SECRET="your-secret-here" \ -e ENCRYPTION_KEY="your-encryption-key" \ ghcr.io/amintacccp/github-stars-manager-server:latest # Map to a different host port (e.g. 8080) docker run -d \ --name github-stars-backend \ -v github-stars-data:/app/data \ -p 8080:3000 \ -e API_SECRET="your-secret-here" \ ghcr.io/amintacccp/github-stars-manager-server:latest ``` -------------------------------- ### Run Backend with Docker Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Execute the backend container using docker run with optional authentication and encryption keys. ```bash # Basic — no auth, port 3000 docker run -d --name github-stars-backend \ -v github-stars-data:/app/data \ -p 3000:3000 \ ghcr.io/amintacccp/github-stars-manager-server:latest # With custom secret and encryption key docker run -d --name github-stars-backend \ -v github-stars-data:/app/data \ -p 3000:3000 \ -e API_SECRET="your-secret" \ -e ENCRYPTION_KEY="your-key" \ ghcr.io/amintacccp/github-stars-manager-server:latest ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Define custom configuration in a .env file for the backend and frontend. ```bash API_SECRET=your-secret ENCRYPTION_KEY=your-key BACKEND_IMAGE_TAG=0.6.2 # pin backend image version (default: latest) FRONTEND_IMAGE_TAG=0.6.2 # pin frontend image version (default: latest) ``` -------------------------------- ### Create a feature branch Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Use this command to initialize a new feature branch for development. ```bash git checkout -b feature/AmazingFeature ``` -------------------------------- ### Configure Image Versions Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Set specific image tags in your .env file to pin versions for backend and frontend services. ```bash BACKEND_IMAGE_TAG=0.6.2 FRONTEND_IMAGE_TAG=0.6.2 ``` -------------------------------- ### Build Locally with Docker Compose Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Commands and configuration for building services locally instead of using pre-built images. ```bash docker-compose up -d --build ``` ```yaml services: backend: build: ./server ``` -------------------------------- ### Fallback Page Initialization Script Source: https://github.com/amintacccp/githubstarsmanager/blob/main/templates/fallback-index.html Handles basic logging, Electron environment detection, and error monitoring for the fallback page. ```javascript console.log('GitHub Stars Manager fallback page loaded successfully'); document.addEventListener('DOMContentLoaded', function() { console.log('DOM ready - Fallback page'); // 尝试检测是否在 Electron 环境中 if (window.process && window.process.type === 'renderer') { console.log('Running in Electron renderer process'); } // 添加一些基本的错误处理 window.addEventListener('error', function(e) { console.error('Page error:', e.error); }); // 检查资源加载 setTimeout(function() { console.log('Fallback page fully loaded'); }, 1000); }); ``` -------------------------------- ### Run Frontend Container Independently Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Commands to pull, run, or build the frontend container without Docker Compose. ```bash # Pull the published image docker pull ghcr.io/amintacccp/github-stars-manager-frontend:latest # Run the container (point /api proxy at your backend) docker run -d -p 8080:80 \ -e BACKEND_HOST=host.docker.internal:3000 \ --name github-stars-manager \ ghcr.io/amintacccp/github-stars-manager-frontend:latest # The application will be available at http://localhost:8080 ``` ```bash docker build -t github-stars-manager . docker run -d -p 8080:80 \ -e BACKEND_HOST=host.docker.internal:3000 \ --name github-stars-manager github-stars-manager ``` -------------------------------- ### Commit changes Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Use this command to save changes to the local repository. ```bash git commit -m 'Add some AmazingFeature' ``` -------------------------------- ### Push changes Source: https://github.com/amintacccp/githubstarsmanager/blob/main/README.md Use this command to upload local commits to the remote repository. ```bash git push origin feature/AmazingFeature ``` -------------------------------- ### Authenticate with GHCR Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Required if the GHCR package is private. Use a Personal Access Token with read:packages scope. ```bash docker login ghcr.io -u YOUR_GITHUB_USERNAME ``` -------------------------------- ### Stop Docker Containers Source: https://github.com/amintacccp/githubstarsmanager/blob/main/DOCKER.md Commands to stop and remove containers using Docker Compose or direct Docker commands. ```bash # With Docker Compose docker-compose down # With Docker directly docker stop github-stars-manager && docker rm github-stars-manager # Stop backend only docker stop github-stars-backend && docker rm github-stars-backend ``` -------------------------------- ### Fallback Page CSS Styles Source: https://github.com/amintacccp/githubstarsmanager/blob/main/templates/fallback-index.html Defines the visual presentation for the fallback page, including a gradient background and centered container layout. ```css body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; margin: 0; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; } .container { max-width: 600px; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: center; } h1 { color: #333; margin-bottom: 20px; font-size: 2.5em; font-weight: 300; } .logo { font-size: 4em; margin-bottom: 20px; } p { color: #666; line-height: 1.6; margin-bottom: 15px; } .status { background: #f8f9fa; padding: 20px; border-radius: 8px; margin-top: 30px; border-left: 4px solid #007bff; } .loading { display: inline-block; width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #007bff; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.