diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index f8ecc5c..791e441 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -1,22 +1,25 @@ - # Development + This project uses [Vite](https://vitejs.dev/) for local development and optimized builds. ### Prerequisites + - [Node.js](https://nodejs.org/) (Version 20+ or 22+ recommended) ### Getting Started + 1. Install dependencies: - ```bash - npm install - ``` + ```bash + npm install + ``` 2. Start the development server: - ```bash - npm run dev - ``` - The app will be available at `http://localhost:5173/`. + ```bash + npm run dev + ``` + The app will be available at `http://localhost:5173/`. ### Why Vite? + - **Instant Updates**: Support for Hot Module Replacement (HMR) means changes to JS/CSS are reflected instantly in the browser. - **Dependency Management**: No more manual path tracking or broken internal imports. - **Automated PWA**: Service Worker generation and asset hashing are handled automatically. @@ -25,28 +28,30 @@ This project uses [Vite](https://vitejs.dev/) for local development and optimize We use a standard stack to ensure code quality and consistency: -- **JS**: [ESLint](https://eslint.org/) -- **CSS**: [Stylelint](https://stylelint.io/) -- **HTML**: [HTMLHint](https://htmlhint.com/) -- **Formatting**: [Prettier](https://prettier.io/) +- **JS**: [ESLint](https://eslint.org/) +- **CSS**: [Stylelint](https://stylelint.io/) +- **HTML**: [HTMLHint](https://htmlhint.com/) +- **Formatting**: [Prettier](https://prettier.io/) ### Commands -- **Check everything:** `npm run lint` -- **Auto-format code:** `npm run format` (Runs Prettier) -- **Fix JS issues:** `npm run lint:js -- --fix` -- **Fix CSS issues:** `npm run lint:css -- --fix` +- **Check everything:** `npm run lint` +- **Auto-format code:** `npm run format` (Runs Prettier) +- **Fix JS issues:** `npm run lint:js -- --fix` +- **Fix CSS issues:** `npm run lint:css -- --fix` > [!IMPORTANT] > A GitHub Action automatically runs these checks on every push and pull request. Please ensure `npm run lint` passes before committing. ## Project Structure + - `/js`: Application source code. - `/public`: Static assets (images, manifest, instances.json) that are copied directly to the build folder. - `index.html`: The entry point of the application. - `vite.config.js`: Build and PWA configuration. ## Deployment + Deployment is automated via **GitHub Actions**. > [!NOTE] diff --git a/INSTANCES.md b/INSTANCES.md index eebf78d..367adca 100644 --- a/INSTANCES.md +++ b/INSTANCES.md @@ -1,24 +1,22 @@ API: -| Provider | Instance URL | +| Provider | Instance URL | |----------------|---------------------------------| -| Monochrome | https://monochrome-api.samidy.com ([NOTE](https://rentry.co/monochromeapi)) | -| squid.wtf | https://triton.squid.wtf | -| Lucida (QQDL) | https://wolf.qqdl.site | -| | https://maus.qqdl.site | -| | https://vogel.qqdl.site | -| | https://katze.qqdl.site | -| | https://hund.qqdl.site | -| Kinoplus | https://tidal.kinoplus.online | -| Binimum | https://tidal-api.binimum.org | +| Monochrome | https://monochrome-api.samidy.com ([NOTE](https://rentry.co/monochromeapi)) | +| squid.wtf | https://triton.squid.wtf | +| Lucida (QQDL) | https://wolf.qqdl.site | +| | https://maus.qqdl.site | +| | https://vogel.qqdl.site | +| | https://katze.qqdl.site | +| | https://hund.qqdl.site | +| Kinoplus | https://tidal.kinoplus.online | +| Binimum | https://tidal-api.binimum.org | UI: -| Provider | Instance URL | +| Provider | Instance URL | |-------------------|------------------------------------| -| Monochrome | https://monochrome.samidy.com | -| tidal-ui (bini) | https://music.binimum.org | -| squid.wtf | https://tidal.squid.wtf | -| QQDL | https://tidal.qqdl.site/ | -| Arjix | https://music.arjix.dev/ | -| Spofree | https://spo.free.nf | - - +| Monochrome | https://monochrome.samidy.com | +| tidal-ui (bini) | https://music.binimum.org | +| squid.wtf | https://tidal.squid.wtf | +| QQDL | https://tidal.qqdl.site/ | +| Arjix | https://music.arjix.dev/ | +| Spofree | https://spo.free.nf | diff --git a/README.md b/README.md index 39a7299..0c36c0d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@

-

Monochrome

