CodersHub Inc
ProjectsContactHire Me
CodersHub Inc LogoCodersHub Inc

A collection of practical, open-source projects designed to solve real-world developer problems.

Quick Links

All ProjectsContactGitHub Organization

Resources

Source CodeReport IssuesAbout Creator

Stay Updated

Get notified about new projects and updates. No spam, ever.

By subscribing, you agree to our privacy policy.

© 2025 CodersHub Inc. All rights reserved.

Privacy PolicyTerms of Service
Made withbySwapnil Ingle
Back to Projects

Music Codershubinc

A fullstack music player web ...

Languages Used
TypeScriptCSSJavaScript
Technologies
TypeScript
View SourceLive Demo

Music Hub (Next.js + Appwrite)

A modern, themeable music player web app with playlists, user accounts, and media session controls.

  • Live: https://music-codershubinc.vercel.app

Home Page

Caption: Home page — title shows "Playlists" (or other section when switched).

Features

  • Playlists
    • View all playlists and your own (admin-gated for now)
    • Add/remove songs to user playlists
    • Search singer playlists when uploading
  • Player
    • Inline and fullscreen players
    • Media Session integration (lock screen/keyboard media keys)
    • Next/Previous, seek, pause/play, queue handling
  • Auth & Profiles
    • Appwrite-based auth
    • User preferences (avatars, created playlists)
    • Avatar upload/change with preview
  • Theming & UI
    • Dark mode with next-themes
    • Tailwind CSS + Radix UI + shadcn-inspired components
    • AMP-friendly ad snippet support

Tech Stack

  • Framework: Next.js 14
  • Language: TypeScript
  • UI: Tailwind CSS, Radix UI primitives, Framer Motion
  • State/Context: React Context (AuthContext)
  • Backend: Appwrite (Auth, DB, Storage)
  • Toasts: react-hot-toast

Screenshots

These are under .github/static in this repo.

Home Page

Caption: Home page — title shows "Playlists" (or other section when switched).

Player (compact)

Caption: Music player (compact view) — play/pause, next/previous, seek.

Player (full)

Caption: Music player (full-screen view) with artwork and controls.

View Playlist

Caption: Playlist view — list of tracks with actions.

Getting Started

  1. Install dependencies

bun install # or npm install / pnpm install / yarn

  1. Configure environment variables

Create a .env.local in the project root with your Appwrite values. These are referenced in src/conf/conf.ts:

NEXT_PUBLIC_APPWRITE_PROJECT_ID=... NEXT_PUBLIC_APPWRITE_DATABASE_ID=... NEXT_PUBLIC_APPWRITE_USER_CONFIG_COLLECTION_ID=... NEXT_PUBLIC_APPWRITE_MUSIC_CONFIG_COLLECTION_ID=... NEXT_PUBLIC_APPWRITE_MUSIC_PLAYLIST_COLLECTION_ID=... NEXT_PUBLIC_APPWRITE_MUSIC_PLAYLIST_BY_USER_COLLECTION_ID=... NEXT_PUBLIC_APPWRITE_MUSIC_BUCKET_ID=... NEXT_PUBLIC_APPWRITE_AVATAR_BUCKET_ID=... NEXT_PUBLIC_SECRET_KEY=... NEXT_PUBLIC_APPWRITE_DEV_KEY=...

  1. Run the dev server

npm run dev # or pnpm dev # or yarn dev # or bun run dev

Open http://localhost:3000

Scripts

  • dev: start Next.js dev server
  • build: build production bundle
  • start: start production server
  • lint: run Next.js ESLint

