my-favorite-albums-svelte Svelte Themes

My Favorite Albums Svelte

A simple application written in SvelteKit with Spotify API that lets you browse and pick your favorite albums.

Getting Started

First, you'll need to register with Spotify to create your client ID. Please see Create & manage your Spotify integrations dashboard.

Then follow these steps:

  1. Clone this project: git clone https://github.com/iohcidnal/my-favorite-albums-svelte.git

  2. Run yarn to install dependecies

  3. Create an .env file in the root folder with the following entries:

VITE_PUBLIC_CLIENT_ID=your-spotify-client-id
VITE_PUBLIC_REDIRECT_URL=http://localhost:3000

Make sure that VITE_PUBLIC_REDIRECT_URL's value matches the Redirect URI of your application settings in Spotify. This file should also be in your .gitignore for security.

Developing

Once you've completed the steps above, start a development server:

yarn dev

# or start the server and open the app in a new browser tab
yarn dev --open

Building

Before creating a production version of your app, install an adapter for your target environment. Then:

yarn build

You can preview the built app with yarn preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

Top categories

Loading Svelte Themes