A social network web application built on Flask that allows users to log in via their Spotify account. The web app seamlessly integrates with Spotify's API to enable users to share their favorite music tracks, playlists, and discover new music with their friends.
- User authentication via Spotify account
- View and follow friends' music activities
- Share music tracks and playlists on the feed
- Like, comment, and repost music posts
- User profile customization
- Search for music tracks, albums, and artists on Spotify
- Clone this repository to your local machine:
git clone https://github.com/dmhd6219/SocialNetwork.git
- Set up a virtual environment (optional but recommended):
cd SocialNetwork
python -m venv venv
source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
To run the web application, you will need to set up a Spotify Developer account and obtain the necessary API credentials. Follow these steps:
- Go to the Spotify Developer Dashboard and log in with your Spotify account.
- Create a new application and note down the
Client ID
andClient Secret
. - In the project directory, create a new file named
.env
and add the following lines:
SPOTIPY_CLIENT_ID = 'your_spotify_client_id'
SPOTIPY_CLIENT_SECRET = 'your_spotify_client_secret'
SPOTIPY_REDIRECT_URI = 'http://localhost:8080/callback' # Change this if required
Replace your_spotify_client_id
and your_spotify_client_secret
with the credentials obtained in step 2.
- Run the Flask development server:
python main.py
- Open your web browser and go to
http://localhost:8080
.
To deploy the web app for public use, consider using platforms like Heroku, AWS, or others that support Flask applications.
Contributions are welcome! If you want to add new features, fix bugs, or improve the existing codebase, feel free to open a pull request.
This project is licensed under the MIT License.