BYOS (Build Your Own Server) Next.js is a Next.js implementation that powers device management, playlist-driven content scheduling, and on-demand BMP generation for e-ink displays.
- Device management UI with MAC/API key registration, status tracking, and refresh scheduling.
- Playlist-based screen rotation with time and weekday rules, custom durations, and per-device assignment.
- On-demand screen rendering to 1-bit BMP via Takumi/Satori with caching and revalidation.
- Postgres backed persistence for devices, logs, and playlists.
- Recipes gallery to prototype screens and compare direct vs. bitmap rendering before pushing to hardware.
- Tailwind v4 + TypeScript + Next.js 16 + React 19; Biome lint/format baseline.
- Docker Compose for app + Postgres; deploy-ready Vercel button with Supabase/Neon integration.
- Dynamic BMP generation with Next.js 16, React 19, Tailwind CSS v4, and TypeScript.
- Supabase-backed device management, logging, and playlist scheduling.
- No-DB fallback mode for quickly previewing screens without a database.
- Docker Compose support for local PostgreSQL.
- Recipes gallery for rapid screen prototyping before deploying to devices.
- Clean codebase with Biome linting and formatting.
- Live demo: https://byos-next-demo.vercel.app
- Overview UI:
public/byos-nextjs-overview.png - Device UI:
public/byos-nextjs-device.png
- Click the Vercel button above.
- Link a Supabase or Neon project when prompted.
- Deploy, then open the app and initialize tables.
- Point your TRMNL device at the deployed URL.
- Sync environment variables locally via
vercel linkandvercel env pullif you also develop on your machine.
export POSTGRES_PASSWORD=your_password
docker-compose up -d
# visit http://localhost:3000git clone https://github.com/usetrmnl/byos_next
cd byos_next
pnpm installStart the dev server:
pnpm devFormat/lint:
pnpm lintCreate .env.local with the keys you need. Common variables:
DATABASE_URL
POSTGRES_PASSWORD
- Supabase or Neon: run migrations in
migrations/in order to create tables and playlist support. - Docker/Postgres: set
POSTGRES_PASSWORD, rundocker-compose up -d. - No-DB mode: run
pnpm devwithout DB env vars to preview screens only (device management disabled).
app/- Next.js routes and screens (including/recipes).components/- UI components.migrations/- SQL migrations for Postgres.public/- Static assets and screenshots.scripts/,utils/,lib/- helpers for rendering, caching, and device logic.docs/api.md- HTTP API reference.
- Schedule screens by time and weekday with custom durations.
- Assign playlists to devices to rotate content automatically.
- Enable playlist mode per device in the UI.
Visit /recipes to browse screens and compare direct vs. bitmap rendering. To add one:
- Create a folder under
app/recipes/screens. - Add your component and data fetching logic.
- Register it in
app/recipes/screens.json.
See docs/recipes.md for more detail.
- API endpoints and payloads:
docs/api.md - Recipes reference:
app/recipes/README.md - Contributing guide:
CONTRIBUTING.md
- Better recipe management system
- Compatibility with TRMNL recipes
- GitHub Issues: https://github.com/usetrmnl/byos_next/issues
- Discussions: https://github.com/usetrmnl/byos_next/discussions
- Email: [email protected]
- TRMNL Discord: reply to the maintainer thread.
MIT - see LICENSE.