Coder Social home page Coder Social logo

leinadium / guessify Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 736 KB

Simple game to guess a music from your setlists using Spotify API and SDK

License: MIT License

Python 2.40% HTML 0.26% Svelte 81.79% JavaScript 9.42% Rust 5.58% Dockerfile 0.55%

guessify's Introduction

Guessify

Repository for the game Guessify, available at guessify.me.

This is game is currently not available to everyone, as I currently don't have permission to publish the app
(Spotify Policy III.2), but I'm working on it.

This game was created to practice my frontend skills, as I had none prior to this. The game was made using Svelte and served using Github Pages.

The frontend is where all the game logic is contained, and the backend has the purpose of providing authentication for the game.

How to run

Front

Edit the front/src/lib/utils.js file and change the URL constants:

const API_URL = "your.api.endpoint.com";
export const FRONT_URL = "your.front.endpoint.com";
// ...

Install requirements and run as dev:

cd front
npm install
npm run dev

API

Flask (Python)

At first, the API was a simple Flask application (available at api/).

Edit the api/.env:

CLIENT_ID = "YOUR_CLIENT_ID"
CLIENT_SECRET = "YOUR_CLIENT_SECRET"
API_URL = "your.api.endpoint.com"
FRONT_URL = "your.front.endpoint.com"

Install requirements and run as dev:

cd api
python3 -m venv venv
source venv/bin/activate

pip install -r requirements.txt
flask run

Actix (Rust)

In order to create a more robust backend, and also practice my Rust skills, there is an API written in Rust available at server/.

Compile the project:

cd server
cargo build --release

Create an .env file and copy to the same folder as the binary application, and then run the application.

CLIENT_ID = "YOUR_CLIENT_ID"
CLIENT_SECRET = "YOUR_CLIENT_SECRET"
API_URL = "your.api.endpoint.com"
FRONT_URL = "your.front.endpoint.com"

Known problems

  • Sometimes, the game autosubmits/skips the music when the game page is loaded

guessify's People

Contributors

dependabot[bot] avatar leinadium avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.