### **Monochrome** is an open-source, privacy-respecting, ad-free [TIDAL](https://tidal.com) web UI, built on top of [Hi-Fi](https://github.com/sachinsenal0x64/hifi). @@ -14,6 +13,7 @@ [Monochrome UI](https://monochrome.samidy.com/#album/378149557) ### Features + - -### Check it out live at: [**monochrome.samidy.com**](https://monochrome.samidy.com) +### Check it out live at: [**monochrome.samidy.com**](https://monochrome.samidy.com) +
[![GitHub stars](https://img.shields.io/github/stars/SamidyFR/monochrome?style=for-the-badge&color=ffffff&labelColor=000000)](https://github.com/SamidyFR/monochrome/stargazers) [![GitHub forks](https://img.shields.io/github/forks/SamidyFR/monochrome?style=for-the-badge&color=ffffff&labelColor=000000)](https://github.com/SamidyFR/monochrome/forks) [![GitHub issues](https://img.shields.io/github/issues/SamidyFR/monochrome?style=for-the-badge&color=ffffff&labelColor=000000)](https://github.com/SamidyFR/monochrome/issues) - [As seen on FMHY](https://fmhy.net/audio#streaming-sites) diff --git a/eslint.config.js b/eslint.config.js index e5ad37b..6b2eb91 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,25 +1,25 @@ -import js from "@eslint/js"; -import globals from "globals"; -import prettierConfig from "eslint-config-prettier"; +import js from '@eslint/js'; +import globals from 'globals'; +import prettierConfig from 'eslint-config-prettier'; export default [ { - ignores: ["dist/", "node_modules/", "legacy/", "sw.js"] + ignores: ['dist/', 'node_modules/', 'legacy/', 'sw.js'], }, js.configs.recommended, prettierConfig, { languageOptions: { ecmaVersion: 2022, - sourceType: "module", + sourceType: 'module', globals: { ...globals.browser, - ...globals.node - } + ...globals.node, + }, }, rules: { - "no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], - "no-console": ["warn", { "allow": ["warn", "error"] }] - } - } + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + 'no-console': ['warn', { allow: ['warn', 'error'] }], + }, + }, ]; diff --git a/firebase-setup.md b/firebase-setup.md index dfb509f..c65ee67 100644 --- a/firebase-setup.md +++ b/firebase-setup.md @@ -3,12 +3,14 @@ Follow these steps to enable cross-device synchronization for your library, history, and settings using your own Firebase project. ## 1. Create a Firebase Project + 1. Go to the [Firebase Console](https://console.firebase.google.com/). 2. Click **Add project** and give it a name (e.g., "Monochrome Sync"). 3. (Optional) Disable Gemini and Google Analytics if you want to keep it simple. 4. Click **Create project**. ## 2. Enable Authentication + 1. In the left sidebar, click **Build** > **Authentication**. 2. Click **Get Started**. 3. Go to the **Sign-in method** tab. @@ -16,63 +18,71 @@ Follow these steps to enable cross-device synchronization for your library, hist 5. Set your project support email and click **Save**. ### 2.1 Authorized Domains (CRITICAL) + Firebase will block login attempts from unknown domains. + 1. In the **Authentication** section, go to the **Settings** tab. 2. Click **Authorized domains** in the left sub-menu. 3. Click **Add domain**. 4. Add your hosting domain (e.g., `julienmaille.github.io`). - * *Note: `localhost` and `127.0.0.1` are usually added by default for local testing.* + - _Note: `localhost` and `127.0.0.1` are usually added by default for local testing._ ## 3. Enable Realtime Database + 1. In the left sidebar, click **Build** > **Realtime Database**. 2. Click **Create Database**. 3. Choose a location near you and click **Next**. 4. Select **Start in test mode** (we will change the rules in the next step) and click **Enable**. ## 4. Set Security Rules + 1. In the Realtime Database section, go to the **Rules** tab. 2. Replace the existing rules with the following to ensure users can only see their own data: + ```json { - "rules": { - "users": { - "$uid": { - ".read": "$uid === auth.uid", - ".write": "$uid === auth.uid" - } - }, - "public_playlists": { - ".read": true, - "$playlistId": { - ".write": "auth != null && (!data.exists() || data.child('uid').val() === auth.uid)" - } + "rules": { + "users": { + "$uid": { + ".read": "$uid === auth.uid", + ".write": "$uid === auth.uid" + } + }, + "public_playlists": { + ".read": true, + "$playlistId": { + ".write": "auth != null && (!data.exists() || data.child('uid').val() === auth.uid)" + } + } } - } } ``` - * **Note:** The `public_playlists` rule allows anyone to read the playlists. The write rule ensures that only authenticated users can publish, and only the owner (creator) of a playlist can modify or delete it. + + - **Note:** The `public_playlists` rule allows anyone to read the playlists. The write rule ensures that only authenticated users can publish, and only the owner (creator) of a playlist can modify or delete it. 3. Click **Publish**. ## 5. Get Your Configuration + 1. Click the gear icon (⚙️) next to "Project Overview" and select **Project settings**. 2. In the **General** tab, scroll down to "Your apps" and click the **Web icon (``)**. 3. Register the app (e.g., "Monochrome App"). 4. You will see a `firebaseConfig` object. It looks like this: ```javascript const firebaseConfig = { - apiKey: "AIzaSy...", - authDomain: "your-project.firebaseapp.com", - databaseURL: "https://your-project.firebaseio.com", - projectId: "your-project", - storageBucket: "your-project.appspot.com", - messagingSenderId: "...", - appId: "..." + apiKey: 'AIzaSy...', + authDomain: 'your-project.firebaseapp.com', + databaseURL: 'https://your-project.firebaseio.com', + projectId: 'your-project', + storageBucket: 'your-project.appspot.com', + messagingSenderId: '...', + appId: '...', }; ``` 5. **Copy only the part with the curly braces `{ ... }`**. ## 6. Configure Monochrome + 1. Open the Monochrome app and go to **Settings**. 2. Find the **Firebase Configuration** section. 3. Paste the JSON object you copied into the textarea. diff --git a/index.html b/index.html index 630725e..4aa41d1 100644 --- a/index.html +++ b/index.html @@ -1,1040 +1,1806 @@ - + - - - - Monochrome Music - - - - - - - - - - - - - - - - -
- -
- -
-
-

Panel

-
- -
+ + + + Monochrome Music + + + + + + + + + + + + + + + + +
+
    +
  • Like
  • +
  • Add to Playlist
  • +
  • Track Mix
  • +
  • Play Next
  • +
  • Add to Queue
  • +
  • Download
  • +
-
- -
-
-