Index: frontend/src/components/Sidebar.tsx
===================================================================
--- frontend/src/components/Sidebar.tsx	(revision f5bc95e4a628b62884f4631d8a118a9790052953)
+++ frontend/src/components/Sidebar.tsx	(revision 85512ff50bc46445db00d8c3ecea57616baddb36)
@@ -1,219 +1,289 @@
 import { useEffect, useState } from "react";
 import { useNavigate } from "react-router-dom";
+import { toast } from "react-toastify";
 import axiosInstance, { baseURL } from "../api/axiosInstance";
 import { useAuth } from "../context/authContext";
 import { usePlayer } from "../context/playerContext";
-import type { BasicPlaylist, BasicSong, SidebarProps } from "../utils/types";
+import type { BasicSong, SidebarProps } from "../utils/types";
 import { toEmbedUrl } from "../utils/utils";
+import { useCreatedPlaylists } from "../context/playlistContext";
+import CreatePlaylistModal from "./playlist/CreatePlaylistModal";
+import { getErrorMessage } from "../utils/error";
 
 const Sidebar = ({ isOpen, onClose }: SidebarProps) => {
-	const { user } = useAuth();
-	const navigate = useNavigate();
-	const { play, currentSong } = usePlayer();
-	const [recentlyListened, setRecentlyListened] = useState<BasicSong[]>([]);
-	const [playlists, setPlaylists] = useState<BasicPlaylist[]>([]);
-
-	useEffect(() => {
-		const fetchData = async () => {
-			try {
-				const data = await axiosInstance.get<BasicSong[]>("/songs/recent");
-				setRecentlyListened(data.data);
-			} catch (error) {
-				console.error("Error fetching recently listened songs:", error);
-				// todo: show toast
-			}
-			try {
-				const data =
-					await axiosInstance.get<BasicPlaylist[]>("/playlists/user");
-				setPlaylists(data.data);
-			} catch (error) {
-				console.error("Error fetching playlists:", error);
-				// todo: show toast
-			}
-		};
-		if (user) {
-			fetchData();
-		} else {
-			setRecentlyListened([]);
-			setPlaylists([]);
-		}
-	}, [user]);
-	return (
-		<div
-			className={`fixed left-0 top-0 h-full bg-[#121212] border-r border-white/10 transition-transform duration-300 ease-in-out z-40 ${
-				isOpen ? "translate-x-0" : "-translate-x-full"
-			} w-64 overflow-y-auto`}
-		>
-			<div className="p-6">
-				{/* Sidebar Header */}
-				<div className="flex justify-between items-center mb-6 pt-2">
-					<h2 className="text-xl font-bold text-white">Library</h2>
-					<button
-						onClick={onClose}
-						className="text-gray-400 hover:text-white transition-colors"
-						aria-label="Close sidebar"
-					>
-						<svg
-							className="w-6 h-6"
-							fill="none"
-							stroke="currentColor"
-							viewBox="0 0 24 24"
-						>
-							<path
-								strokeLinecap="round"
-								strokeLinejoin="round"
-								strokeWidth={2}
-								d="M6 18L18 6M6 6l12 12"
-							/>
-						</svg>
-					</button>
-				</div>
-
-				{/* Recently Listened */}
-				<div className="mb-8">
-					<h3 className="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">
-						Recently Played
-					</h3>
-					<div className="space-y-3">
-						{recentlyListened.map((song) => (
-							<div
-								key={song.id}
-								className="flex items-center gap-3 p-2 rounded-lg hover:bg-white/5 cursor-pointer transition-colors group relative"
-							>
-								<img
-									src={song.cover ? `${baseURL}/${song.cover}` : "/favicon.png"}
-									alt={song.title}
-									className="w-10 h-10 rounded object-cover"
-									onError={(e) => {
-										(e.target as HTMLImageElement).src = "/favicon.png";
-									}}
-								/>
-								<div className="flex-1 min-w-0">
-									<p
-										onClick={() => navigate(`/songs/${song.id}`)}
-										className="text-sm font-medium text-white truncate hover:underline cursor-pointer"
-									>
-										{song.title}
-									</p>
-									<div className="flex items-center gap-1 text-xs text-gray-400">
-										<span
-											onClick={(e) => {
-												e.stopPropagation();
-												if (song.artistUsername) {
-													navigate(`/users/${song.artistUsername}`);
-												}
-											}}
-											className={`truncate ${
-												song.artistUsername
-													? "hover:underline cursor-pointer hover:text-white"
-													: ""
-											}`}
-										>
-											{song.artist}
-										</span>
-										{song.album && (
-											<>
-												<span>•</span>
-												<span
-													onClick={(e) => {
-														e.stopPropagation();
-														if (song.albumId) {
-															navigate(`/collection/album/${song.albumId}`);
-														}
-													}}
-													className={`truncate ${
-														song.albumId
-															? "hover:underline cursor-pointer hover:text-white"
-															: ""
-													}`}
-												>
-													{song.album}
-												</span>
-											</>
-										)}
-									</div>
-								</div>
-								{song.link && (
-									<button
-										onClick={(e) => {
-											e.stopPropagation();
-											play({
-												id: song.id,
-												title: song.title,
-												artist: song.artist,
-												cover: song.cover,
-												embedUrl: toEmbedUrl(song.link!),
-											});
-										}}
-										className={`p-1.5 rounded-full transition-all opacity-0 group-hover:opacity-100 ${
-											currentSong?.id === song.id
-												? "bg-white text-[#1db954]"
-												: "bg-[#1db954] text-black hover:scale-110"
-										}`}
-										aria-label={
-											currentSong?.id === song.id ? "Now playing" : "Play song"
-										}
-									>
-										{currentSong?.id === song.id ? (
-											<svg
-												className="w-4 h-4"
-												fill="currentColor"
-												viewBox="0 0 24 24"
-											>
-												<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
-											</svg>
-										) : (
-											<svg
-												className="w-4 h-4"
-												fill="currentColor"
-												viewBox="0 0 24 24"
-											>
-												<path d="M8 5v14l11-7z" />
-											</svg>
-										)}
-									</button>
-								)}
-							</div>
-						))}
-					</div>
-				</div>
-
-				{/* Playlists */}
-				<div>
-					<h3 className="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">
-						Your Playlists
-					</h3>
-					<div className="space-y-2">
-						{playlists.map((playlist) => (
-							<div
-								key={playlist.id}
-								className="flex items-center justify-between p-3 rounded-lg hover:bg-white/5 cursor-pointer transition-colors"
-							>
-								<div className="flex items-center gap-3">
-									<div className="w-10 h-10 bg-linear-to-br from-purple-500 to-pink-500 rounded flex items-center justify-center">
-										<svg
-											className="w-5 h-5 text-white"
-											fill="currentColor"
-											viewBox="0 0 20 20"
-										>
-											<path d="M18 3a1 1 0 00-1.196-.98l-10 2A1 1 0 006 5v9.114A4.369 4.369 0 005 14c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V7.82l8-1.6v5.894A4.37 4.37 0 0015 12c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V3z" />
-										</svg>
-									</div>
-									<div>
-										<p className="text-sm font-medium text-white">
-											{playlist.name}
-										</p>
-										<p className="text-xs text-gray-400">
-											{playlist.songCount} songs
-										</p>
-									</div>
-								</div>
-							</div>
-						))}
-					</div>
-				</div>
-			</div>
-		</div>
-	);
+  const { user } = useAuth();
+  const {
+    createdPlaylists,
+    isLoading: playlistsLoading,
+    refreshPlaylists,
+  } = useCreatedPlaylists();
+  const navigate = useNavigate();
+  const { play, currentSong } = usePlayer();
+  const [recentlyListened, setRecentlyListened] = useState<BasicSong[]>([]);
+  const [songsLoading, setSongsLoading] = useState(false);
+  const [isModalOpen, setIsModalOpen] = useState(false);
+
+  useEffect(() => {
+    const fetchData = async () => {
+      setSongsLoading(true);
+      try {
+        const data = await axiosInstance.get<BasicSong[]>("/songs/recent");
+        setRecentlyListened(data.data);
+      } catch (error) {
+        toast.error(getErrorMessage(error));
+      } finally {
+        setSongsLoading(false);
+      }
+    };
+    if (user) {
+      fetchData();
+    } else {
+      setRecentlyListened([]);
+      setSongsLoading(false);
+    }
+  }, [user]);
+
+  const handleCreatePlaylist = async (playlistName: string) => {
+    try {
+      await axiosInstance.post("/playlists", { name: playlistName });
+      toast.success("Playlist created successfully!");
+      await refreshPlaylists();
+    } catch (error) {
+      toast.error(getErrorMessage(error));
+    }
+  };
+
+  const isLoading = songsLoading || playlistsLoading;
+
+  return (
+    <>
+      <div
+        className={`fixed left-0 top-0 h-full bg-[#121212] border-r border-white/10 transition-transform duration-300 ease-in-out z-40 ${
+          isOpen ? "translate-x-0" : "-translate-x-full"
+        } w-64 overflow-y-auto`}
+      >
+        <div className="p-6">
+          {/* Sidebar Header */}
+          <div className="flex justify-between items-center mb-6 pt-2">
+            <h2 className="text-xl font-bold text-white">Library</h2>
+            <button
+              onClick={onClose}
+              className="text-gray-400 hover:text-white transition-colors"
+              aria-label="Close sidebar"
+            >
+              <svg
+                className="w-6 h-6"
+                fill="none"
+                stroke="currentColor"
+                viewBox="0 0 24 24"
+              >
+                <path
+                  strokeLinecap="round"
+                  strokeLinejoin="round"
+                  strokeWidth={2}
+                  d="M6 18L18 6M6 6l12 12"
+                />
+              </svg>
+            </button>
+          </div>
+
+          {/* Loading State */}
+          {isLoading ? (
+            <div className="flex items-center justify-center py-16">
+              <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#1db954]"></div>
+            </div>
+          ) : (
+            <>
+              {/* Recently Listened */}
+              <div className="mb-8">
+                <h3 className="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">
+                  Recently Played
+                </h3>
+                <div className="space-y-3">
+                  {recentlyListened.map((song) => (
+                    <div
+                      key={song.id}
+                      className="flex items-center gap-3 p-2 rounded-lg hover:bg-white/5 cursor-pointer transition-colors group relative"
+                    >
+                      <img
+                        src={
+                          song.cover
+                            ? `${baseURL}/${song.cover}`
+                            : "/favicon.png"
+                        }
+                        alt={song.title}
+                        className="w-10 h-10 rounded object-cover"
+                        onError={(e) => {
+                          (e.target as HTMLImageElement).src = "/favicon.png";
+                        }}
+                      />
+                      <div className="flex-1 min-w-0">
+                        <p
+                          onClick={() => navigate(`/songs/${song.id}`)}
+                          className="text-sm font-medium text-white truncate hover:underline cursor-pointer"
+                        >
+                          {song.title}
+                        </p>
+                        <div className="flex items-center gap-1 text-xs text-gray-400">
+                          <span
+                            onClick={(e) => {
+                              e.stopPropagation();
+                              if (song.artistUsername) {
+                                navigate(`/users/${song.artistUsername}`);
+                              }
+                            }}
+                            className={`truncate ${
+                              song.artistUsername
+                                ? "hover:underline cursor-pointer hover:text-white"
+                                : ""
+                            }`}
+                          >
+                            {song.artist}
+                          </span>
+                          {song.album && (
+                            <>
+                              <span>•</span>
+                              <span
+                                onClick={(e) => {
+                                  e.stopPropagation();
+                                  if (song.albumId) {
+                                    navigate(
+                                      `/collection/album/${song.albumId}`,
+                                    );
+                                  }
+                                }}
+                                className={`truncate ${
+                                  song.albumId
+                                    ? "hover:underline cursor-pointer hover:text-white"
+                                    : ""
+                                }`}
+                              >
+                                {song.album}
+                              </span>
+                            </>
+                          )}
+                        </div>
+                      </div>
+                      {song.link && (
+                        <button
+                          onClick={(e) => {
+                            e.stopPropagation();
+                            play({
+                              id: song.id,
+                              title: song.title,
+                              artist: song.artist,
+                              cover: song.cover,
+                              embedUrl: toEmbedUrl(song.link!),
+                            });
+                          }}
+                          className={`p-1.5 rounded-full transition-all opacity-0 group-hover:opacity-100 ${
+                            currentSong?.id === song.id
+                              ? "bg-white text-[#1db954]"
+                              : "bg-[#1db954] text-black hover:scale-110"
+                          }`}
+                          aria-label={
+                            currentSong?.id === song.id
+                              ? "Now playing"
+                              : "Play song"
+                          }
+                        >
+                          {currentSong?.id === song.id ? (
+                            <svg
+                              className="w-4 h-4"
+                              fill="currentColor"
+                              viewBox="0 0 24 24"
+                            >
+                              <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
+                            </svg>
+                          ) : (
+                            <svg
+                              className="w-4 h-4"
+                              fill="currentColor"
+                              viewBox="0 0 24 24"
+                            >
+                              <path d="M8 5v14l11-7z" />
+                            </svg>
+                          )}
+                        </button>
+                      )}
+                    </div>
+                  ))}
+                </div>
+              </div>
+
+              {/* Playlists */}
+              <div>
+                <h3 className="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">
+                  Your Playlists
+                </h3>
+                <div className="space-y-2">
+                  {createdPlaylists?.map((playlist) => (
+                    <div
+                      key={playlist.id}
+                      onClick={() => {
+                        navigate(`/collection/playlist/${playlist.id}`);
+                      }}
+                      className="flex items-center justify-between p-3 rounded-lg hover:bg-white/5 cursor-pointer transition-colors"
+                    >
+                      <div className="flex items-center gap-3">
+                        <div className="w-10 h-10 bg-linear-to-br from-purple-500 to-pink-500 rounded flex items-center justify-center">
+                          <svg
+                            className="w-5 h-5 text-white"
+                            fill="currentColor"
+                            viewBox="0 0 20 20"
+                          >
+                            <path d="M18 3a1 1 0 00-1.196-.98l-10 2A1 1 0 006 5v9.114A4.369 4.369 0 005 14c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V7.82l8-1.6v5.894A4.37 4.37 0 0015 12c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V3z" />
+                          </svg>
+                        </div>
+                        <div>
+                          <p className="text-sm font-medium text-white">
+                            {playlist.name}
+                          </p>
+                          <p className="text-xs text-gray-400">
+                            {playlist.songCount} songs
+                          </p>
+                        </div>
+                      </div>
+                    </div>
+                  ))}
+
+                  {/* Create Playlist Button */}
+                  <button
+                    onClick={() => setIsModalOpen(true)}
+                    className="w-full flex items-center gap-3 p-3 rounded-lg hover:bg-white/5 cursor-pointer transition-colors group mt-2"
+                  >
+                    <div className="w-10 h-10 bg-[#282828] group-hover:bg-[#3a3a3a] rounded flex items-center justify-center transition-colors">
+                      <svg
+                        className="w-5 h-5 text-gray-400 group-hover:text-white transition-colors"
+                        fill="none"
+                        stroke="currentColor"
+                        viewBox="0 0 24 24"
+                      >
+                        <path
+                          strokeLinecap="round"
+                          strokeLinejoin="round"
+                          strokeWidth={2}
+                          d="M12 4v16m8-8H4"
+                        />
+                      </svg>
+                    </div>
+                    <p className="text-sm font-medium text-gray-400 group-hover:text-white transition-colors">
+                      Create Playlist
+                    </p>
+                  </button>
+                </div>
+              </div>
+            </>
+          )}
+        </div>
+      </div>
+
+      <CreatePlaylistModal
+        isOpen={isModalOpen}
+        onClose={() => setIsModalOpen(false)}
+        onSubmit={handleCreatePlaylist}
+      />
+    </>
+  );
 };
 
