Skip to content

masiama/libri-admin

Repository files navigation

Libri Admin

Admin panel for managing the Libri catalog and triggering crawler runs.

Built with Vue 3, Vite, TypeScript, Clerk authentication, and Nuxt UI.

Features

  • Browse books with pagination, filtering, and sorting
  • Add, edit, and delete books
  • Upload or replace cover images while managing books
  • Trigger crawler runs for all sources or a single source
  • Browse crawl history with status, books found, and error details
  • Receive live crawler status updates in the UI via SSE
  • Review and resolve books with invalid ISBNs via the purgatory queue
  • Protect admin access with Clerk-issued JWTs

Requirements

  • Node.js 20+
  • pnpm
  • A running libri-api instance
  • A Clerk application with a publishable key and JWT template

Environment variables

Create a local env file from the example:

cp .env.example .env

Available variables:

VITE_CLERK_PUBLISHABLE_KEY=pk_***
VITE_CLERK_JWT_TEMPLATE=jwt-admin
VITE_API_BASE=http://localhost:8080

Notes:

  • VITE_API_BASE should point to the host running libri-api
  • VITE_CLERK_JWT_TEMPLATE must match the Clerk JWT template expected by the API

Getting started

Install dependencies:

pnpm install

Start the development server:

pnpm dev

The app runs on http://localhost:3000.

Authentication

libri-admin authenticates users with Clerk and sends a Bearer token to libri-api.

To access admin endpoints successfully:

  • the API must trust your Clerk JWKS URL
  • the JWT template used by the admin must match the one expected by the API
  • the signed-in user must have is_admin: true

Example Clerk public metadata:

{
  "is_admin": true
}

About

Admin panel for Libri

Topics

Resources

Stars

Watchers

Forks

Contributors