Coder Social home page Coder Social logo

app's Introduction

Festify

Greenkeeper badge Build Status

Festify is a free Spotify-powered app that lets your guests choose which music should be played using their smartphones. festify.rocks

Building

Dependencies

  1. nodejs, TypeScript and yarn: Festify is written in TypeScript for better scalability and fewer bugs. We use yarn for package management.
  2. Firebase: Festify is built upon Firebase Realtime Database and Firebase Cloud Functions. Set up a dedicated and paid Firebase project. For user management, you need to enable at least anonymous authentication, and if you want cheat-prevention to work, also authentication with GitHub, Facebook, Twitter, and Google+. In that case, you also need to set up and register the respective app / developer accounts with these services.
  3. Spotify: Festify plays music from Spotify. Set up a Spotify Developer Application (you need a Spotify Premium account) and configure the OAuth redirect URL. Usually at least http://localhost:3000 is needed for a dev-environment. 3000 is the port the dev-server started with yarn serve runs on, but this can be any port you like, if you configure the dev server accordingly.
  4. Fanart.tv & Sentry: Festify displays Fanart from fanart.tv in the TV Mode and uses Sentry for error reporting. You require an account for both services.

Environment Files

Festify loads configuration variables though JS / TS / JSON files included in the build process. All following paths are relative to the repository root.

  • common.config.js: This file includes common configuration values that don't deserve their own file. Currently this is the Sentry URL and the Fanart.tv API key. It looks like this:

    export const FANART_TV_API_KEY = "FANART_API_KEY_HERE";
    export const SENTRY_URL = "SENTRY_URL_HERE";
  • firebase.config.js: This file contains a simplified form of the config snippet you get when you add Firebase to a web application.

    export default {
        apiKey: "FIREBASE_API_KEY",
        authDomain: "FIREBASE_AUTH_DOMAIN",
        databaseURL: "FIREBASE_DATABASE_URL",
        projectId: "FIREBASE_PROJECT_ID",
    };
  • spotify.config.js: This file contains the required configuration for authorization with Spotify and playback.

    export const CLIENT_ID = "YOUR_SPOTIFY_APPLICATION_CLIENT_ID";
  • functions/service-account.json: This is the Firebase service account file obtained directly from the web console. You can obtain it by going to Project Settings > Service Accounts > Firebase Admin SDK > Generate new private key.

  • functions/spotify.config.ts: This file contains Spotify configuration for the cloud functions.

    export const CLIENT_ID = "YOUR_SPOTIFY_APPLICATION_CLIENT_ID";
    export const ENCRYPTION_SECRET = "REFRESH_TOKEN_ENCRYPTION_KEY - PLEASE GENERATE";
    export const CLIENT_SECRET = "YOUR_SPOTIFY_APPLICATION_CLIENT_SECRET";

Since all config values (except for the service-account.json) are loaded through standard ES modules machinery, building the project will notify you if something is missing.

Building & Serving

The package.json contains all necessary commands for building Festify.

  • build: Compiles the TypeScript to JS and bundles all JS to a single file. You can then deploy the files in /build to a webserver of choice to run Festify.
  • fix: Attempts to automatically fix linter errors.
  • lint: Lints the TS sources with tslint.
  • prepare-env: Used in CI environments to load environment files from branch-name-suffixed environment variables.
  • serve: Starts the rollup dev-server serving a local instance of Festify on port 3000. Also supports live-reloading. Ensure you deploy the project to firebase before using the dev server because Festify depends on cloud functions to be present!

Contributing

  1. Fork it! :octocat:
  2. Create your feature branch: git checkout -b my-improvement
  3. Make your changes and test them!
  4. Commit & push your changes
  5. Submit a pull request 🚀

License

LGPLv3

Sponsors

These people helped us bring Festify to life. Thank you!

app's People

Contributors

amenk avatar dannyspijker avatar greenkeeper[bot] avatar greenkeeperio-bot avatar leolabs avatar mraerino avatar neolegends avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app's Issues

Skip Feature

Currently it's not possible to skip a track without debugger access.

Vote-Index verbessern

Momentan gibt es Probleme mit firebase-document, weil bei der virtualisierten iron-list zu oft der Pfad gesetzt wird, alsdass ein stabiles Abrufen der Votes möglich wäre.

Lösung: Es soll ein zweiter Vote-Index erstellt werden, der nach Party->User ID->Votes sortiert ist. Dann kann man einen Firebase-Listener auf das gesamte Vote-Objekt des Users legen, und sich daraus alle Daten ähnlich wie bei den Metadaten ziehen.

Question: Authentication Problems

When running the app I am getting authentication errors.

I have setup an firebase and AWS lambda function.

For the app, I use the following .env

FIREBASE_API_KEY="aaaaaa"
FIREBASE_AUTH_DOMAIN="festify-xxxxx.firebaseapp.com"
FIREBASE_DB_URL="https://festify-xxxx.firebaseio.com"
SPOTIFY_CLIENT_ID="yyyyy"
SPOTIFY_TOKEN_SWAP_URL="https://zzzzz.execute-api.eu-central-1.amazonaws.com/dev/exchange"
SPOTIFY_TOKEN_REFRESH_URL="https://zzzzz.execute-api.eu-central-1.amazonaws.com/dev/refresh"

