### Quick Start: Development Mode Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Starts Monochrome with the development profile, enabling hot-reloading. Access the application at http://localhost:5173. ```bash docker compose --profile dev up -d ``` -------------------------------- ### Quick Start: Monochrome Only Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Starts the Monochrome application in detached mode. Access the application at http://localhost:3000. ```bash docker compose up -d ``` -------------------------------- ### Start Monochrome with PocketBase Profile Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Starts Monochrome along with the PocketBase service using the 'pocketbase' profile. ```bash docker compose --profile pocketbase up -d ``` -------------------------------- ### Start Development Server Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Start the local development server using Bun or npm. This command allows you to preview changes locally before building for production. ```bash bun run dev ``` ```bash npm run dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Install project dependencies using either Bun or npm. Bun is preferred for its speed, but npm is also supported. ```bash bun install ``` ```bash npm install ``` -------------------------------- ### Override File: Adding a Custom Service Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Example of an override file to define and add a new custom service to the Docker Compose setup. ```yaml # docker-compose.override.yml services: my-custom-api: image: my-api:latest restart: unless-stopped ports: - '4000:4000' networks: - monochrome-network ``` -------------------------------- ### Conventional Commits Format Example Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md This example demonstrates the structure of a Conventional Commit message for a feature addition, including type, scope, and description. ```bash # Feature addition feat(playlists): add shuffle playlist button ``` -------------------------------- ### Self-Hosting Monochrome with Docker Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Clone the repository, navigate to the docker directory, and run the docker compose command to start Monochrome. Access the application at http://localhost:3000. ```bash git clone https://github.com/monochrome-music/monochrome.git cd monochrome/docker docker compose up -d ``` -------------------------------- ### Conventional Commits Format Example - Documentation Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md This example shows a Conventional Commit message for documentation updates, specifying the type, scope, and the documentation change made. ```bash # Documentation docs(README): improve installation instructions ``` -------------------------------- ### Conventional Commits Format Example - Style Changes Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md This example demonstrates a Conventional Commit message for code style adjustments, specifying the type, scope, and the style change applied. ```bash # Style changes style(player): fix indentation in audio controls ``` -------------------------------- ### Conventional Commits Format Example - Maintenance Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md An example of a Conventional Commit message for maintenance tasks, such as dependency updates, including the type, scope, and the task performed. ```bash # Maintenance chore(deps): bump lyrics package to fix vulnerability ``` -------------------------------- ### Conventional Commits Format Example - Bug Fix Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md This example shows a Conventional Commit message for a bug fix, specifying the type, scope, and a concise description of the issue resolved. ```bash # Bug fix fix(metadata): resolve corrupted Hi-res metadata issue ``` -------------------------------- ### Override File: Adding Traefik Labels Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Example of an override file to add Traefik reverse proxy labels to the PocketBase service, enabling custom domain access. ```yaml # docker-compose.override.yml services: pocketbase: labels: - traefik.enable=true - traefik.http.routers.pocketbase.rule=Host(`pocketbase.example.com`) - traefik.http.routers.pocketbase.entrypoints=websecure - traefik.http.routers.pocketbase.tls.certresolver=letsencrypt - traefik.http.services.pocketbase.loadbalancer.server.port=8090 networks: - proxy-network networks: proxy-network: external: true ``` -------------------------------- ### Commit Changes with Conventional Commits Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Stage all changes and commit them using a message that follows the Conventional Commits format. This example shows a feature commit for the player scope. ```bash git add . git commit -m "feat(player): add keyboard shortcut for loop toggle" # example commit message ``` -------------------------------- ### Stop Docker Compose Services Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Stops all services, including those started with specific profiles like 'pocketbase'. ```bash docker compose --profile pocketbase down ``` -------------------------------- ### Conventional Commits Format Example - Refactoring Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Illustrates a Conventional Commit message for code refactoring, detailing the type, scope, and the nature of the refactoring performed. ```bash # Refactoring refactor(downloads): simplify cancel download logic ``` -------------------------------- ### Build for Production Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Execute this command to build the project for production deployment. The output will be in the `dist/` folder. ```bash # Build for production bun run build # The `dist/` folder contains the deployable files ``` -------------------------------- ### Build for Production Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Build the project for production deployment using Bun or npm. This command optimizes the project for performance and deployment. ```bash bun run build ``` ```bash npm run build ``` -------------------------------- ### Test Project Changes Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Run these commands to ensure your changes adhere to code style and the build process is successful. ```bash # Run all linters bun run lint # Test the build bun run build ``` -------------------------------- ### View Docker Compose Logs Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md View logs for all services or a specific service like PocketBase. Use -f to follow logs in real-time. ```bash docker compose logs -f ``` ```bash docker compose logs -f pocketbase ``` -------------------------------- ### Docker Compose Profiles Explanation Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Illustrates how Docker Compose profiles control service startup. Services without a profile always run. ```yaml services: monochrome: # no profile -- always starts pocketbase: profiles: ['pocketbase'] # opt-in monochrome-dev: profiles: ['dev'] # opt-in ``` -------------------------------- ### Run All Linters Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Execute all linting checks for the project. ```bash bun run lint ``` -------------------------------- ### Auto-format Code Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Automatically format all code files in the project. ```bash bun run format ``` -------------------------------- ### Clone Monochrome Repository Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Clone the Monochrome project repository using Git. This is the first step to setting up your local development environment. ```bash git clone https://github.com/monochrome-music/monochrome.git cd monochrome ``` -------------------------------- ### Backup PocketBase Data Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Executes a command within the 'pocketbase' container to create a compressed archive of the '/pb_data' directory. ```bash docker compose exec pocketbase tar czf - /pb_data > backup.tar.gz ``` -------------------------------- ### Restart Docker Compose Source: https://github.com/monochrome-music/monochrome/blob/main/README.md After modifying vite.config.js for Tailscale access, down the existing Docker containers and bring them up again to apply the changes. ```bash docker compose down docker compose up -d ``` -------------------------------- ### Configure Vite Preview for Tailscale Access Source: https://github.com/monochrome-music/monochrome/blob/main/README.md Modify vite.config.js to allow access over Tailscale by uncommenting and configuring the preview section with your Tailscale hostname. Restart the Docker container after making changes. ```javascript preview: { host: true, allowedHosts: [''], // e.g. pi5.tailf5f622.ts.net }, ``` -------------------------------- ### Create a New Branch Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Use these commands to create a new branch for your feature or fix. Ensure the branch name clearly indicates its purpose. ```bash git checkout -b feature/your-feature-name # or git checkout -b fix/description-of-fix ``` -------------------------------- ### Restore PocketBase Data Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Executes a command within the 'pocketbase' container to extract a compressed archive into the '/pb_data' directory. ```bash docker compose exec pocketbase tar xzf - -C / < backup.tar.gz ``` -------------------------------- ### Monochrome Theme Management Script Source: https://github.com/monochrome-music/monochrome/blob/main/index.html JavaScript code to load and apply user interface themes from local storage. It handles custom CSS and color palettes. ```javascript ( () => { try { const theme = localStorage.getItem('monochrome-theme'); const css = localStorage.getItem('custom_theme_css'); const palette = localStorage.getItem('monochrome-custom-theme'); if (!theme) return; document.documentElement.setAttribute('data-theme', theme); if (theme === 'custom') { if (css) { let styleEl = document.getElementById('custom-theme-style'); if (!styleEl) { styleEl = document.createElement('style'); styleEl.id = 'custom-theme-style'; document.head.appendChild(styleEl); } styleEl.textContent = css; } else if (palette) { const colors = JSON.parse(palette); const root = document.documentElement; for (const [key, value] of Object.entries(colors)) { root.style.setProperty(`--${key}`, value); } } } } catch (e) { console.error('theme loading failed', e); } })(); ``` -------------------------------- ### Check HTML Linting Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Perform HTML linting checks. ```bash bun run lint:html ``` -------------------------------- ### Push Branch to Remote Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Push your local feature branch to the remote repository to prepare for creating a pull request. ```bash git push origin feature/your-feature-name ``` -------------------------------- ### Monochrome Web Application Schema Source: https://github.com/monochrome-music/monochrome/blob/main/index.html Schema.org metadata for the Monochrome web application, specifying its type, name, URL, category, and operating system. ```json { "@context": "https://schema.org", "@type": "WebApplication", "name": "Monochrome", "url": "https://monochrome.tf/", "applicationCategory": "MusicApplication", "operatingSystem": "Web Browser", "image": "https://monochrome.tf/assets/logo.svg", "description": "Stream and download millions of Hi-Res FLACs, unreleased songs and music videos, all for free on Monochrome." } ``` -------------------------------- ### Fix CSS Linting Issues Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Automatically fix CSS linting issues. ```bash bun run lint:css -- --fix ``` -------------------------------- ### Fix JavaScript Linting Issues Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Automatically fix JavaScript linting issues. ```bash bun run lint:js -- --fix ``` -------------------------------- ### Rebuild Docker Compose Services Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Rebuilds Docker images and restarts services in detached mode. Use this after making code changes. ```bash docker compose up -d --build ``` -------------------------------- ### Monochrome Website Schema Source: https://github.com/monochrome-music/monochrome/blob/main/index.html Schema.org metadata for the Monochrome website, defining its name, URL, and search functionality. ```json { "@context": "https://schema.org", "@type": "WebSite", "name": "Monochrome", "url": "https://monochrome.tf/", "description": "Stream and download millions of Hi-Res FLACs, unreleased songs and music videos, all for free on Monochrome.", "potentialAction": { "@type": "SearchAction", "target": "https://monochrome.tf/search/{search_term_string}", "query-input": "required name=search_term_string" } } ``` -------------------------------- ### Basic Monochrome Theme CSS Structure Source: https://github.com/monochrome-music/monochrome/blob/main/THEME_GUIDE.md Defines the core CSS variables for a Monochrome theme, including base colors, UI elements, accents, text styles, and other properties like border-radius and font-family. Ensure all required variables are set for a complete theme. ```css :root { /* Base Colors */ --background: #0a0a0a; --foreground: #ededed; /* UI Elements */ --card: #1a1a1a; --card-foreground: #ededed; --border: #2a2a2a; /* Accents */ --primary: #3b82f6; --primary-foreground: #ffffff; --secondary: #2a2a2a; --secondary-foreground: #ededed; /* Text */ --muted: #2a2a2a; --muted-foreground: #a0a0a0; /* Special */ --highlight: #3b82f6; --ring: #3b82f6; --radius: 8px; --font-family: 'Inter', sans-serif; } ``` -------------------------------- ### Check Specific JavaScript Linting Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Perform linting checks specifically for JavaScript files. ```bash bun run lint:js ``` -------------------------------- ### Check Specific CSS Linting Source: https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md Perform linting checks specifically for CSS files. ```bash bun run lint:css ``` -------------------------------- ### Stop and Remove Docker Compose Services with Volumes Source: https://github.com/monochrome-music/monochrome/blob/main/DOCKER.md Stops services and removes associated volumes, which will result in data loss for persistent data. ```bash docker compose --profile pocketbase down -v ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.