Project Structure (high level)

  • src/app/* routes, layouts, pages (Next.js App Router)
  • src/components/* UI and feature components
  • src/context/AuthContext.tsx auth state and user prefs
  • src/config/* Appwrite SDK usage and DB configs
  • src/utils/* helpers, media session, playback controllers
  • public/* static assets

Notes

  • Admin-only sections: Some playlist management features are gated to users with labels containing admin.
  • Media Session: If the browser doesn’t support Media Session API, player still works without media key bindings.

Deployment

Deploy easily on Vercel (recommended). Ensure all NEXT_PUBLIC_* env vars are set in your deployment environment.

License

MIT

Project Structure
  • .env
  • .env.sample
  • .github
    • static/
      • homePage.png
      • musicPlayer00.png
      • musicPlayer01.png
      • viewPlaylist.png
  • .gitignore
  • .idea
    • .gitignore
    • copilot.data.migration.agent.xml
    • copilot.data.migration.edit.xml
    • modules.xml
    • music-codershubinc.iml
    • vcs.xml
    • workspace.xml
    • inspectionProfiles/
      • Project_Default.xml
  • README.md
  • bun.lock
  • components.json
  • next-env.d.ts
  • next.config.mjs
  • package.json
  • postcss.config.mjs
  • tailwind.config.ts
  • tsconfig.json
  • types.d.ts
  • public/
    • ads.txt
    • next.svg
    • vercel.svg
  • src/
    • accests/
      • load.jpg
    • app/
      • globals.css
      • layout.tsx
      • page.tsx
      • play/
        • page.tsx
        • y/
          • page.tsx
      • play_test/
        • page.tsx
      • upload/
        • music/
          • musicUploadForm.tsx
          • musicUploadFormCopy10Jun2024.tsx
          • page.tsx
          • searchIfSingerPlayListExist.tsx
          • chose-playlist-for-music/
            • addMusicToPlayList.tsx
            • page.tsx
          • create/
            • playList/
              • page.tsx
              • playListForm.tsx
              • searchPlayList.tsx
          • saavnCDN/
            • page.tsx
            • upl.ts
          • test/
            • page.tsx
      • users/
        • login/
          • page.tsx
        • signup/
          • page.tsx
          • signUpForm.tsx
          • userConf.tsx
        • userdashboard/
          • authUser.tsx
          • AvatarChange.tsx
          • page.tsx
          • userAvatar.tsx
    • components/
      • theme-provider.tsx
      • Buttons/
        • CopyBtn.tsx
        • likeBtn.tsx
        • LogOutBtn.tsx
      • cust/
        • atherInfoCard.tsx
        • loading.tsx
        • amp/
          • ampPage.tsx
        • create-playlist-by-user/
          • addSongToPlayList.tsx
          • createPlaylistByUser.tsx
        • player/
          • musicPlayer.tsx
          • musicPlayerFullScreen.tsx
          • play.tsx
          • copy/
            • musicPlayerFullScreen.txt
          • musicPlayerZero/
            • avatar.tsx
            • controlleres.tsx
            • musicPlayerFullZero.tsx
            • nextSongInfoDisplay.tsx
        • playLists/
          • index.playlist.tsx
          • viewAllPlayListsPage.tsx
          • yourPL.tsx
        • screenAwake/
          • keepAwake.tsx
        • userActions/
          • addFromMultiplePlaylist.tsx
          • addToPlayList.tsx
      • input/
        • Input.tsx
      • navbar/
        • Navbar.tsx
        • RightDropdownMenu.tsx
      • page/
        • pageui.tsx
      • ui/
        • aurora-background.tsx
        • avatar.tsx
        • button.tsx
        • card.tsx
        • checkbox.tsx
        • dropdown-menu.tsx
        • input.tsx
        • label.tsx
        • lamp.tsx
        • menubar.tsx
        • meteors.tsx
        • select.tsx
        • textarea.tsx
        • themeBtn.tsx
    • conf/
      • conf.ts
    • config/
      • auth/
        • auth.ts
        • authRecovery.ts
        • authVerify.ts
      • dataBase/
        • playListsDb/
          • music.ts
          • musicConfig.ts
          • musicPlayList.ts
          • musicPlayListByUser.ts
        • userPrefs/
          • ifNotUserAvatar.ts
          • userAvatarDBConfig.ts
          • UserDBConfig.ts
    • context/
      • AuthContext.tsx
    • lib/
      • utils.ts
      • util/
        • avatar.ts
        • CryptoUtil.ts
    • utils/
      • cn.ts
      • func/
        • htmlDecode.ts
        • isNotPc.ts
        • localStorage.ts
      • musicControllers/
        • audioRef.ts
        • mediaSession.ts
        • otherControllers.ts
        • playControllers.ts
        • musicDB/
          • musicFromDB.ts
      • openApiFuncs/
        • randomAvatar.ts
      • saavnApis/
        • getSongInfo.api.ts
*.tsx 65*.ts 29*.xml 6*.png 4*.json 3*.gitignore 2*.mjs 2*.svg 2*.txt 2*.css 1*.env 1*.github 1*.idea 1*.iml 1*.jpg 1*.lock 1*.md 1*.sample 1 Total 124

Project Details

Repository
music-codershubinc
Created At
August 8, 2024

( 1 year 4 months ago )

First Commit
August 8, 2024

( 1 year 4 months ago )


Tagline
A fullstack music player web ...
Languages
TypeScriptCSSJavaScript
Technologies
TypeScript

File Counts

*.tsx 65*.ts 29*.xml 6*.png 4*.json 3*.gitignore 2*.mjs 2*.svg 2*.txt 2*.css 1*.env 1*.github 1*.idea 1*.iml 1*.jpg 1*.lock 1*.md 1*.sample 1
Total 124