AudioBlocks is the artist dashboard for managing music, earnings, and fan engagement.
This repository contains a Next.js (app directory) frontend used by AudioBlocks artists.
Prerequisites
- Node.js 18+ (tested)
- npm (bundled with Node.js)
Local setup
- Clone the repository:
git clone <repo-url>
cd AudioBlocks_For_Artist- Install dependencies for the app:
cd app
npm install- Provide required environment variables (create
app/.env.local):
NEXT_PUBLIC_API_BASE_URL=https://api.example.com
NEXT_PUBLIC_API_URL=https://api.example.com- Run the dev server:
npm run devOther useful commands (run from the app directory):
npm run build— build production artifactsnpm start— run production servernpm run lint— run ESLintnpm run format— run Prettiernpm run test— run unit tests (Vitest)npm run test:e2e— run Playwright E2E testsnpm run storybook— start Storybook
app/— Next.js application (app directory)src/app— Next.js routes and layoutssrc/components— reusable UI componentssrc/context— React context providers (playback, auth, etc.)src/hooks— custom hooks (toasts, API handlers)src/services— API wrappers and data servicessrc/__tests__— unit and integration tests
- Uses Next.js 13+ with the
appdirectory and client components ('use client') where necessary. - State management is primarily local + React Context;
PlaybackContextusesuseReducerfor predictable updates. - UI notifications use
sonnerand now include an ARIA live region for screen-reader announcements. - Testing: unit tests with Vitest, E2E with Playwright, Storybook for component development.
- Fork the repo and create a branch named
feat/<short-desc>orfix/<short-desc>. - Ensure ESLint and Prettier pass locally:
cd app
npm run lint
npm run format- Run tests and add coverage for new code:
npm run test
npm run test:coverage-
Push your branch and open a pull request targeting
main. -
The repository has a GitHub Actions CI that runs lint, typechecking, and tests on PRs and pushes to
main.
This project aims to meet WCAG 2.1 AA where practical. Toast notifications are announced to assistive technologies via an ARIA live region.
Please include license and code-of-conduct files if you intend to accept external contributions. If you would like, I can add suggested LICENSE and CODE_OF_CONDUCT.md files.
If you'd like, I can also:
- Run the test suite locally and report results
- Commit and push these changes to a branch
- Add a
CONTRIBUTING.mdorCODE_OF_CONDUCT.md