Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

812 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

raspi-signage

Raspberry Pi Bun Docker Next.js React TypeScript MUI Emotion Better Auth Neon Postgres Vercel Blob RustFS Biome Playwright mise

Digital signage system for Raspberry Pi

Architecture

Concern Production Local development
Database Neon (Postgres) Postgres via Docker
Authentication Better Auth (email + password) Better Auth against local Postgres
Image / video storage Vercel Blob RustFS (S3-compatible) via Docker
Hosting Vercel bun dev

The app talks to the database and storage exclusively through Server Actions (src/services/*.ts files marked with "use server"), so the browser bundle contains no database driver or S3 client. Better Auth's REST endpoints are mounted at /api/auth/[...all].

Prerequisites

Setup

1. Install tools and start local services

mise install
mise run local:up

local:up starts a Postgres container on localhost:54322 and a RustFS (S3-compatible) container on localhost:9000 (console: localhost:9001).

2. Configure environment variables

mise run local:env

This writes the local development values into .env:

Variable Local default
DATABASE_URL postgres://raspi:raspi@127.0.0.1:54322/raspi_signage
BETTER_AUTH_SECRET development placeholder
BETTER_AUTH_URL http://localhost:3000
NEXT_PUBLIC_APP_URL http://localhost:3000
STORAGE_PROVIDER s3 (use vercel-blob in production)
S3_ENDPOINT http://127.0.0.1:9000
S3_BUCKET signage-contents
S3_PUBLIC_BASE_URL http://127.0.0.1:9000/signage-contents

Note: .env is included in .gitignore. Do not commit secrets.

In production, set DATABASE_URL to your Neon connection string, STORAGE_PROVIDER=vercel-blob, and provide BLOB_READ_WRITE_TOKEN from the Vercel Blob integration.

3. Apply the schema and seed data

mise run db:reset

This applies src/db/schema.sql to Postgres, ensures the RustFS bucket exists with a public-read policy, and seeds:

Account Email Password Role
Admin admin@example.com password123 Admin
User user@example.com password123 General User

Seed data includes 8 areas (関東, 関西, 北海道, 東北, 中部, 中国, 四国, 九州) populated with public images from the Open Up Group corporate site so the signage display has something to render out of the box.

4. Install dependencies and start dev server

bun install
bun dev

Open http://localhost:3000/dashboard/login to access the dashboard.

Pages

URL Description
/ Signage display (specify area with ?areaId=)
/dashboard/login Login
/dashboard Dashboard (top page)
/dashboard/manage-contents Content management
/dashboard/view-position Display position adjustment
/dashboard/area-management Area management
/dashboard/user-account-management User account management
/dashboard/account-setting-management Account settings
/dashboard/password-reset Password reset

Common tasks

mise run local:up      # start Postgres + RustFS containers
mise run local:down    # stop containers (data persists in volumes)
mise run local:env     # regenerate .env with local defaults
mise run db:migrate    # apply src/db/schema.sql
mise run db:seed       # truncate + reseed via Better Auth
mise run db:reset      # migrate + ensure bucket + seed
bun run test:unit      # bun test (happy-dom)
bun run test:e2e       # Playwright E2E
bun run lint           # Biome

About

Digital signage system with Rasberry Pi

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages