emw8105 / Wallify

A fun program designed to allow a user to generate a custom wallpaper of their top music choices using their spotify data
https://wallify.doypid.com/
1 stars 0 forks source link

Wallify

Wallify is a web application built with React and hosted on Vercel, designed to display content from Spotify in the form of a customizable wallpaper. The app uses the Spotify Web API to retrieve user data and provides a highly configurable layout, allowing users to create and download personalized grids of their favorite artists or tracks. It makes use of several services for layered cloud-based architecture, including a custom domain managed by Cloudflare, client site hosting on Vercel, and an EC2 instance for the backend with a secure reverse proxy via NGINX.

Note: The underlying Spotify app used to handle the Spotify data retrieval is currently in Development Mode. This limits the number of users to 25, each which must be entered into the developer console to be authorized. To make this app work for anyone else, a new Spotify app must be created here. I plan to submit an extension request to provide easier access to the wallpapers for a wider audience, but approval may take up to 6 weeks.

Table of Contents

Features

Architecture

Wallify’s architecture leverages a hybrid cloud stack optimized for performance and scalability. Both the frontend and backend have supporting Docker files for containerization:

Installation

Prerequisites

  1. Clone the repository:

    git clone https://github.com/emw8105/Wallify.git
    cd Wallify
  2. Install the dependencies:

    npm install
  3. Create a .env file with your credentials in the /server directory:

    CLIENT_ID=your_spotify_client_id
    CLIENT_SECRET=your_spotify_client_secret
    REDIRECT_URI=http://yourdomain/callback
  4. Cloudflare Setup:

    • Register a domain with Cloudflare and configure DNS records:
    • A Record for yourdomain.com pointing to Vercel
    • A Record for api.yourdomain.com pointing to your EC2 instance
    • Enable SSL for the domain through Cloudflare
  5. EC2 Setup:

    • Install Docker, Docker Compose, and NGINX.
    • Configure NGINX as a reverse proxy for https://api.yourdomain.com to route requests to the Go server on port 8888.
  6. Run the Deployment Script

    • Deploy the app with the provided bash script:
      ./deploy.sh
  7. Open http://localhost:3000 to view it in the browser

Available Scripts

In the project directory, you can run:

Project Structure

Limitations

Contributing

Contributions are very much welcome, feel free to add anything or even provide feedback, I would love any facet of collaboration on this.