Redirect from /<Party ID> to /party/<ID>

Wenn die Leute einen Direktlink eingeben sollen sie, wie bisher auch, automatisch auf die richtige Party weitergeleitet werden, falls möglich. Die Funktionalität muss im Root-Routing eingebaut werden.

Minification

Momentan hat das vulkanisierte Bundle etwa 1,6MB. Das ist für den Release etwas viel und muss durch Minification and Tree-Shaking reduziert werden.

Queue does not update in background (iOS)

When the app is playing in the background and skips to the next track, the queue view does not update accordingly, if one switches back into the app:

Actually, alt-j was playing at that time:
grad lauft eig alt j

This is probably linked to #38.

ES6 Build Output

Eventuell können wir für Browser, die ES6 vollständig unterstützen, uns das babeln sparen und für diese Browser einen gesonderten Build ausliefern.

App loses state when suspended by OS

If the app is put into the background by the operating system, it loses all of its internal state. When the app is resumed, the user is presented the start screen.

Audio testing

Currently we do not know what happens when e. g. the User pulls out the AUX cable or is disconnected from AirPlay. Those cases need to be figured out.

Rubberbanding turned off

I think we turned it off to prevent that weird bug with app-header-layout, but since we got rid of it a short while ago, we should turn it on again.

Refactor login flow

Currently one is signed into the Spotify account the moment a party is joined. This is unintuitive.

Generalization of #24

LAN database support

Currently a firebase cloud database is needed.

Use case:

Support grilling hut "Grillhütte" parties where no internet connection is available.

The question is, if an other, self-hostable Firebase alternative can be used.

Self-added tracks do not appear in the local queue

When one votes a new track into the Queue, it does not appear in the local queue, only on the queue of other devices.

Under the Bridge is actually next, but not shown (also notice the broken visuals):
bug

As soon as the track is over and playback skips to the next track, everything turns out fine:
das nachste lied geht dann

Crash on Android Emulator / Building and Running in General

Directly after starting it, the app crashes.

logcat:

03-02 22:40:02.849  1757  3038 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{6006db6 0:rocks.festify.app/u0a61}
03-02 22:40:02.960  1757  3038 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=rocks.festify.app/.MainActivity bnds=[773,1102][997,1326] (has extras)} from uid 10012 on display 0
03-02 22:40:03.043  1757  2407 I ActivityManager: Start proc 3065:rocks.festify.app/u0a61 for activity rocks.festify.app/.MainActivity
03-02 22:40:03.112  3065  3065 W System  : ClassLoader referenced unknown path: /data/app/rocks.festify.app-1/lib/x86_64
03-02 22:40:03.290  3065  3065 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 3065 (cks.festify.app)
03-02 22:40:03.343  3084  3084 F DEBUG   : pid: 3065, tid: 3065, name: cks.festify.app  >>> rocks.festify.app <<<
03-02 22:40:03.422  1757  1822 I WindowManager: Destroying surface Surface(name=Application Error: rocks.festify.app) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementInner:429 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop:232 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement:180 com.android.server.wm.WindowManagerService$H.handleMessage:8079 android.os.Handler.dispatchMessage:102 
03-02 22:40:03.766  1757  3089 W ActivityManager:   Force finishing activity rocks.festify.app/.MainActivity
03-02 22:40:03.908  1757  2407 I ActivityManager: Process rocks.festify.app (pid 3065) has died
03-02 22:40:04.322  1757  1822 I WindowManager: Destroying surface Surface(name=Starting rocks.festify.app) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.AppWindowToken.destroySurfaces:365 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:427 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:196 

Polymer 2.0

Sobald Polymer 2.0 fertig ist, kann / sollte das Projekt darauf migriert werden, damit man auf dem neuesten Stand bleibt.

#8 wäre ebenfalls cool mit Polymer 2.0.

App-Drawer-Layout des Voting-Screens fixen

Momentan schiebt das app-drawer-layout die Seite auf volle Breite und zeigt den Drawer seitlich fix an. Man muss schauen, wie man den Voting-Screen auf großen Bildschirmen generell implementiert.

Queue worker process

We need a worker process somewhere in the cloud that is responsible for updating the "order" values after votes have changed.

Prevent vote cheating

We want to allow the party host to require his guests to sign in via a social login provider to be able to vote. This will prevent vote cheating once and for all (modulo multiple accounts).

Lizenzen anzeigen

So Sachen wie die Polymer-Lizenz sollten nachher im Produkt irgendwo zu finden sein, damit da kein findiger Anwalt was zu meckern hat.

Fanart-Background-Optik

Es wäre cool, wenn der Fanart-Hintergrund beim Übergang smooth faded und sich dezent bewegt (Ken Burns etc.).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.