A Heardle clone after the game shut down on May 5th, 2023
These services are required for Tunele to work properly.
- A Spotify web application: https://developer.spotify.com/dashboard
- A Firebase project with Firestore set up: https://firebase.google.com/docs/firestore/quickstart
- A Google Cloud project with OAuth consent set up and client credentials: https://developers.google.com/identity/protocols/oauth2
- Git - https://git-scm.com/downloads
- Node.js 18+ - https://nodejs.org/en/about/previous-releases
- Yarn -
npm i -g yarn
(must be done after Node.js is installed)
-
src/backend/.env
- Copy
src/backend/.env.example
tosrc/backend/.env
and fill in the fields - Values
SPOTIFY_CLIENT_KEY
- <base64 encodedclient_id:client_secret
>- e.g. if your client_id is
abc
and client_secret is123
, base64 encode the stringabc:123
and that is your key
- e.g. if your client_id is
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 IDGOOGLE_OAUTH_CLIENT_SECRET
- Google Cloud OAuth 2.0 client secretREDIRECT_URI
- Google OAuth 2.0 redirect_uri
- Copy
-
src/frontend/.env
- Copy
src/frontend/.env.example
tosrc/frontend/.env
and fill in the fields (VITE_OAUTH_CLIENT_ID
for local development, same value asGOOGLE_OAUTH_CLIENT_ID
)
- Copy
- Clone the repository to the directory of your choice -
git clone https://github.com/alneng/tunele.git
- Download dependencies -
yarn install
- Start the frontend and backend -
yarn start
- Access the frontend - http://localhost:5173
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