Skip to content

alneng/tunele

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tunele

A Heardle clone after the game shut down on May 5th, 2023

Warning

On November 27, 2024, Spotify made changes to the Spotify Web API that deprecated many of their endpoints, including the 30-second preview URLs that Tunele was using. This means that until further notice, Tunele will no longer support custom playlists and any requests made to any of the custom playlist endpoints will result in an error.

How to use this repository

Required Services

These services are required for Tunele to work properly.

Required Developer Tools

  1. Git - https://git-scm.com/downloads
  2. Node.js 18+ - https://nodejs.org/en/about/previous-releases
  3. Yarn - npm i -g yarn (must be done after Node.js is installed)

Required Config Files for Running Tunele

  1. src/backend/.env

    • Copy src/backend/.env.example to src/backend/.env and fill in the fields
    • Values
      • SPOTIFY_CLIENT_KEY - <base64 encoded client_id:client_secret>
        • e.g. if your client_id is abc and client_secret is 123, base64 encode the string abc:123 and that is your key
      • FIREBASE_SERVICE_ACCOUNT_KEY - JSON of Service Key with read/write access to Firebase project's Firestore Database (should be inline like the example)
      • GOOGLE_OAUTH_CLIENT_ID - Google Cloud OAuth 2.0 client ID
      • GOOGLE_OAUTH_CLIENT_SECRET - Google Cloud OAuth 2.0 client secret
      • REDIRECT_URI - Google OAuth 2.0 redirect_uri
  2. src/frontend/.env

    • Copy src/frontend/.env.example to src/frontend/.env and fill in the fields (VITE_OAUTH_CLIENT_ID for local development, same value as GOOGLE_OAUTH_CLIENT_ID)

Starting Tunele Locally

  1. Clone the repository to the directory of your choice - git clone https://github.com/alneng/tunele.git
  2. Download dependencies - yarn install
  3. Start the frontend and backend - yarn start
  4. Access the frontend - http://localhost:5173

Starting Tunele backend with Docker

Building the image

cd src/backend
docker compose build # Creates image tunele-api:latest

Running the image

# With Docker Compose

cd src/backend
docker compose up # Has the correct context (log directory, env file)

# or Manually run the image - configure log directory and env file as fit

# Mac/Unix
docker run -v $(pwd)/logs:/app/logs --env-file .env -p 7600:7600 --name tunele tunele-api:latest
# Windows
docker run -v ${pwd}/logs:/app/logs --env-file .env -p 7600:7600 --name tunele tunele-api:latest