Index: frontend/src/components/playlist/CreatePlaylistModal.tsx
===================================================================
--- frontend/src/components/playlist/CreatePlaylistModal.tsx	(revision 85512ff50bc46445db00d8c3ecea57616baddb36)
+++ frontend/src/components/playlist/CreatePlaylistModal.tsx	(revision 85512ff50bc46445db00d8c3ecea57616baddb36)
@@ -0,0 +1,119 @@
+import { useState, useEffect } from "react";
+import type { CreatePlaylistModalProps } from "../../utils/types";
+
+const CreatePlaylistModal = ({
+  isOpen,
+  onClose,
+  onSubmit,
+}: CreatePlaylistModalProps) => {
+  const [playlistName, setPlaylistName] = useState("");
+  const [isClosing, setIsClosing] = useState(false);
+  const [isOpening, setIsOpening] = useState(false);
+
+  useEffect(() => {
+    if (isOpen) {
+      setIsClosing(false);
+      setPlaylistName("");
+      setIsOpening(true);
+      setTimeout(() => setIsOpening(false), 10);
+    }
+  }, [isOpen]);
+
+  const handleClose = () => {
+    setIsClosing(true);
+    setTimeout(() => {
+      onClose();
+      setIsClosing(false);
+    }, 200);
+  };
+
+  const handleSubmit = (e: React.FormEvent) => {
+    e.preventDefault();
+    if (playlistName.trim()) {
+      onSubmit(playlistName.trim());
+      handleClose();
+    }
+  };
+
+  if (!isOpen && !isClosing) return null;
+
+  return (
+    <div
+      className={`fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 px-4 transition-opacity duration-200 ${
+        isClosing || isOpening ? "opacity-0" : "opacity-100"
+      }`}
+      onClick={handleClose}
+    >
+      <div
+        className={`bg-[#181818] rounded-xl p-8 w-full max-w-md border border-white/10 transition-all duration-200 ${
+          isClosing || isOpening
+            ? "scale-95 opacity-0"
+            : "scale-100 opacity-100"
+        }`}
+        onClick={(e) => e.stopPropagation()}
+      >
+        <div className="flex justify-between items-center mb-6">
+          <h2 className="text-2xl font-bold text-white">Create Playlist</h2>
+          <button
+            onClick={handleClose}
+            className="text-gray-400 hover:text-white transition-colors cursor-pointer"
+            aria-label="Close modal"
+          >
+            <svg
+              className="w-6 h-6"
+              fill="none"
+              stroke="currentColor"
+              viewBox="0 0 24 24"
+            >
+              <path
+                strokeLinecap="round"
+                strokeLinejoin="round"
+                strokeWidth={2}
+                d="M6 18L18 6M6 6l12 12"
+              />
+            </svg>
+          </button>
+        </div>
+
+        <form onSubmit={handleSubmit} className="space-y-6">
+          <div>
+            <label
+              className="block text-sm font-medium text-gray-300 mb-2"
+              htmlFor="playlistName"
+            >
+              Playlist Name
+            </label>
+            <input
+              type="text"
+              id="playlistName"
+              autoFocus
+              className="w-full bg-[#282828] border border-white/10 rounded-lg py-3 px-4 text-white placeholder-gray-500 focus:outline-none focus:border-[#1db954] focus:ring-1 focus:ring-[#1db954] transition-all"
+              placeholder="Enter playlist name"
+              value={playlistName}
+              onChange={(e) => setPlaylistName(e.target.value)}
+            />
+          </div>
+
+          <div className="flex gap-3">
+            <button
+              type="button"
+              onClick={handleClose}
+              className="flex-1 py-3 bg-[#282828] rounded-full text-white font-semibold hover:bg-[#3a3a3a] transition-colors cursor-pointer"
+            >
+              Cancel
+            </button>
+            <button
+              type="submit"
+              disabled={!playlistName.trim()}
+              className="flex-1 py-3 bg-[#1db954] rounded-full text-black font-semibold hover:bg-[#1ed760] transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-[#1db954] cursor-pointer"
+            >
+              Create
+            </button>
+          </div>
+        </form>
+      </div>
+    </div>
+  );
+};
+
+export default CreatePlaylistModal;
Index: frontend/src/components/userProfile/ListenerView.tsx
===================================================================
--- frontend/src/components/userProfile/ListenerView.tsx	(revision f5bc95e4a628b62884f4631d8a118a9790052953)
+++ frontend/src/components/userProfile/ListenerView.tsx	(revision 85512ff50bc46445db00d8c3ecea57616baddb36)
@@ -1,297 +1,343 @@
 import { Album, Bookmark, Heart, ListMusic, Music } from "lucide-react";
 import { useState } from "react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate, useParams } from "react-router-dom";
 import { toast } from "react-toastify";
 import axiosInstance, { baseURL } from "../../api/axiosInstance";
 import type { MusicalEntity, Playlist } from "../../utils/types";
 import SongItem from "../SongItem";
