How to use this admin
Quick reference for signing in, managing content, and where things are saved.
Getting started
- Open Login and sign in with an admin account. You need a valid JWT; the app stores it for API calls.
- After login you land on the Dashboard for a high-level snapshot.
- Use the left sidebar to jump between Devotionals, Books, Tags, Users, and this guide.
API & media URLs
- The admin talks to your backend using
NEXT_PUBLIC_API_URL(for examplehttp://localhost:3002/api). - Cover images, thumbnails, book PDFs, and devotional files are often returned as paths like
/uploads/books/…. The app resolves those against the API host so previews open from the server, not from the Next.js port. - Optional: set
NEXT_PUBLIC_MEDIA_ORIGINif static files are served from a different base URL than the API.
Dashboard
Shows summary stats from the admin API when available. Use it as a landing spot; detailed work happens in each content area.
Books
- Go to Books and use Add New Book or click a card to edit (load full book + quiz where supported).
- Fill Main details (title, author, description, status, ages, tags).
- Copyright: optional copyright line is sent as
copyrightContenton create (multipart) and persisted on update (JSON patch after save when needed). - Media: upload cover, thumbnail, and book PDF. If a PDF already exists when editing, use View current book PDF (opens from the API host).
- Quiz: add questions with 2–4 options and exactly one correct answer; quiz is saved to the book quiz API after the book is created or updated.
Devotionals
- Open Devotionals, then create or edit a plan.
- Each day must have a title (required) and body content.
- Optional files: devotional PDF, cover, thumbnail; day-level PDFs and puzzle/quiz sections follow the form layout.
- Puzzle word lists: if you enter fill-in-the-blank words, you need at least five words for that list. Other puzzle lists are not enforced by the same rule in this UI.
- Day quiz (admin): when viewing or editing per-day quizzes, the app uses the admin quiz endpoint where available so you can see which option is marked correct (the public GET may hide that).
Users
Lists users from the admin API and lets you change roles where the backend allows. Destructive actions use confirmation dialogs.
Tip: keep this tab bookmarked or use the sidebar Help link anytime you need a refresher.