Coder Social home page Coder Social logo

ericdwkim / spotifyme Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.4 MB

A Spotify client clone with Flask, SQLAlchemy, Postgres, and Docker.

Home Page: https://ericdwkim.github.io/SpotifyMe

Python 93.17% CSS 1.83% HTML 1.83% Dockerfile 3.17%
flask flask-sqlalchemy flask-api sqlalchemy-orm sqlalchemy-models sqlalchemy-database-migrations python3 database-schema sql restfull-api postgresql-database pytest-flask spotify blueprints

spotifyme's Introduction

SpotifyMe

Welcome to the SpotifyMe repository; this is a clone of the popular music streaming app, Spotify!

SpotifyMe is built using the Flask API framework with the Flask-SQLAlchemy extension for database migrations.

Clone the repository

$ git clone https://github.com/ericdwkim/SpotifyMe

Initialize a virtual environment

Learn more about venv here

Unix/MacOS:

$ python3 -m venv venv
$ . venv/bin/activate

Windows:

$ python3 -m venv venv
$ . venv/Scripts/activate

Check Python and pip versions

This project has only been tested with the following python3 and pip versions.

Ensure that the installed python3 is version 3.9.4 on the venv

$ python3 -V

Ensure that the installed pip is version 21.1.2 on the venv

$ python3 -m pip install --upgrade pip==21.1.2
$ pip -V

Install dependencies to virtual environment

$ cd flask
$ python3 -m pip install -r requirements.txt

There are two ways to run the app:

  1. If you have a working Docker Environment already, pull the following images and run the containers.

Container images

Flask application image

$ docker pull ericdwkim/spotifyme-flask:v2

Postgres database (linux/arm64) image

$ docker pull ericdwkim/spotify-me-pg:v1

pgAdmin image

$ docker pull ericdwkim/spotify-me-pgadmin:v1

Run containers

$ docker compose up -d

Run multiple instances

$ docker compose up -d --build --scale app=3

This command will result in 3 separate instances of the spotifyme-flask (v2) app.

Tear down containers

$ docker compose down --rmi all

Webpage & Endpoints

Visit localhost:7777/api



2. Running locally on virtual environment

Toggle SQLALCHEMY_DATABASE_URI in flask/app.py to localhost

Toggle host in flask/config.py to localhost

$ cd flask
$ export FLASK_ENV=development
$ flask run

Run Migrations

$ cd flask
$ flask db init
$ flask db stamp head
$ flask db migrate
$ flask db upgrade

Webpage & Endpoints

Visit localhost:5000/api

spotifyme's People

Contributors

ericdwkim 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.