Skip to content

ReactJS website to automatically generate playlists based on how the music sounds.

License

Notifications You must be signed in to change notification settings

teticio/deej-ai.online-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

af069ad · Oct 11, 2021
Sep 18, 2021
Sep 28, 2021
Oct 11, 2021
Sep 13, 2021
Oct 5, 2021
Oct 11, 2021
Sep 13, 2021
Sep 4, 2021
Aug 26, 2021
Aug 18, 2021
Oct 3, 2021
Sep 12, 2021
Sep 13, 2021
Aug 8, 2021
Oct 3, 2021
Oct 3, 2021
Oct 7, 2021
Oct 11, 2021
Sep 18, 2021
Sep 2, 2021
Sep 2, 2021
Oct 4, 2021
Aug 18, 2021
Sep 2, 2021
Sep 16, 2021
Oct 3, 2021
Sep 12, 2021
Sep 13, 2021
Oct 3, 2021
Aug 16, 2021
Aug 21, 2021
Sep 13, 2021
Oct 7, 2021
Oct 7, 2021
Oct 7, 2021
Oct 3, 2021

Repository files navigation

Deej-A.I. React App Build Status

Deej-A.I.

This is the source code for my webpage which is hosted at https://deej-ai.online/. If you are interested in the deep learning models that are used in the backend, have a look at my other repo https://github.com/teticio/Deej-A.I./.

In order to run this, you wil need to create a credentials.py file in the backend directory with your Spotify Developer API credentials, which can be obtained from https://developer.spotify.com/dashboard/login.

CLIENT_ID = '<Your client ID>'
CLIENT_SECRET = '<Your secret>'
REDIRECT_URI = '<Your external webpage URL>/api/v1/callback'

You will also need to download the following files to the root directory:

The easiest way to do this is by running python download.py. You should also set REACT_APP_API_URL to '<Your external webpage URL>/api/v1' in .env.production and APP_URL to <Your external webpage URL> in run.sh.

If you have pipenv and yarn already installed you can then type

./install.sh

and

./run.sh

(In Windows, you will either have to run these commands in a Git Bash shell or adapt the scripts as appropriate). As a final step, you can then set up a reverse proxy to http://localhost:8000/.

Deployment on a Kubernetes cluster with Helm

To build the Docker image, run

./build_docker.sh

You will need to have already created your credentials.py, as explained above. To install the Helm chart type

./install_helm.sh

The scripts assume you are running a minikube. To install on an AWS cluster with Kops

./deploy_kops.sh <Your external webpage domain>

provided your domain is hosted by Route 53 and you have configured the DNS, S3 and IAM settings appropriately to run Kops. If everything has gone to plan,

kubectl get svc -n deejai

will return an external IP for the Elastic Load Balancer (ELB). You will need to point your domain to the ELB by editing the relevant A record for your hosted zone in the AWS console.

React Native

Deej-A.I. Deej-A.I.

ReactJS and React Native are very similar but quite different at the same time. I wanted to avoid duplicating code as mch as possible (following the DRY - Don't Repeat Yourself - principle) so I have wrapped the platform specific code in Platform.js and Platform.native.js. In particular, the standard HTML tags like <h1> or <a> have been replaced with wrapper components (e.g., Text and Link). To run on iOS or Android using Expo type

yarn start-native

You can build an APK or IPA if you have an Expo account with

expo build:android

or

expo build:ios