Skip to content

About

Node/Express music store demo with a tested API (Jest + Supertest), search, cart, audio previews

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Echo Verse - Music Store Demo

Simple music store built with:

  • Node.js + Express backend
  • Vanilla HTML/CSS/JS frontend
  • Jest + Supertest for API testing

Features

  • Browse albums (static JSON data)
  • Search by title or artist (debounced)
  • Filter by genre
  • LocalStorage powered cart (add / remove / quantity adjust / clear)
  • Simple checkout simulation (alert)
  • Audio preview button (if album has previewUrl)
  • API endpoints:
    • GET /api/albums (optional search, genre query params)
    • GET /api/albums/:id
    • GET /api/health

Project Structure

src/
	server.js          # Express app
	routes/albums.js   # Album routes
	data/              # Static JSON + access helpers
public/
	index.html         # UI
	styles.css         # Styling
	app.js             # Frontend logic
tests/
	albums.test.js     # Jest API tests

Getting Started

Install dependencies:

npm install

Run in dev mode with auto-reload:

npm run dev

Open http://localhost:3000/

Run tests:

npm test

Audio Preview

Place a demo audio file at public/audio/demo.mp3 (or adjust the previewUrl in src/data/albums.json). The frontend renders a ▶ button for albums with a previewUrl. Clicking it plays/stops a single shared audio element.

Notes:

  • Supported formats depend on the browser (recommend .mp3 for widest support).
  • Only one preview plays at a time; starting a new one stops the previous.
  • To add more previews, add previewUrl to other album objects.

Player Bar

When a preview starts, a global player bar appears at the bottom with:

  • Title / artist
  • Play/Pause toggle (⏸ / ▶)
  • Seek bar (drag to seek)
  • Elapsed and total time (mm:ss) It hides automatically when playback ends or you stop the track.

Next Ideas

  • Persist orders (SQLite or Mongo)
  • User auth + sessions
  • Pagination + sorting
  • Album artwork uploads
  • Better accessibility & keyboard navigation
  • TypeScript migration

License

ISC (demo only)

About

Node/Express music store demo with a tested API (Jest + Supertest), search, cart, audio previews

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages