Skip to content

MarceJua/Album-Finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Spotify Artist Search

This project is a React application that allows users to search for artists on Spotify and view their albums. It uses the Spotify Web API to fetch artist and album data.

Album Finder

Features

  • Search for artists by name.
  • Display a list of albums for the searched artist.
  • Uses Spotify's client credentials flow for authentication.

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/spotify-artist-search.git
    cd spotify-artist-search
  2. Install dependencies:
    npm install
  3. Create a .env file in the root directory and add your Spotify API credentials:
     REACT_APP_SPOTIFY_CLIENT_ID=your-client-id
     REACT_APP_SPOTIFY_CLIENT_SECRET=your-client-secret
     

Usage

  1. Start the development server:
    npm run dev
  2. Open your browser and navigate to http://localhost:3000
  3. Enter the name of an artist in the search input and press Enter or click the Search button.
  4. View the list of albums for the searched artist.

Code Overview

App.jsx: The main component that handles the search functionality and displays the results.

  • Uses useEffect to fetch the access token from Spotify API on component mount.
  • Contains the search function to fetch artist and album data from Spotify API.
  • Renders the search input and button, and displays the list of albums.

Dependencies

  • React
  • Bootstrap (for styling)
  • Spotify Web API

About

Album Finder with Spotify API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published