Skip to content

jcanelis/trackqueen

Repository files navigation

update

TrackQueen

Learn more about your music.

TrackQueen gives you analysis, background info, comments, lyrics, videos and other content about your currently playing song.

Content APIs

TrackQueen uses several APIs to collect its content:

Brand Guidelines

For each API, it's important to follow the respective branding guidelines for how to properly display the content. Spotify, ACRCloud, ChatGPT (Open AI), Musixmatch, and YouTube have documentation on how to display their brand assets. Genius doesn't appear to currently allow the display of their logo.

Development

TrackQueen is built using:

Getting Started

  1. Clone this repo: git clone https://github.com/jcanelis/trackqueen.git
  2. Install NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
  3. Set Node version: nvm use 20.10.0
  4. Install dependencies by running yarn within the repo.
  5. Install Expo CLI: yarn global add expo-cli
  6. Start development: yarn start or npx expo start

Cloud Functions for Firebase

Cloud Functions for Firebase is used to create microservices with Node.js. These are used for things like authenticating users with Spotify's API and getting refresh tokens. This is the “back-end” of TrackQueen.

Getting Started

  • Install the Firebase CLI with curl -sL https://firebase.tools | bash
  • Connect the app by running: firebase init.

Local Development

The Firebase Local Emulator Suite is used to develop locally. Use this to call a microservice or test other Firebase functionality. Start the emulator(s) by running firebase emulators:start. Learn more here.

Deploy Functions

  • Updating functions: firebase deploy --only functions
  • Update specific function: firebase deploy --only functions:refreshToken

Secrets

TrackQueen uses Google Cloud Secret Manager to store API keys.

  • Get secret value firebase functions:secrets:access KEY_NAME@latest
  • Change secret value firebase functions:secrets:set SECRET_NAME
  • Destroy secret value firebase functions:secrets:destroy SECRET_NAME

Environment Variables

  • Set variable: firebase functions:config:set stripe.password="12345"
  • Get all variables: firebase functions:config:get
  • Remove variables: firebase functions:config:unset key1 key2
  • Switch to local variables firebase functions:config:get > .runtimeconfig.json

Create Builds

Development builds

Create a development build for iOS Simulator:

npx eas-cli build --profile development-simulator --platform ios

Run build on iOS Simulator

npx expo run:ios

Create a build for a device:

npx eas-cli build --profile development --platform ios

Build for App Store with Expo's EAS Build

npx eas-cli build --platform ios

Submit to App Store

Use Expo's EAS Submit with the command below to send a build to App Store Connect, where the app can be distributed to users with TestFlight or to the App Store.

npx eas-cli submit -p ios