diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..9d9101486e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+package-lock.json
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/README.md b/README.md
index d3a0c37b8f..58beeaccd8 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,70 @@
-# L-square-QTify
\ No newline at end of file
+# Getting Started with Create React App
+
+This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm start`
+
+Runs the app in the development mode.\
+Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
+
+The page will reload when you make changes.\
+You may also see any lint errors in the console.
+
+### `npm test`
+
+Launches the test runner in the interactive watch mode.\
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+
+### `npm run build`
+
+Builds the app for production to the `build` folder.\
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.\
+Your app is ready to be deployed!
+
+See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
+
+### `npm run eject`
+
+**Note: this is a one-way operation. Once you `eject`, you can't go back!**
+
+If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+
+Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
+
+You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
+
+## Learn More
+
+You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
+
+To learn React, check out the [React documentation](https://reactjs.org/).
+
+### Code Splitting
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
+
+### Analyzing the Bundle Size
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
+
+### Making a Progressive Web App
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
+
+### Advanced Configuration
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
+
+### Deployment
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
+
+### `npm run build` fails to minify
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
diff --git a/package.json b/package.json
new file mode 100644
index 0000000000..e9106b8b2c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "qtify",
+ "version": "0.1.0",
+ "private": true,
+ "dependencies": {
+ "@emotion/react": "^11.14.0",
+ "@emotion/styled": "^11.14.1",
+ "@mui/icons-material": "^7.3.4",
+ "@mui/material": "^7.3.4",
+ "@testing-library/dom": "^10.4.1",
+ "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/react": "^16.3.0",
+ "@testing-library/user-event": "^13.5.0",
+ "axios": "^1.3.6",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "react-router": "^7.9.4",
+ "react-router-dom": "^7.9.4",
+ "react-scripts": "5.0.1",
+ "swiper": "^12.0.2",
+ "web-vitals": "^2.1.4"
+ },
+ "scripts": {
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test",
+ "eject": "react-scripts eject"
+ },
+ "eslintConfig": {
+ "extends": [
+ "react-app",
+ "react-app/jest"
+ ]
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
+}
diff --git a/public/Search.png b/public/Search.png
new file mode 100644
index 0000000000..004df103f4
Binary files /dev/null and b/public/Search.png differ
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000000..a11777cc47
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000000..ed93e6a897
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+ QTify
+
+
+
+
+
diff --git a/public/logo192.png b/public/logo192.png
new file mode 100644
index 0000000000..fc44b0a379
Binary files /dev/null and b/public/logo192.png differ
diff --git a/public/logo512.png b/public/logo512.png
new file mode 100644
index 0000000000..a4e47a6545
Binary files /dev/null and b/public/logo512.png differ
diff --git a/public/manifest.json b/public/manifest.json
new file mode 100644
index 0000000000..080d6c77ac
--- /dev/null
+++ b/public/manifest.json
@@ -0,0 +1,25 @@
+{
+ "short_name": "React App",
+ "name": "Create React App Sample",
+ "icons": [
+ {
+ "src": "favicon.ico",
+ "sizes": "64x64 32x32 24x24 16x16",
+ "type": "image/x-icon"
+ },
+ {
+ "src": "logo192.png",
+ "type": "image/png",
+ "sizes": "192x192"
+ },
+ {
+ "src": "logo512.png",
+ "type": "image/png",
+ "sizes": "512x512"
+ }
+ ],
+ "start_url": ".",
+ "display": "standalone",
+ "theme_color": "#000000",
+ "background_color": "#ffffff"
+}
diff --git a/public/qtify_logo.png b/public/qtify_logo.png
new file mode 100644
index 0000000000..92dbd00f7e
Binary files /dev/null and b/public/qtify_logo.png differ
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000000..e9e57dc4d4
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,3 @@
+# https://www.robotstxt.org/robotstxt.html
+User-agent: *
+Disallow:
diff --git a/public/vibrating-headphone 1.png b/public/vibrating-headphone 1.png
new file mode 100644
index 0000000000..0a2a9d8e38
Binary files /dev/null and b/public/vibrating-headphone 1.png differ
diff --git a/src/App.css b/src/App.css
new file mode 100644
index 0000000000..47a53bf208
--- /dev/null
+++ b/src/App.css
@@ -0,0 +1,46 @@
+.App {
+ text-align: center;
+ background-color: #000;
+ min-height: 100vh;
+ color: #fff;
+}
+
+.content-section {
+ background-color: #000;
+ min-height: 100vh;
+ padding: 20px;
+}
+
+.App-logo {
+ height: 40vmin;
+ pointer-events: none;
+}
+
+@media (prefers-reduced-motion: no-preference) {
+ .App-logo {
+ animation: App-logo-spin infinite 20s linear;
+ }
+}
+
+.App-header {
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: calc(10px + 2vmin);
+ color: white;
+}
+
+.App-link {
+ color: #61dafb;
+}
+
+@keyframes App-logo-spin {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
diff --git a/src/App.js b/src/App.js
new file mode 100644
index 0000000000..8fe308acd8
--- /dev/null
+++ b/src/App.js
@@ -0,0 +1,23 @@
+import React from "react";
+import "./App.css";
+import Navbar from "./components/pages/Navbar/Navbar";
+import Home from "./components/pages/Home/Home";
+import { Route, Routes } from "react-router";
+import AlbumDetails from "./components/pages/albumDetails/AlbumDetails";
+
+
+
+
+function App() {
+ return (
+
+
+
+ } />
+ } />
+
+
+ );
+}
+
+export default App;
diff --git a/src/App.test.js b/src/App.test.js
new file mode 100644
index 0000000000..1f03afeece
--- /dev/null
+++ b/src/App.test.js
@@ -0,0 +1,8 @@
+import { render, screen } from '@testing-library/react';
+import App from './App';
+
+test('renders learn react link', () => {
+ render( );
+ const linkElement = screen.getByText(/learn react/i);
+ expect(linkElement).toBeInTheDocument();
+});
diff --git a/src/components/pages/Button/Buttion.jsx b/src/components/pages/Button/Buttion.jsx
new file mode 100644
index 0000000000..b64669ac45
--- /dev/null
+++ b/src/components/pages/Button/Buttion.jsx
@@ -0,0 +1,36 @@
+import React from "react";
+import { Button as MUIButton } from "@mui/material";
+
+const Button = ({
+ text,
+ onClick,
+ variant = "contained",
+ // color = "primary",
+ size = "medium",
+ sx = {},
+ disabled = false,
+ fullWidth = false,
+ type = "button",
+}) => {
+ return (
+
+ {text}
+
+ );
+};
+
+export default Button;
diff --git a/src/components/pages/Button/Button.module.css b/src/components/pages/Button/Button.module.css
new file mode 100644
index 0000000000..23eea617dc
--- /dev/null
+++ b/src/components/pages/Button/Button.module.css
@@ -0,0 +1,20 @@
+:root {
+ --primary-color: #34c94b;
+ --background-color: #000000;
+}
+
+.button {
+ background-color: var(--background-color);
+ color: var(--primary-color);
+ border: 1px solid var(--primary-color);
+ border-radius: 8px;
+ padding: 8px 20px;
+ font-family: 'Poppins', sans-serif;
+ font-size: 16px;
+ cursor: pointer;
+ transition: 0.3s ease;
+}
+
+.button:hover {
+ opacity: 0.8;
+}
diff --git a/src/components/pages/Card/Card.jsx b/src/components/pages/Card/Card.jsx
new file mode 100644
index 0000000000..5a3e537623
--- /dev/null
+++ b/src/components/pages/Card/Card.jsx
@@ -0,0 +1,19 @@
+import React from 'react'
+import styles from './Card.module.css'
+
+const Card = ({ album }) => {
+ const { image, follows, title } = album;
+ return (
+
+
+
+
+
+
{title}
+
+ )
+}
+
+export default Card
\ No newline at end of file
diff --git a/src/components/pages/Card/Card.module.css b/src/components/pages/Card/Card.module.css
new file mode 100644
index 0000000000..1549fca880
--- /dev/null
+++ b/src/components/pages/Card/Card.module.css
@@ -0,0 +1,55 @@
+.card {
+ width: 160px;
+ border-radius: 10px;
+ overflow: hidden;
+ color: #000000;
+ font-family: 'Poppins', sans-serif;
+ display: flex;
+ flex-direction: column;
+}
+
+.imageContainer {
+ flex: 3;
+ width: 100%;
+ height: 0;
+ padding-top: 100%;
+ position: relative;
+}
+
+.image {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.bottomSection {
+ flex: 1;
+ padding: 8px;
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ background-color: #ffffff;
+ border-radius: 0px 0px 10px 10px;
+}
+
+/* Custom Chip Style */
+.chip {
+ background-color:#000000;
+ color: #ffffff;
+ font-weight: 500;
+ font-size: 0.8rem;
+ padding: 4px 8px 4px 6px;
+ border-radius: 16px;
+ width: fit-content;
+}
+
+.title {
+ font-size: 0.9rem;
+ font-weight: 500;
+ color: #fff;
+ margin: 10px 0;
+ text-align:left
+}
diff --git a/src/components/pages/FAQ/FAQSection.jsx b/src/components/pages/FAQ/FAQSection.jsx
new file mode 100644
index 0000000000..2233d13828
--- /dev/null
+++ b/src/components/pages/FAQ/FAQSection.jsx
@@ -0,0 +1,101 @@
+import React, { useState, useEffect, useRef } from "react";
+import {
+ Accordion,
+ AccordionSummary,
+ AccordionDetails,
+ Typography,
+ Box,
+ CircularProgress,
+ Alert,
+
+} from "@mui/material";
+import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
+import axios from "axios";
+
+
+
+const FAQ_API = "https://qtify-backend.labs.crio.do/faq";
+
+const FAQSection = () => {
+ const [faqs, setFaqs] = useState([]);
+ const [loading, setLoading] = useState(true);
+ const [error, setError] = useState("");
+ const [expanded, setExpanded] = useState(false);
+
+ const handleChange = (panel) => (_, isExpanded) =>
+ setExpanded(isExpanded ? panel : false);
+
+ useEffect(() => {
+ const fetchFAQs = async () => {
+ try {
+ setLoading(true);
+ const response = await axios.get(FAQ_API);
+ setFaqs(response.data.data || []);
+ } catch (err) {
+ console.error("FAQ fetch error:", err);
+ setError("Failed to fetch FAQs");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ fetchFAQs();
+ }, []);
+
+ if (loading) return ;
+ if (error) return {error} ;
+
+ return (
+
+
+ Frequently Asked Questions
+
+ {faqs.map((faq, i) => {
+ const isOpen = expanded === i;
+
+ return (
+
+
+
+ }
+ >
+ {faq.question}
+
+
+ {faq.answer}
+
+
+
+ );
+ })}
+
+ );
+}
+
+
+export default FAQSection
\ No newline at end of file
diff --git a/src/components/pages/FeedbackModal/FeedbackModal.jsx b/src/components/pages/FeedbackModal/FeedbackModal.jsx
new file mode 100644
index 0000000000..c1df7b65c3
--- /dev/null
+++ b/src/components/pages/FeedbackModal/FeedbackModal.jsx
@@ -0,0 +1,76 @@
+import { TextField, Box } from "@mui/material";
+import { useState } from "react";
+import Modal from "../../ui-lib/Modal/Modal";
+import Button from "../Button/Buttion";
+
+const FeedbackModal = ({ open, onClose }) => {
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ subject: "",
+ feedback: "",
+ });
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+ setFormData((prev) => ({ ...prev, [name]: value }));
+ };
+
+ const handleSubmit = () => {
+ console.log("Feedback submitted:", formData);
+ alert("Thank you for your feedback!");
+ onClose();
+ };
+
+ return (
+
+
+ {["name", "email", "subject"].map((field) => (
+
+ ))}
+
+
+
+
+
+
+ );
+};
+
+export default FeedbackModal;
diff --git a/src/components/pages/Hero/HeroSection.jsx b/src/components/pages/Hero/HeroSection.jsx
new file mode 100644
index 0000000000..8e0abd644b
--- /dev/null
+++ b/src/components/pages/Hero/HeroSection.jsx
@@ -0,0 +1,17 @@
+import React from 'react'
+import styles from './Herosection.module.css'
+
+const HeroSection = () => {
+ return (
+
+
+
+ 100 Thousand Songs, ad-free Over thousands podcast episodes
+
+
+
+
+ )
+}
+
+export default HeroSection
diff --git a/src/components/pages/Hero/Herosection.module.css b/src/components/pages/Hero/Herosection.module.css
new file mode 100644
index 0000000000..91ab9303b2
--- /dev/null
+++ b/src/components/pages/Hero/Herosection.module.css
@@ -0,0 +1,22 @@
+.hero {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 60px 250px;
+ background-color: #121212;
+ color: white;
+}
+
+.text h1 {
+ font-size: 2rem;
+ font-weight: bold;
+}
+
+.text p {
+ font-size: 1.2rem;
+ color: #b3b3b3;
+}
+
+.image {
+ width: 300px;
+}
diff --git a/src/components/pages/Home/Home.jsx b/src/components/pages/Home/Home.jsx
new file mode 100644
index 0000000000..be101e0474
--- /dev/null
+++ b/src/components/pages/Home/Home.jsx
@@ -0,0 +1,34 @@
+import React from "react";
+import Section from "../Section/Section";
+import SongsSection from "../SongsSection/SongsSection";
+import HeroSection from '../Hero/HeroSection'
+import API_URL from '../../../config/config'
+import { ENDPOINT } from "../../routes/routes";
+import QTifyExtras from "../FAQ/FAQSection";
+import FAQSection from "../FAQ/FAQSection";
+
+const Home = () => {
+ const APIS = {
+ TOP_ALBUMS: `${API_URL}${ENDPOINT.TOP_ALBUMS}`,
+ NEW_ALBUMS: `${API_URL}${ENDPOINT.NEW_ALBUMS}`,
+ GENRES: `${API_URL}${ENDPOINT.GENRES}`,
+ SONGS: `${API_URL}${ENDPOINT.SONGS}`,
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Home;
\ No newline at end of file
diff --git a/src/components/pages/Logo/Logo.jsx b/src/components/pages/Logo/Logo.jsx
new file mode 100644
index 0000000000..76128111f3
--- /dev/null
+++ b/src/components/pages/Logo/Logo.jsx
@@ -0,0 +1,14 @@
+import React from 'react'
+import styles from './Logo.module.css'
+
+const Logo = () => {
+ return (
+
+ )
+}
+
+export default Logo
diff --git a/src/components/pages/Logo/Logo.module.css b/src/components/pages/Logo/Logo.module.css
new file mode 100644
index 0000000000..e4c2ee4e2d
--- /dev/null
+++ b/src/components/pages/Logo/Logo.module.css
@@ -0,0 +1,4 @@
+.logo {
+ height: 40px;
+ cursor: pointer;
+}
diff --git a/src/components/pages/Navbar/Navbar.js b/src/components/pages/Navbar/Navbar.js
new file mode 100644
index 0000000000..40f58bc2b7
--- /dev/null
+++ b/src/components/pages/Navbar/Navbar.js
@@ -0,0 +1,47 @@
+import React, { useState } from "react";
+import styles from "./Navbar.module.css";
+import Logo from "../Logo/Logo";
+import Search from "../Search/Search";
+import Button from "../Button/Buttion";
+import FeedbackModal from "../FeedbackModal/FeedbackModal";
+import { NavLink } from "react-router";
+
+function Navbar() {
+ const [open, setOpen] = useState(false);
+
+ const handleModalOpen = () => {
+ console.log("Opening modal...");
+ setOpen(true);
+ };
+
+ const onClose = () => {
+ setOpen(false);
+ };
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {open && }
+ >
+ );
+}
+
+export default Navbar;
diff --git a/src/components/pages/Navbar/Navbar.module.css b/src/components/pages/Navbar/Navbar.module.css
new file mode 100644
index 0000000000..d3377cac7b
--- /dev/null
+++ b/src/components/pages/Navbar/Navbar.module.css
@@ -0,0 +1,26 @@
+.navbar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 16px 40px;
+ background-color: #34c94b;
+}
+
+
+.left {
+ flex: 1;
+ display: flex;
+ justify-content: flex-start;
+}
+
+
+.center {
+ flex: 1;
+}
+
+
+.right {
+ flex: 1;
+ display: flex;
+ justify-content: flex-end;
+}
diff --git a/src/components/pages/Qtify-carousel/Carousel.jsx b/src/components/pages/Qtify-carousel/Carousel.jsx
new file mode 100644
index 0000000000..5d18c96c3c
--- /dev/null
+++ b/src/components/pages/Qtify-carousel/Carousel.jsx
@@ -0,0 +1,78 @@
+
+import React, { useRef, useState } from "react";
+import { Swiper, SwiperSlide } from "swiper/react";
+import "swiper/css";
+
+const Carousel = ({ data = [], renderItem }) => {
+ const swiperRef = useRef(null);
+ const [isBeginning, setIsBeginning] = useState(true);
+ const [isEnd, setIsEnd] = useState(false);
+
+ return (
+
+ {!isBeginning && (
+ swiperRef.current.slidePrev()}
+ style={{
+ position: "absolute",
+ left: 0,
+ top: "40%",
+ transform: "translateY(-50%)",
+ zIndex: 10,
+ background: "#34c94b",
+ borderRadius: "100%",
+ border: "none",
+ padding: "10px",
+ cursor: "pointer",
+ color: "#ffffff"
+ }}
+ >
+ ◀
+
+ )}
+
+ (swiperRef.current = swiper)}
+ onSlideChange={(swiper) => {
+ setIsBeginning(swiper.isBeginning);
+ setIsEnd(swiper.isEnd);
+ }}
+ breakpoints={{
+ 320: { slidesPerView: 2, spaceBetween: 10 },
+ 640: { slidesPerView: 2.5, spaceBetween: 15 },
+ 1024: { slidesPerView: 5, spaceBetween: 20 },
+ 1280: { slidesPerView: 7, spaceBetween: 25 },
+ }}
+ >
+ {data?.map((item) => (
+ {renderItem(item)}
+ ))}
+
+
+ {!isEnd && (
+ swiperRef.current.slideNext()}
+ style={{
+ position: "absolute",
+ right: 0,
+ top: "40%",
+ transform: "translateY(-50%)",
+ zIndex: 10,
+ background: "#34c94b",
+ alignContent: "center",
+ borderRadius: "100%",
+ border: "none",
+ padding: "10px",
+ cursor: "pointer",
+ color: "#ffffff"
+ }}
+ >
+
+ ▶
+
+ )}
+
+ );
+};
+
+export default Carousel;
diff --git a/src/components/pages/Search/Search.jsx b/src/components/pages/Search/Search.jsx
new file mode 100644
index 0000000000..4fef6dc24c
--- /dev/null
+++ b/src/components/pages/Search/Search.jsx
@@ -0,0 +1,150 @@
+// src/components/Search/Search.jsx
+import React, { useState, useEffect, useRef, useMemo } from "react";
+import axios from "axios";
+import styles from "./Search.module.css";
+import {
+ TextField,
+ List,
+ ListItemButton,
+ ListItemText,
+ Paper,
+ Popper,
+ ClickAwayListener,
+ InputAdornment,
+} from "@mui/material";
+import debounce from "lodash/debounce";
+import { useNavigate } from "react-router";
+
+const SONGS_API = "https://qtify-backend.labs.crio.do/songs";
+
+function Search() {
+ const navigate = useNavigate()
+ const [query, setQuery] = useState("");
+ const [songs, setSongs] = useState([]);
+ const [filtered, setFiltered] = useState([]);
+ const [open, setOpen] = useState(false);
+ const anchorRef = useRef(null);
+
+ // fetch all songs once
+ useEffect(() => {
+ axios
+ .get(SONGS_API)
+ .then((res) => setSongs(res.data))
+ .catch((err) => console.error("Error fetching songs:", err));
+ }, []);
+
+ // debounce filtering
+ const debouncedFilter = useMemo(
+ () =>
+ debounce((searchTerm) => {
+ if (!searchTerm.trim()) {
+ setFiltered([]);
+ return;
+ }
+ const lower = searchTerm.toLowerCase();
+ const result = songs.filter(
+ (song) =>
+ song.title?.toLowerCase().includes(lower) ||
+ song.artist?.toLowerCase().includes(lower)
+ );
+ setFiltered(result);
+ }, 300), // 300ms debounce
+ [songs]
+ );
+
+ // handle query change
+ const handleChange = (e) => {
+ const value = e.target.value;
+ setQuery(value);
+ setOpen(true);
+ debouncedFilter(value);
+ };
+
+ const handleSelect = (song) => {
+ console.log("Selected song:", song);
+ setQuery(song.title);
+ setOpen(false);
+ navigate(`/albums/${song.id}`);
+ };
+
+ useEffect(() => {
+ return () => {
+ debouncedFilter.cancel();
+ };
+ }, [debouncedFilter]);
+
+ return (
+ setOpen(false)}>
+
+
query && setOpen(true)}
+ inputRef={anchorRef}
+ size="small"
+ sx={{
+ backgroundColor: "#fff",
+ borderRadius: "5px",
+ }}
+ InputProps={{
+ endAdornment: (
+
+
+
+ ),
+ }}
+ />
+
+ 0}
+ anchorEl={anchorRef.current}
+ style={{ zIndex: 1300, width: anchorRef.current?.offsetWidth || 400 }}
+ placement="bottom-start"
+ >
+
+
+ {filtered?.map((song) => (
+ handleSelect(song)}
+ sx={{
+ mb: 0.5,
+ "&:hover": {
+ backgroundColor: "#007BFF",
+ color: "#fff",
+ },
+ }}
+ >
+
+
+ ))}
+
+
+
+
+
+
+ );
+}
+
+export default Search;
diff --git a/src/components/pages/Search/Search.module.css b/src/components/pages/Search/Search.module.css
new file mode 100644
index 0000000000..bca2ccbda4
--- /dev/null
+++ b/src/components/pages/Search/Search.module.css
@@ -0,0 +1,29 @@
+.searchContainer {
+ position: relative;
+ width: 100%;
+ max-width: 700px;
+ display: flex;
+ align-items: center;
+}
+
+.icon {
+ position: absolute;
+ right: 12px;
+ width: 20px;
+ height: 20px;
+ pointer-events: none;
+ opacity: 0.7;
+}
+
+.searchInput {
+ width: 100%;
+ padding: 8px 16px 8px 40px;
+ border: 1px solid #ccc;
+ border-radius: 8px;
+ font-size: 16px;
+ outline: none;
+}
+
+.searchInput:focus {
+ border-color: #34c94b;
+}
diff --git a/src/components/pages/Search/SearchDropdown.jsx b/src/components/pages/Search/SearchDropdown.jsx
new file mode 100644
index 0000000000..1597814590
--- /dev/null
+++ b/src/components/pages/Search/SearchDropdown.jsx
@@ -0,0 +1,59 @@
+// src/components/Search/SearchDropdown.jsx
+import React, { useState, useEffect } from "react";
+import { TextField, List, ListItemButton, ListItemText, Paper, Popper, ClickAwayListener } from "@mui/material";
+import axios from "axios";
+import { useNavigate } from "react-router-dom";
+
+export default function SearchDropdown({ placeholder = "Search albums..." }) {
+ const [query, setQuery] = useState("");
+ const [results, setResults] = useState([]);
+ const [open, setOpen] = useState(false);
+ const navigate = useNavigate();
+
+ useEffect(() => {
+ if (!query) {
+ setResults([]);
+ return;
+ }
+ const cancelToken = axios.CancelToken.source();
+ // Example endpoint - replace with your real search endpoint or local filtering
+ axios.get(`https://qtify-backend.labs.crio.do/albums?q=${encodeURIComponent(query)}`, { cancelToken: cancelToken.token })
+ .then(res => setResults(res.data))
+ .catch(() => setResults([]));
+ return () => cancelToken.cancel();
+ }, [query]);
+
+ const handleSelect = (album) => {
+ console.log("album", album)
+ setQuery("");
+ setResults([]);
+ setOpen(false);
+ navigate(`/albums/${album.id}`);
+ };
+
+ return (
+ setOpen(false)}>
+
+
{ setQuery(e.target.value); setOpen(true); }}
+ onFocus={() => query && setOpen(true)}
+ size="small"
+ />
+ 0} anchorEl={document.activeElement} style={{ zIndex: 1300, width: "402px!important", backgroundColor: "#000" }}>
+
+
+ {results.map(album => (
+ handleSelect(album)}>
+
+
+ ))}
+
+
+
+
+
+ );
+}
diff --git a/src/components/pages/Section/Section.jsx b/src/components/pages/Section/Section.jsx
new file mode 100644
index 0000000000..4a07245a8a
--- /dev/null
+++ b/src/components/pages/Section/Section.jsx
@@ -0,0 +1,65 @@
+
+import React, { useEffect, useState } from "react";
+import Carousel from "../Qtify-carousel/Carousel";
+import Card from "../Card/Card";
+
+const Section = ({ title, apiEndpoint }) => {
+ const [albums, setAlbums] = useState([]);
+ const [collapsed, setCollapsed] = useState(true);
+
+ useEffect(() => {
+ fetch(apiEndpoint)
+ .then((res) => res.json())
+ .then((data) => setAlbums(data || []));
+ }, [apiEndpoint]);
+
+ const toggleView = () => setCollapsed((prev) => !prev);
+
+ return (
+
+
+
{title}
+
+ {collapsed ? "Show All" : "Collapse"}
+
+
+
+ {collapsed ? (
+
}
+ />
+ ) : (
+
+ {albums.map((album) => (
+
+ ))}
+
+ )}
+
+ );
+};
+
+export default Section;
diff --git a/src/components/pages/Section/Section.module.css b/src/components/pages/Section/Section.module.css
new file mode 100644
index 0000000000..ba5335685a
--- /dev/null
+++ b/src/components/pages/Section/Section.module.css
@@ -0,0 +1,31 @@
+.section {
+ margin: 40px 0;
+ color: white;
+ font-family: 'Poppins', sans-serif;
+}
+
+.header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 16px;
+}
+
+.title {
+ font-size: 1.5rem;
+ font-weight: 600;
+}
+
+.collapseBtn {
+ background: none;
+ border: none;
+ color: #34c94b;
+ font-size: 1rem;
+ cursor: pointer;
+}
+
+.grid {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+}
diff --git a/src/components/pages/SongsSection/SongsSection.jsx b/src/components/pages/SongsSection/SongsSection.jsx
new file mode 100644
index 0000000000..3984a7ba0d
--- /dev/null
+++ b/src/components/pages/SongsSection/SongsSection.jsx
@@ -0,0 +1,63 @@
+
+import React, { useEffect, useState } from "react";
+import axios from "axios";
+import Carousel from "../Qtify-carousel/Carousel";
+import Card from "../Card/Card";
+
+
+
+const SongsSection = ({ GENRES_API, SONGS_API }) => {
+ const [genres, setGenres] = useState([]);
+ const [songs, setSongs] = useState([]);
+ const [selectedGenre, setSelectedGenre] = useState("all");
+
+ useEffect(() => {
+ const fetchData = async () => {
+ try {
+ const gRes = await axios.get(GENRES_API);
+ setGenres(gRes.data.data || []);
+ const sRes = await axios.get(SONGS_API);
+ setSongs(sRes.data || []);
+ } catch (err) {
+ console.error("API fetch error:", err);
+ }
+ };
+ fetchData();
+ }, []);
+
+ const filteredSongs = songs.filter((song) => {
+ if (selectedGenre === "all") return true;
+ return song.genre?.key === selectedGenre;
+ });
+
+ return (
+
+
Songs
+
+
+ setSelectedGenre("all")}
+ >
+ All
+
+ {genres.map((g) => (
+ setSelectedGenre(g.key)}
+ >
+ {g.label}
+
+ ))}
+
+
+
}
+ />
+
+ );
+};
+
+export default SongsSection;
diff --git a/src/components/pages/SongsSection/SongsSection.module.css b/src/components/pages/SongsSection/SongsSection.module.css
new file mode 100644
index 0000000000..357e620610
--- /dev/null
+++ b/src/components/pages/SongsSection/SongsSection.module.css
@@ -0,0 +1,31 @@
+
+.tabWrapper {
+ margin-bottom: 12px;
+ padding-left: 8px;
+}
+
+.tabsRoot {
+ min-height: 40px;
+}
+
+.tabItem {
+ text-transform: none;
+ font-weight: 600;
+ font-size: 14px;
+ min-width: auto;
+ padding: 6px 12px;
+ margin-right: 8px;
+ border-radius: 20px;
+ background: transparent;
+ color: #bdbdbd;
+}
+
+
+.tabItem[aria-selected="true"] {
+ color: #ffffff;
+ background: linear-gradient(90deg,#7b61ff,#46d0ff);
+ box-shadow: 0px 6px 12px rgba(79, 60, 255, 0.12);
+}
+.carouselWrapper {
+ padding-top: 12px;
+}
diff --git a/src/components/pages/albumDetails/AlbumDetails.jsx b/src/components/pages/albumDetails/AlbumDetails.jsx
new file mode 100644
index 0000000000..5a00365985
--- /dev/null
+++ b/src/components/pages/albumDetails/AlbumDetails.jsx
@@ -0,0 +1,57 @@
+// src/pages/AlbumDetails.jsx
+import React, { useEffect, useState } from "react";
+import { useParams } from "react-router-dom";
+import { Typography, Box, List, ListItem, ListItemText, Pagination } from "@mui/material";
+import axios from "axios";
+
+const SONGS_PER_PAGE = 13;
+
+export default function AlbumDetails() {
+ const { id } = useParams();
+ console.log("id", id)
+ const [album, setAlbum] = useState(null);
+ const [songs, setSongs] = useState([]);
+ const [page, setPage] = useState(1);
+
+ useEffect(() => {
+ if (!id) return;
+ // Replace with the correct API paths for album and songs
+ axios.get(`https://qtify-backend.labs.crio.do/albums/${id}`)
+ .then(res => {
+ console.log("res", res.data)
+ setAlbum(res.data.album || res.data);
+ setSongs(res.data.songs || res.data.tracks || res.data.songsList || res.data.tracksList || res.data.songs || []);
+ })
+ .catch(() => {
+ // fallback: maybe album endpoint returns album with tracks
+ });
+ }, [id]);
+
+ const totalPages = Math.max(1, Math.ceil((songs.length || 0) / SONGS_PER_PAGE));
+ const pageSongs = songs.slice((page - 1) * SONGS_PER_PAGE, page * SONGS_PER_PAGE);
+
+ return (
+
+ {!album ? Loading album… : (
+ <>
+ {album.name}
+ {album.artist}
+
+
+
+ {pageSongs?.map((s, i) => (
+
+
+
+ ))}
+
+
+
+
+ setPage(val)} />
+
+ >
+ )}
+
+ );
+}
diff --git a/src/components/pages/songs/SongPlayer.jsx b/src/components/pages/songs/SongPlayer.jsx
new file mode 100644
index 0000000000..b83fd4e53a
--- /dev/null
+++ b/src/components/pages/songs/SongPlayer.jsx
@@ -0,0 +1,127 @@
+// src/components/Player/SongPlayer.jsx
+import React, { useEffect, useRef, useState } from "react";
+import { Box, IconButton, Slider, Typography, Stack } from "@mui/material";
+import PlayArrowIcon from '@mui/icons-material/PlayArrow';
+import PauseIcon from '@mui/icons-material/Pause';
+import SkipPreviousIcon from '@mui/icons-material/SkipPrevious';
+import SkipNextIcon from '@mui/icons-material/SkipNext';
+import VolumeUpIcon from '@mui/icons-material/VolumeUp';
+
+export default function SongPlayer({ playlist = [], initialIndex = 0 }) {
+ const audioRef = useRef(new Audio());
+ const [index, setIndex] = useState(initialIndex);
+ const [playing, setPlaying] = useState(false);
+ const [duration, setDuration] = useState(0);
+ const [currentTime, setCurrentTime] = useState(0);
+ const [volume, setVolume] = useState(0.8);
+
+ useEffect(() => {
+ const audio = audioRef.current;
+ audio.volume = volume;
+ }, [volume]);
+
+ useEffect(() => {
+ const audio = audioRef.current;
+ if (!playlist || playlist.length === 0) {
+ audio.pause();
+ setPlaying(false);
+ return;
+ }
+ audio.src = playlist[index].src;
+ audio.load();
+
+ const onLoaded = () => setDuration(audio.duration || 0);
+ const onTime = () => setCurrentTime(audio.currentTime || 0);
+ const onEnded = () => handleNext();
+
+ audio.addEventListener("loadedmetadata", onLoaded);
+ audio.addEventListener("timeupdate", onTime);
+ audio.addEventListener("ended", onEnded);
+
+ if (playing) audio.play().catch(() => setPlaying(false));
+
+ return () => {
+ audio.removeEventListener("loadedmetadata", onLoaded);
+ audio.removeEventListener("timeupdate", onTime);
+ audio.removeEventListener("ended", onEnded);
+ };
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [index, playlist]);
+
+ useEffect(() => {
+ const audio = audioRef.current;
+ if (playing) audio.play().catch(() => setPlaying(false));
+ else audio.pause();
+ }, [playing]);
+
+ const togglePlay = () => setPlaying(p => !p);
+
+ const handlePrev = () => {
+ setIndex(i => (i - 1 + playlist.length) % playlist.length);
+ setPlaying(true);
+ };
+
+ const handleNext = () => {
+ setIndex(i => (i + 1) % playlist.length);
+ setPlaying(true);
+ };
+
+ const handleSeek = (_, val) => {
+ audioRef.current.currentTime = val;
+ setCurrentTime(val);
+ };
+
+ const formatTime = (t) => {
+ const sec = Math.floor(t || 0);
+ const m = Math.floor(sec / 60).toString().padStart(2, "0");
+ const s = (sec % 60).toString().padStart(2, "0");
+ return `${m}:${s}`;
+ };
+
+ if (!playlist || playlist.length === 0) {
+ return No songs to play. ;
+ }
+
+ const current = playlist[index];
+
+ return (
+
+
+
+
+ {playing ? : }
+
+
+
+
+ {current.title}
+ {current.artist}
+
+
+
+ {formatTime(currentTime)}
+ {formatTime(duration)}
+
+
+
+
+
+ setVolume(typeof v === "number" ? v : volume)}
+ aria-label="volume"
+ />
+
+
+
+ );
+}
diff --git a/src/components/routes/routes.js b/src/components/routes/routes.js
new file mode 100644
index 0000000000..bcea8b3c8f
--- /dev/null
+++ b/src/components/routes/routes.js
@@ -0,0 +1,7 @@
+export const ENDPOINT={
+ TOP_ALBUMS:"/albums/top",
+ NEW_ALBUMS:"/albums/new",
+ GENRES:"/genres",
+ SONGS:"/songs"
+
+}
\ No newline at end of file
diff --git a/src/components/ui-lib/Modal/Modal.jsx b/src/components/ui-lib/Modal/Modal.jsx
new file mode 100644
index 0000000000..6b1f7ea763
--- /dev/null
+++ b/src/components/ui-lib/Modal/Modal.jsx
@@ -0,0 +1,73 @@
+import { useEffect } from "react";
+import { Box, Fade, IconButton, Typography } from "@mui/material";
+import CloseIcon from "@mui/icons-material/Close";
+
+const Modal = ({ open, onClose, title, children, width = 400 }) => {
+ // Disable background scrolling when modal is open
+ useEffect(() => {
+ if (open) {
+ document.body.style.overflow = "hidden";
+ } else {
+ document.body.style.overflow = "auto";
+ }
+ return () => {
+ document.body.style.overflow = "auto";
+ };
+ }, [open]);
+
+ if (!open) return null;
+
+ return (
+
+
+ e.stopPropagation()} // prevent closing when clicking inside modal
+ >
+
+
+
+
+ {title && (
+
+ {title}
+
+ )}
+
+ {children}
+
+
+
+ );
+};
+
+export default Modal;
diff --git a/src/config/config.js b/src/config/config.js
new file mode 100644
index 0000000000..fde25030cc
--- /dev/null
+++ b/src/config/config.js
@@ -0,0 +1,3 @@
+
+ const API_URL="https://qtify-backend.labs.crio.do";
+ export default API_URL;
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
new file mode 100644
index 0000000000..ec2585e8c0
--- /dev/null
+++ b/src/index.css
@@ -0,0 +1,13 @@
+body {
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+ sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+code {
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
+ monospace;
+}
diff --git a/src/index.js b/src/index.js
new file mode 100644
index 0000000000..ed58da21af
--- /dev/null
+++ b/src/index.js
@@ -0,0 +1,23 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import App from './App';
+import reportWebVitals from './reportWebVitals';
+import { BrowserRouter } from 'react-router';
+
+
+
+
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
+
+
+
+
+ ,
+);
+
+// If you want to start measuring performance in your app, pass a function
+// to log results (for example: reportWebVitals(console.log))
+// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
+reportWebVitals();
diff --git a/src/logo.svg b/src/logo.svg
new file mode 100644
index 0000000000..9dfc1c058c
--- /dev/null
+++ b/src/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js
new file mode 100644
index 0000000000..5253d3ad9e
--- /dev/null
+++ b/src/reportWebVitals.js
@@ -0,0 +1,13 @@
+const reportWebVitals = onPerfEntry => {
+ if (onPerfEntry && onPerfEntry instanceof Function) {
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
+ getCLS(onPerfEntry);
+ getFID(onPerfEntry);
+ getFCP(onPerfEntry);
+ getLCP(onPerfEntry);
+ getTTFB(onPerfEntry);
+ });
+ }
+};
+
+export default reportWebVitals;
diff --git a/src/setupTests.js b/src/setupTests.js
new file mode 100644
index 0000000000..8f2609b7b3
--- /dev/null
+++ b/src/setupTests.js
@@ -0,0 +1,5 @@
+// jest-dom adds custom jest matchers for asserting on DOM nodes.
+// allows you to do things like:
+// expect(element).toHaveTextContent(/react/i)
+// learn more: https://github.com/testing-library/jest-dom
+import '@testing-library/jest-dom';