Skip to content

R-uan/audio-archive-frontend

Repository files navigation

Audio Archive — Frontend

Next.js + Bun client for the Audio Archive project. Interfaces with the backend to browse and stream music from a local file system. This is made with local usage only, not made or tested with user scaling in mind.

Stack

  • Runtime — Bun
  • Framework — Next.js
  • Containerization — Docker

Prerequisites

  • Bun
  • Docker + Docker Compose
  • Backend running locally or via Docker — see below

Getting Started

Development (without Docker)

  1. Clone the repo
git clone https://github.com/R-uan/audio-archive-frontend.git
cd audio-archive-frontend
  1. Install dependencies
bun install
  1. Set up your local environment
cp .env.example .env.local
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_MEDIA_URL=http://localhost:5000/media
API_URL=http://localhost:5000/api
  1. Run it
bun run dev

Interface will be available at http://localhost:3000.

Make sure the backend is running — either locally or via Docker Compose.


Running with Docker Compose

The recommended way — spins up the frontend, backend, PostgreSQL, Redis, and the backup service together.

Related repositories

/parent/folder/
├── audio-archive-backend/
├── audio-archive-frontend/
└── docker-compose.yaml
docker compose up --build
Service Exposed Host URL
Interface http://localhost:3099
API http://localhost:5000
PostgreSQL localhost:5434
Redis localhost:6374

Environment Variables

Variable Description Example
NEXT_PUBLIC_API_URL API base URL for browser-side calls http://localhost:5000/api
NEXT_PUBLIC_MEDIA_URL Media base URL for browser-side streaming http://localhost:5000/media
API_URL API base URL for server-side calls (SSR) http://backend:8080/api

NEXT_PUBLIC_ variables are baked in at build time and exposed to the browser. API_URL is server-only and used during SSR — it can reference the internal Docker hostname directly.


Backups

The frontend holds no persistent state — all data lives in the backend's PostgreSQL instance. See the backend README for backup instructions.

About

Local-only web interface for the Audio Archive. Built with Next.js and Bun.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages