Welcome to SangitπΆ, a seamless music streaming experience where you can explore, discover, and enjoy everything about music from everywhere! With a rich feature set, modern UI, and smooth integration with the backend, Sangit is your gateway to the world of music.
- Browse, search, and play songs.
- High-quality audio streaming with controls for play, pause, and stop.
- Persistent global song player across the app.
- Create, edit, and delete playlists.
- Add or remove songs to/from playlists.
- View and manage playlists effortlessly.
- Get personalized song recommendations.
- Explore playback history and rediscover your favorite tracks.
- Follow your favorite artists and never miss their updates.
- View and update your profile (bio and profile picture).
- Secure authentication and session management with JWT.
- User registration and login.
- Secured private routes for authenticated users.
- Frontend: React, Tailwind CSS
- State Management: Context API
- HTTP Client: Axios
- Routing: React Router DOM
- Backend: Sangit Backend Repository (Spring Boot, MySQL)
sangit-frontend/
βββ public/ # Public files like index.html
βββ src/ # Source files
β βββ components/ # Reusable React components
β β βββ Auth/ # Login and Register components
β β βββ Profile/ # User Profile component
β β βββ Songs/ # Song-related components (Player, List, Search)
β β βββ Playlists/ # Playlist-related components
β β βββ Discover/ # Discovery features (Recommended, Follow Artist)
β βββ context/ # Auth and Player Context providers
β βββ hooks/ # Custom hooks like useAuth
β βββ pages/ # Page components (Login, Dashboard, Profile, etc.)
β βββ routes/ # PrivateRoute for securing routes
β βββ utils/ # Utility functions (API handler, token manager)
β βββ App.js # Main application component
β βββ index.css # CSS containing tailwind CSS rules
β βββ index.js # Entry point for React
βββ package.json # Project dependencies
βββ tailwind.config.js # Tailwind CSS configuration
βββ README.md # Project documentation
- Node.js (v14 or higher) and npm installed.
- Backend API up and running. Check the Sangit Backend Repository for setup instructions.
-
Clone the repository:
git clone https://github.com/VinayHajare/Sangit.git cd Sangit
-
Install dependencies:
npm install
-
Configure the backend API base URL in
/src/utils/api.js
:import axios from "axios"; const api = axios.create({ baseURL: "http://localhost:8080/api", // Replace with your backend API URL }); export default api;
-
Start the development server:
npm start
-
Open the app in your browser:
http://localhost:3000
- Access the login page at
/
. - Use the "Don't have an account?" link to register.
- Enter valid credentials to log in.
- Navigate to
/dashboard
for quick access to all features:- Songs
- Playlists
- Discovery
- Profile
- View songs at
/songs
. - Search for songs using filters (title, artist, album, genre).
- Play songs directly, and control playback using the global song player.
- Create playlists at
/playlists/create
. - View playlists at
/playlists
. - Add or remove songs in
/playlists/:playlistId
.
- Get personalized recommendations at
/discover
. - View playback history at
/history
. - Follow/unfollow artists at
/follow
.
- View and edit profile details (bio and profile picture) at
/profile
.
-
Build the app for production:
npm run build
-
Deploy the
build/
folder to your hosting service (e.g., Netlify, Vercel, AWS).
- Ensure the backend API is running and accessible.
- Run the frontend development server:
npm start
- Test user flows:
- Register and log in.
- Navigate to the dashboard and explore playlists, discovery, and profile.
- Verify the song player functionality on all pages.
- Test API calls for each feature (e.g., adding songs to a playlist, following artists).
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, feel free to reach out:
- Email: vinayhajare2004@gmail.com
- GitHub: VinayHajare
Enjoy streaming with SangitπΆ!