Skip to content

rafaelarantes/RockPlayerWeb

Repository files navigation

RockPlayerWeb

RockPlayerWeb is the Angular 22 front-end for RockPlayer: an onboarding screen where you pick the bands you already like, and a player screen where the recommended song actually plays, with like, dislike, next and back all independent from each other. It talks only to RockPlayerApi, never directly to RockRecommender or to the music provider.

It is the companion code for an 8-part blog series:

  1. Introducing RockPlayer
  2. Adapters: isolating the YouTube provider
  3. No database: caching lookups with Redis
  4. Angular 22 in practice
  5. Building the RockPlayer API, layer by layer
  6. The YouTube adapter: finding and playing the full song
  7. RockPlayer in Angular 22: structure and onboarding
  8. Putting it all together

Structure

src/app/pages/      one folder per screen (onboarding, player), standalone components, OnPush
src/app/models/     PlaybackSource, PlaybackKind
src/app/services/   one Angular service per RockPlayerApi concern (bands, users, recommendations, feedback)
src/app/layout/     the header

No NgModules, no state management library, state lives in signals. See the blog series above for the reasoning behind each of these choices.

Design

Dark, neon, 80s-rock-poster styling with Tailwind CSS v4 (@theme tokens in src/styles.css: rock-pink, rock-purple, rock-gold, rock-black, rock-surface, plus a Bebas Neue display font). The blog articles show the Angular template code without any Tailwind classes on purpose, to keep the teaching content focused on Angular itself rather than styling, the real templates in this repository are the ones with the actual classes.

Prerequisites

  • Node.js 20+ and npm
  • Angular CLI 22 (npx @angular/cli@22 version to check)
  • A running instance of RockPlayerApi (defaults to http://localhost:5200, configurable in src/app/services/api-config.ts)

Running it

npm install
npm start

Serves the app at http://localhost:4200. Visiting it redirects to /onboarding, where picking at least one band and submitting creates a user through RockPlayerApi and navigates to /player/:userId.

Building for production

npm run build

Output goes to dist/rock-player-web.

Running the tests

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages