The Problem

This repository turns any device with a web browser into a smart digital photo frame, featuring a remote admin panel for photo management and a full-screen slideshow. While the functional scope is clear, the codebase exhibits significant technical debt that impacts security, maintainability, and deployment readiness for a client engagement.

What This Does

The project splits concerns between a React frontend located in server/public/ and an Express backend in server/. The frontend (server/public/admin.js, server/public/js/) handles the UI, slideshow logic, folder selection, and admin panel interactions. The backend (server/server.js, server/routes/) manages API routes, authentication, and file operations. A Dockerfile and docker-compose.yml are present, indicating the intent for containerized deployment. Core features include a Material Design 3-styled UI, keyboard navigation for the slideshow, and a "wake lock" to prevent screen sleeping during display.

How It Is Wired

Execution starts at init defined in server/public/access-accounts.js:9, which reaches 29 functions and triggers loadAccounts to read the filesystem via fs.readFile. The most connected module in the internal call graph is server/routes/api (instability 0.88), with 7 outgoing import edges, making it a high-impact hub for changes. A critical wiring issue exists in server/server.js, which configures CORS with a wildcard origin paired with credentials; this allows any website to make authenticated requests with a user's browser cookies attached. The call graph shows high-frequency utility functions like showToast (called from 18 places) and loadFolderContents (called from 12 places), indicating these are chokepoints for user feedback and data loading.

How To Use It

Setup: Install dependencies using npm install (inferred from package.json files present in root and server/). Configuration: Environment variables are defined in server/.env.example. Notably, the OAuth setup and any API keys required for Google Photos integration would be configured here. Running it: The project can be started via docker-compose up using the provided Dockerfile and docker-compose.yml, or directly with node server/server.js to start the Express server. The admin panel is accessed at http://your-server-ip:3000/admin.

Real-World Use

A consultant deploying this for a client would spin up the Docker container to display a slideshow on a lobby screen. Staff would then navigate to the admin panel to drag-and-drop new photo folders, organizing the library without touching the server filesystem directly. The folder selector would remember the last viewed path across sessions, allowing targeted slideshows for specific departments or events.

Code Health & Issues

The static analysis identified 7 findings ranked by severity:

  • [HIGH] Add a LICENSE - No licence file exists at the repository root, making redistribution rights undefined. Evidence: root directory.
  • [HIGH] Add a workflow that builds and tests this repository - No CI configuration detected across 27 source files.
  • [HIGH] Add a build gate for the deployable artifacts here - Dockerfile - Deployment artifacts exist with no automated workflow to validate builds.
  • [HIGH] Replace the wildcard CORS origin with an explicit allow list - server/server.js uses cors() with a wildcard, combined with credentials, which browsers block for security reasons and creates an attack surface.
  • [MEDIUM] Enable Dependabot or Renovate - 1 manifest present, no update bot configured.
  • [MEDIUM] Pin the container base image by digest - Dockerfile uses node:18-alpine, a mutable tag.
  • [MEDIUM] Expand the test suite - 1 test file against 27 source files (ratio 0.037).

The Bottom Line

This is a functional prototype with a clear feature set for digital signage, but it requires significant polish before it is suitable for a production client deployment. The absence of a licence, CI/CD, and the wildcard CORS misconfiguration are blocking issues for professional use. The codebase would benefit from splitting the oversized frontend files and establishing a build gate. It is viable for internal tooling or a proof-of-concept, but not yet for client-facing delivery without remediation.