+import { useAuth } from "../../context/authContext";
 
 interface ListenerViewProps {
-	likedEntities: MusicalEntity[] | [];
-	createdPlaylists: Playlist[] | [];
-	savedPlaylists: Playlist[] | [];
+  likedEntities: MusicalEntity[] | [];
+  createdPlaylists: Playlist[] | [];
+  savedPlaylists: Playlist[] | [];
 }
 
 const ListenerView = ({
-	likedEntities,
-	createdPlaylists,
-	savedPlaylists,
+  likedEntities,
+  createdPlaylists,
+  savedPlaylists,
 }: ListenerViewProps) => {
-	const navigate = useNavigate();
-	const [items, setItems] = useState(likedEntities);
-	const [savedItems, setSavedItems] = useState(savedPlaylists);
-
-	const likedSongs = items.filter((e) => e.type === "SONG");
-	const likedAlbums = items.filter((e) => e.type === "ALBUM");
-
-	const handleSavePlaylist = async (
-		e: React.MouseEvent,
-		playlistId: number,
-		playlistName: string,
-	) => {
-		e.stopPropagation();
-
-		try {
-			const response = await axiosInstance.post(`/playlist/${playlistId}/save`);
-			const data = response.data;
-
-			setSavedItems((prevItems) =>
-				data.isSaved
-					? [...prevItems, prevItems.find((p) => p.id === playlistId)!]
-					: prevItems.filter((p) => p.id !== playlistId),
-			);
-
-			toast.success(
-				data.isSaved
-					? `Saved "${playlistName}" to your library`
-					: `Removed "${playlistName}" from your library`,
-			);
-		} catch (err: any) {
-			toast.error(err.response?.data?.error || "Failed to save the playlist");
-		}
-	};
-
-	const handleLike = async (id: number, title: string) => {
-		try {
-			const response = await axiosInstance.post(`/musical-entity/${id}/like`);
-			const data = response.data;
-
-			setItems((prevItems) =>
-				prevItems.map((item) =>
-					item.id === data.entityId
-						? { ...item, isLikedByCurrentUser: data.isLiked }
-						: item,
-				),
-			);
-
-			toast.success(
-				data.isLiked ? `Liked "${title}"` : `Removed "${title}" from likes`,
-			);
-		} catch (err: any) {
-			toast.error(err.response?.data?.error || "Failed to like the item");
-		}
-	};
-
-	return (
-		<div className="mt-8 space-y-12">
-			{createdPlaylists && createdPlaylists.length > 0 && (
-				<section>
-					<div className="flex items-center gap-3 mb-6">
-						<ListMusic className="w-6 h-6 text-[#1db954]" />
-						<h3 className="text-2xl font-bold text-white">Created Playlists</h3>
-						<span className="text-sm text-gray-500">
-							({createdPlaylists.length})
-						</span>
-					</div>
-
-					<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
-						{createdPlaylists.map((playlist) => (
-							<div
-								key={playlist.id}
-								className="group cursor-pointer"
-								onClick={() => navigate(`/collection/playlist/${playlist.id}`)}
-							>
-								<div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
-									<img
-										src={
-											playlist.cover
-												? `${baseURL}/${playlist.cover}`
-												: "/favicon.png"
-										}
-										alt={playlist.name}
-										className="w-full h-full object-cover"
-										onError={(e) => {
-											(e.target as HTMLImageElement).src = "/favicon.png";
-										}}
-									/>
-
-									<button
-										onClick={(e) =>
-											handleSavePlaylist(e, playlist.id, playlist.name)
-										}
-										className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100"
-										title={playlist.isSavedByCurrentUser ? "Unsave" : "Save"}
-									>
-										<Bookmark
-											className={`w-5 h-5 ${
-												playlist.isSavedByCurrentUser
-													? "fill-[#1db954] text-[#1db954]"
-													: "text-gray-400"
-											}`}
-										/>
-									</button>
-								</div>
-								<p className="text-sm font-semibold text-white truncate group-hover:text-[#1db954] transition-colors">
-									{playlist.name}
-								</p>
-								<p className="text-xs text-gray-400 truncate">
-									{playlist.creatorName}
-								</p>
-							</div>
-						))}
-					</div>
-				</section>
-			)}
-
-			{savedItems && savedItems.length > 0 && (
-				<section>
-					<div className="flex items-center gap-3 mb-6">
-						<Bookmark className="w-6 h-6 text-[#1db954] fill-[#1db954]" />
-						<h3 className="text-2xl font-bold text-white">Saved Playlists</h3>
-						<span className="text-sm text-gray-500">({savedItems.length})</span>
-					</div>
-
-					<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
-						{savedItems.map((playlist) => (
-							<div
-								key={playlist.id}
-								className="group cursor-pointer"
-								onClick={() => navigate(`/collection/playlist/${playlist.id}`)}
-							>
-								<div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
-									<img
-										src={
-											playlist.cover
-												? `${baseURL}/${playlist.cover}`
-												: "/favicon.png"
-										}
-										alt={playlist.name}
-										className="w-full h-full object-cover"
-										onError={(e) => {
-											(e.target as HTMLImageElement).src = "/favicon.png";
-										}}
-									/>
-
-									<button
-										onClick={(e) =>
-											handleSavePlaylist(e, playlist.id, playlist.name)
-										}
-										className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100"
-										title="Unsave"
-									>
-										<Bookmark className="w-5 h-5 fill-[#1db954] text-[#1db954]" />
-									</button>
-								</div>
-								<p className="text-sm font-semibold text-white truncate group-hover:text-[#1db954] transition-colors">
-									{playlist.name}
-								</p>
-								<p className="text-xs text-gray-400 truncate">
-									{playlist.creatorName}
-								</p>
-							</div>
-						))}
-					</div>
-				</section>
-			)}
-
-			{likedSongs && likedSongs.length > 0 && (
-				<section>
-					<div className="flex items-center gap-3 mb-6">
-						<Heart className="w-6 h-6 text-red-500 fill-red-500" />
-						<h3 className="text-2xl font-bold text-white">Liked Songs</h3>
-						<span className="text-sm text-gray-500">
-							({likedSongs?.length})
-						</span>
-					</div>
-
-					<div className="space-y-1">
-						{likedSongs.map((song, index) => (
-							<SongItem
-								key={song.id}
-								song={{
-									id: song.id,
-									title: song.title,
-									cover: song.cover
-										? `${baseURL}/${song.cover}`
-										: "/favicon.png",
-									genre: song.genre,
-									link: (song as any).link,
-									releasedBy: song.releasedBy,
-									isLikedByCurrentUser: song.isLikedByCurrentUser,
-								}}
-								index={index + 1}
-								onLikeToggle={() => handleLike(song.id, song.title)}
-							/>
-						))}
-					</div>
-				</section>
-			)}
-
-			{likedAlbums && likedAlbums.length > 0 && (
-				<section>
-					<div className="flex items-center gap-3 mb-6">
-						<Album className="w-6 h-6 text-[#1db954]" />
-						<h3 className="text-2xl font-bold text-white">Liked Albums</h3>
-						<span className="text-sm text-gray-500">
-							({likedAlbums.length})
-						</span>
-					</div>
-
-					<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
-						{likedAlbums.map((album) => (
-							<div
-								key={album.id}
-								className="group cursor-pointer"
-								onClick={() => navigate(`/collection/album/${album.id}`)}
-							>
-								<div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
-									<img
-										src={
-											album.cover ? `${baseURL}/${album.cover}` : "/favicon.png"
-										}
-										alt={album.title}
-										className="w-full h-full object-cover"
-										onError={(e) => {
-											(e.target as HTMLImageElement).src = "/favicon.png";
-										}}
-									/>
-
-									<button
-										onClick={(e) => {
-											e.stopPropagation();
-											handleLike(album.id, album.title);
-										}}
-										className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100 cursor-pointer"
-										title={album.isLikedByCurrentUser ? "Unlike" : "Like"}
-									>
-										<svg
-											className="w-5 h-5"
-											fill={album.isLikedByCurrentUser ? "#ef4444" : "none"}
-											stroke={
-												album.isLikedByCurrentUser ? "#ef4444" : "#9ca3af"
-											}
-											strokeWidth="2"
-											viewBox="0 0 24 24"
-										>
-											<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />
-										</svg>
-									</button>
-								</div>
-								<p className="font-semibold text-sm text-white truncate group-hover:text-[#1db954] transition-colors">
-									{album.title}
-								</p>
-								<p className="text-xs text-gray-400 truncate mt-1">
-									{album.releasedBy}
-								</p>
-							</div>
-						))}
-					</div>
-				</section>
-			)}
-
-			{likedEntities &&
-				likedEntities.length === 0 &&
-				(!createdPlaylists || createdPlaylists.length === 0) &&
-				(!savedItems || savedItems.length === 0) && (
-					<div className="flex flex-col items-center justify-center py-16 text-gray-500">
-						<Music className="w-20 h-20 mb-4 opacity-20" />
-						<p className="text-lg font-medium">Nothing here yet</p>
-						<p className="text-sm mt-2">
-							Start exploring music to build your collection
-						</p>
-					</div>
-				)}
-		</div>
-	);
+  const navigate = useNavigate();
+  const { username: usernameParam } = useParams();
+  const { user: currentUser } = useAuth();
+  const [items, setItems] = useState(likedEntities);
+  const [createdItems, setCreatedItems] = useState(createdPlaylists);
+  const [savedItems, setSavedItems] = useState(savedPlaylists);
+
+  const likedSongs = items.filter((e) => e.type === "SONG");
+  const likedAlbums = items.filter((e) => e.type === "ALBUM");
+  const username = usernameParam || currentUser?.username;
+  const isOwnProfile = currentUser?.username === username;
+
+  const handleSavePlaylist = async (
+    e: React.MouseEvent,
+    playlistId: number,
+    playlistName: string,
+  ) => {
+    e.stopPropagation();
+
+    try {
+      const response = await axiosInstance.post(
+        `/playlists/${playlistId}/save`,
+      );
+      const data = response.data;
+
+      setCreatedItems((prevItems) =>
+        prevItems.map((p) =>
+          p.id === playlistId
+            ? { ...p, isSavedByCurrentUser: data.isSavedByCurrentUser }
+            : p,
+        ),
+      );
+
+      setSavedItems((prevItems) =>
+        prevItems.map((p) =>
+          p.id === playlistId
+            ? { ...p, isSavedByCurrentUser: data.isSavedByCurrentUser }
+            : p,
+        ),
+      );
+
+      if (isOwnProfile) {
+        if (data.isSavedByCurrentUser) {
+          const playlistToAdd = createdItems.find((p) => p.id === playlistId);
+          if (playlistToAdd && !savedItems.find((p) => p.id === playlistId)) {
+            setSavedItems((prevItems) => [
+              ...prevItems,
+              { ...playlistToAdd, isSavedByCurrentUser: true },
+            ]);
+          }
+        } else {
+          setSavedItems((prevItems) =>
+            prevItems.filter((p) => p.id !== playlistId),
+          );
+        }
+      }
+
+      toast.success(
+        data.isSavedByCurrentUser
+          ? `Saved "${playlistName}" to your library`
+          : `Removed "${playlistName}" from your library`,
+      );
+    } catch (err: any) {
+      toast.error(err.response?.data?.error || "Failed to save the playlist");
+    }
+  };
+
+  const handleLike = async (id: number, title: string) => {
+    try {
+      const response = await axiosInstance.post(`/musical-entity/${id}/like`);
+      const data = response.data;
+
+      setItems((prevItems) =>
+        prevItems.map((item) =>
+          item.id === data.entityId
+            ? { ...item, isLikedByCurrentUser: data.isLiked }
+            : item,
+        ),
+      );
+
+      toast.success(
+        data.isLiked ? `Liked "${title}"` : `Removed "${title}" from likes`,
+      );
+    } catch (err: any) {
+      toast.error(err.response?.data?.error || "Failed to like the item");
+    }
+  };
+
+  return (
+    <div className="mt-8 space-y-12">
+      {createdItems && createdItems.length > 0 && (
+        <section>
+          <div className="flex items-center gap-3 mb-6">
+            <ListMusic className="w-6 h-6 text-[#1db954]" />
+            <h3 className="text-2xl font-bold text-white">Created Playlists</h3>
+            <span className="text-sm text-gray-500">
+              ({createdItems.length})
+            </span>
+          </div>
+
+          <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
+            {createdItems.map((playlist) => (
+              <div
+                key={playlist.id}
+                className="group cursor-pointer"
+                onClick={() => navigate(`/collection/playlist/${playlist.id}`)}
+              >
+                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
+                  <img
+                    src={
+                      playlist.cover
+                        ? `${baseURL}/${playlist.cover}`
+                        : "/favicon.png"
+                    }
+                    alt={playlist.name}
+                    className="w-full h-full object-cover"
+                    onError={(e) => {
+                      (e.target as HTMLImageElement).src = "/favicon.png";
+                    }}
+                  />
+                  {!isOwnProfile &&
+                    currentUser?.username != playlist.creatorUsername && (
+                      <button
+                        onClick={(e) =>
+                          handleSavePlaylist(e, playlist.id, playlist.name)
+                        }
+                        className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100 cursor-pointer"
+                        title={
+                          playlist.isSavedByCurrentUser ? "Unsave" : "Save"
+                        }
+                      >
+                        <Bookmark
+                          className={`w-5 h-5 ${
+                            playlist.isSavedByCurrentUser
+                              ? "fill-[#1db954] text-[#1db954]"
+                              : "text-gray-400"
+                          }`}
+                        />
+                      </button>
+                    )}
+                </div>
+                <p className="text-sm font-semibold text-white truncate group-hover:text-[#1db954] transition-colors">
+                  {playlist.name}
+                </p>
+                <p className="text-xs text-gray-400 truncate">
+                  {playlist.creatorName}
+                </p>
+              </div>
+            ))}
+          </div>
+        </section>
+      )}
+
+      {savedItems && savedItems.length > 0 && (
+        <section>
+          <div className="flex items-center gap-3 mb-6">
+            <Bookmark className="w-6 h-6 text-[#1db954] fill-[#1db954]" />
+            <h3 className="text-2xl font-bold text-white">Saved Playlists</h3>
+            <span className="text-sm text-gray-500">({savedItems.length})</span>
+          </div>
+
+          <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
+            {savedItems.map((playlist) => (
+              <div
+                key={playlist.id}
+                className="group cursor-pointer"
+                onClick={() => navigate(`/collection/playlist/${playlist.id}`)}
+              >
+                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
+                  <img
+                    src={
+                      playlist.cover
+                        ? `${baseURL}/${playlist.cover}`
+                        : "/favicon.png"
+                    }
+                    alt={playlist.name}
+                    className="w-full h-full object-cover"
+                    onError={(e) => {
+                      (e.target as HTMLImageElement).src = "/favicon.png";
+                    }}
+                  />
+
+                  {currentUser?.username != playlist.creatorUsername && (
+                    <button
+                      onClick={(e) =>
+                        handleSavePlaylist(e, playlist.id, playlist.name)
+                      }
+                      className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100 cursor-pointer"
+                      title={playlist.isSavedByCurrentUser ? "Unsave" : "Save"}
+                    >
+                      <Bookmark
+                        className={`w-5 h-5 ${
+                          playlist.isSavedByCurrentUser
+                            ? "fill-[#1db954] text-[#1db954]"
+                            : "text-gray-400"
+                        }`}
+                      />
+                    </button>
+                  )}
+                </div>
+                <p className="text-sm font-semibold text-white truncate group-hover:text-[#1db954] transition-colors">
+                  {playlist.name}
+                </p>
+                <p className="text-xs text-gray-400 truncate">
+                  {playlist.creatorName}
+                </p>
+              </div>
+            ))}
+          </div>
+        </section>
+      )}
+
+      {likedSongs && likedSongs.length > 0 && (
+        <section>
+          <div className="flex items-center gap-3 mb-6">
+            <Heart className="w-6 h-6 text-red-500 fill-red-500" />
+            <h3 className="text-2xl font-bold text-white">Liked Songs</h3>
+            <span className="text-sm text-gray-500">
+              ({likedSongs?.length})
+            </span>
+          </div>
+
+          <div className="space-y-1">
+            {likedSongs.map((song, index) => (
+              <SongItem
+                key={song.id}
+                song={{
+                  id: song.id,
+                  title: song.title,
+                  cover: song.cover
+                    ? `${baseURL}/${song.cover}`
+                    : "/favicon.png",
+                  genre: song.genre,
+                  link: (song as any).link,
+                  releasedBy: song.releasedBy,
+                  isLikedByCurrentUser: song.isLikedByCurrentUser,
+                }}
+                index={index + 1}
+                onLikeToggle={() => handleLike(song.id, song.title)}
+              />
+            ))}
+          </div>
+        </section>
+      )}
+
+      {likedAlbums && likedAlbums.length > 0 && (
+        <section>
+          <div className="flex items-center gap-3 mb-6">
+            <Album className="w-6 h-6 text-[#1db954]" />
+            <h3 className="text-2xl font-bold text-white">Liked Albums</h3>
+            <span className="text-sm text-gray-500">
+              ({likedAlbums.length})
+            </span>
+          </div>
+
+          <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
+            {likedAlbums.map((album) => (
+              <div
+                key={album.id}
+                className="group cursor-pointer"
+                onClick={() => navigate(`/collection/album/${album.id}`)}
+              >
+                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
+                  <img
+                    src={
+                      album.cover ? `${baseURL}/${album.cover}` : "/favicon.png"
+                    }
+                    alt={album.title}
+                    className="w-full h-full object-cover"
+                    onError={(e) => {
+                      (e.target as HTMLImageElement).src = "/favicon.png";
+                    }}
+                  />
+
+                  <button
+                    onClick={(e) => {
+                      e.stopPropagation();
+                      handleLike(album.id, album.title);
+                    }}
+                    className="absolute top-2 right-2 p-2 bg-black/70 hover:bg-black/90 rounded-full shadow-md transition-all duration-200 opacity-0 group-hover:opacity-100 cursor-pointer"
+                    title={album.isLikedByCurrentUser ? "Unlike" : "Like"}
+                  >
+                    <svg
+                      className="w-5 h-5"
+                      fill={album.isLikedByCurrentUser ? "#ef4444" : "none"}
+                      stroke={
+                        album.isLikedByCurrentUser ? "#ef4444" : "#9ca3af"
+                      }
+                      strokeWidth="2"
+                      viewBox="0 0 24 24"
+                    >
+                      <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />
+                    </svg>
+                  </button>
+                </div>
+                <p className="font-semibold text-sm text-white truncate group-hover:text-[#1db954] transition-colors">
+                  {album.title}
+                </p>
+                <p className="text-xs text-gray-400 truncate mt-1">
+                  {album.releasedBy}
+                </p>
+              </div>
+            ))}
+          </div>
+        </section>
+      )}
+
+      {likedEntities &&
+        likedEntities.length === 0 &&
+        (!createdItems || createdItems.length === 0) &&
+        (!savedItems || savedItems.length === 0) && (
+          <div className="flex flex-col items-center justify-center py-16 text-gray-500">
+            <Music className="w-20 h-20 mb-4 opacity-20" />
+            <p className="text-lg font-medium">Nothing here yet</p>
+            <p className="text-sm mt-2">
+              Start exploring music to build your collection
+            </p>
+          </div>
+        )}
+    </div>
+  );
 };
 
