{
  "app_name": "Library Management System",
  "pages": [
    {
      "page_id": "login",
      "page_title": "Login",
      "route_path": "/login",
      "route_params": [],
      "image_indices": [],
      "description": "Authentication page with email and password fields. Includes 'Forgot Password' link, 'Remember Me' checkbox, and a 'Sign In' button. Also has a link to the member registration page for new users. Displays error messages for invalid credentials or locked accounts.",
      "navigates_to": [
        "register",
        "admin_dashboard",
        "librarian_dashboard",
        "member_dashboard",
        "forgot_password"
      ]
    },
    {
      "page_id": "forgot_password",
      "page_title": "Forgot Password",
      "route_path": "/forgot-password",
      "route_params": [],
      "image_indices": [],
      "description": "Password reset page where users enter their email address to receive a password reset link. Contains an email input field, a 'Send Reset Link' button, and a link back to the login page. Shows success message after submission.",
      "navigates_to": [
        "login"
      ]
    },
    {
      "page_id": "register",
      "page_title": "Member Registration",
      "route_path": "/register",
      "route_params": [],
      "image_indices": [],
      "description": "Self-registration form for new library members. Fields include: full name, email, phone number, date of birth, address (street, city, state, zip), and password with confirmation. Validates email uniqueness, password strength (min 8 chars, mix of letters/numbers/special), and age requirement (13+). Submit button creates account with 'Pending' status. Link back to login page.",
      "navigates_to": [
        "login"
      ]
    },
    {
      "page_id": "admin_dashboard",
      "page_title": "Administrator Dashboard",
      "route_path": "/admin/dashboard",
      "route_params": [],
      "image_indices": [],
      "description": "Administrator overview dashboard with stat cards showing: total books in catalog, total active members, total active loans, total fines collected this month, and pending member registrations count. Charts include: circulation statistics line chart (checkouts/returns over time), popular books bar chart (top 10 most borrowed), fine collection trend chart, and new member registrations over time. Recent activity feed showing latest system events. Quick action buttons for common tasks.",
      "navigates_to": [
        "admin_users",
        "book_catalog",
        "members_list",
        "loans_list",
        "fines_list",
        "reports",
        "system_settings",
        "audit_logs",
        "notifications_mgmt"
      ]
    },
    {
      "page_id": "librarian_dashboard",
      "page_title": "Librarian Dashboard",
      "route_path": "/librarian/dashboard",
      "route_params": [],
      "image_indices": [],
      "description": "Librarian overview dashboard with stat cards: books due today count, overdue items count, pending reservations count, pending member approvals count. Tables/lists include: books due today (member name, book title, due date), overdue items list (member, book, days overdue, fine accrued), reservations ready for pickup (member, book, expiry date). Quick action buttons: Check Out Book, Process Return, Add New Book. Recent activity feed showing circulation events.",
      "navigates_to": [
        "book_catalog",
        "members_list",
        "loans_list",
        "reservations_list",
        "fines_list",
        "checkout_process",
        "return_process",
        "reports"
      ]
    },
    {
      "page_id": "member_dashboard",
      "page_title": "Member Dashboard",
      "route_path": "/member/dashboard",
      "route_params": [],
      "image_indices": [],
      "description": "Member personal dashboard showing stat cards: current loans count (out of max 5), active reservations count, outstanding fines total amount. Current loans table with columns: book title, checkout date, due date, renewals used, status (with overdue highlighted in red), and a 'Renew' action button for eligible loans. Active reservations list showing: book title, reservation date, queue position, estimated availability, and 'Cancel' button. Outstanding fines summary with link to full fines page. Recent notifications list.",
      "navigates_to": [
        "public_catalog",
        "member_loans",
        "member_reservations",
        "member_fines",
        "member_profile",
        "member_notifications"
      ]
    },
    {
      "page_id": "public_catalog",
      "page_title": "Book Catalog",
      "route_path": "/catalog",
      "route_params": [],
      "image_indices": [],
      "description": "Public-facing book catalog accessible to all users including guests. Features a prominent search bar with autocomplete supporting search by title, author, or ISBN. Filter panel on the left with: category tree (hierarchical), author filter, publisher filter, publication year range, availability status (Available, On Loan, Reserved), and language. Results displayed as cards or list view (toggle) showing: cover image, title, author(s), publication year, average star rating, availability badge (green for Available, red for On Loan, yellow for Reserved). Pagination controls at bottom with configurable items per page. Sort options: relevance, title A-Z, author, publication date, popularity. Each book card links to book detail page.",
      "navigates_to": [
        "book_detail",
        "login",
        "register"
      ]
    },
    {
      "page_id": "book_detail",
      "page_title": "Book Details",
      "route_path": "/catalog/:bookId",
      "route_params": [
        "bookId"
      ],
      "image_indices": [],
      "description": "Detailed view of a single book. Displays: cover image, title, subtitle, author(s) (linked to author page), publisher, ISBN, publication date, edition, language, page count, categories (as tags), full description, shelf location, and availability status with copy count (e.g., '2 of 3 copies available'). Shows average star rating with count. 'Reserve This Book' button visible for logged-in members when all copies are on loan. Reviews section below showing member reviews with star rating, review text, member name, and date. Members who have borrowed this book see an 'Add Review' button which opens a modal with star rating selector (1-5) and text area (max 1000 chars). Related books section at bottom.",
      "navigates_to": [
        "public_catalog",
        "author_detail"
      ]
    },
    {
      "page_id": "author_detail",
      "page_title": "Author Details",
      "route_path": "/authors/:authorId",
      "route_params": [
        "authorId"
      ],
      "image_indices": [],
      "description": "Author profile page showing: author photo, full name, biography text. Below that, a list/grid of all books by this author in the library catalog, displayed as book cards with title, cover, publication year, and availability status. Each book links to its detail page.",
      "navigates_to": [
        "book_detail",
        "public_catalog"
      ]
    },
    {
      "page_id": "book_catalog",
      "page_title": "Book Management",
      "route_path": "/admin/books",
      "route_params": [],
      "image_indices": [],
      "description": "Staff-facing book catalog management page. Table with columns: ID, Cover thumbnail, Title, Author(s), ISBN, Publisher, Category, Status (Available/On Loan/Reserved/Processing/Damaged/Lost/Withdrawn), Copies count, Actions. Search bar and filters for status, category, author. Action buttons per row: Edit (opens modal with all book fields: ISBN, title, subtitle, authors multi-select, publisher select, publication date, edition, language, page count, description, cover image upload, shelf location, status), Delete (confirmation modal, disabled if active loans/reservations). 'Add New Book' button opens a modal/drawer with the same fields plus option to check for duplicate ISBN. Bulk import button for CSV upload. Pagination controls.",
      "navigates_to": [
        "admin_dashboard",
        "librarian_dashboard",
        "authors_list",
        "categories_list",
        "publishers_list"
      ]
    },
    {
      "page_id": "authors_list",
      "page_title": "Authors Management",
      "route_path": "/admin/authors",
      "route_params": [],
      "image_indices": [],
      "description": "Authors management page with a table showing: ID, Photo thumbnail, Name, Biography (truncated), Books Count, Actions (Edit, Delete). 'Add Author' button opens a modal with fields: name, biography text area, photo upload. Edit action opens same modal pre-filled. Delete requires confirmation and checks for associated books. Search bar to filter authors by name. Pagination controls.",
      "navigates_to": [
        "book_catalog",
        "admin_dashboard"
      ]
    },
    {
      "page_id": "categories_list",
      "page_title": "Categories Management",
      "route_path": "/admin/categories",
      "route_params": [],
      "image_indices": [],
      "description": "Category management page displaying hierarchical category tree structure. Each category shows: name, parent category (if any), book count. Actions per category: Edit (modal with name and parent category dropdown), Delete (confirmation, only if no books assigned). 'Add Category' button opens modal with name field and optional parent category select for hierarchy. Search/filter functionality.",
      "navigates_to": [
        "book_catalog",
        "admin_dashboard"
      ]
    },
    {
      "page_id": "publishers_list",
      "page_title": "Publishers Management",
      "route_path": "/admin/publishers",
      "route_params": [],
      "image_indices": [],
      "description": "Publishers management page with table columns: ID, Name, Address, Contact Info, Books Count, Actions (Edit, Delete). 'Add Publisher' button opens modal with fields: name, address, contact information (phone, email). Edit opens same modal pre-filled. Delete requires confirmation. Search bar and pagination.",
      "navigates_to": [
        "book_catalog",
        "admin_dashboard"
      ]
    },
    {
      "page_id": "members_list",
      "page_title": "Members Management",
      "route_path": "/admin/members",
      "route_params": [],
      "image_indices": [],
      "description": "Members management page with table columns: Member ID, Name, Email, Phone, Status (Pending/Active/Suspended/Expired/Inactive as colored badges), Join Date, Active Loans, Outstanding Fines, Actions. Filter by status dropdown. Search by name/email/member ID. Actions per row: View Details (navigates to member detail), Edit (modal with contact fields), Approve (for Pending members), Suspend (modal with reason field), Reactivate, Delete. Bulk actions for approving pending members. 'Add Member' button opens modal with registration fields. Pagination controls.",
      "navigates_to": [
        "member_detail",
        "admin_dashboard",
        "librarian_dashboard"
      ]
    },
    {
      "page_id": "member_detail",
      "page_title": "Member Detail",
      "route_path": "/admin/members/:memberId",
      "route_params": [
        "memberId"
      ],
      "image_indices": [],
      "description": "Comprehensive member profile view for staff. Header section with member photo, name, ID, status badge, and action buttons (Edit, Suspend/Reactivate, Reset Password). Profile info section: email, phone, address, date of birth, join date, membership expiry. Stats cards: total books borrowed, current loans, active reservations, outstanding fines total. Tabs below: Current Loans (table with book, checkout date, due date, renewals, status), Borrowing History (full loan history with filters), Active Reservations (book, date, queue position, status), Fines (all fines with status and payment info), Payments (payment history), Reviews (member's reviews). Each tab has relevant action buttons.",
      "navigates_to": [
        "members_list",
        "loans_list",
        "fines_list"
      ]
    },
    {
      "page_id": "admin_users",
      "page_title": "User Administration",
      "route_path": "/admin/users",
      "route_params": [],
      "image_indices": [],
      "description": "Administrator-only page for managing system users (librarians and administrators). Table with columns: User ID, Name, Email, Role (Admin/Librarian), Status (Active/Inactive), Last Login, Actions. 'Create Librarian' button opens modal with fields: name, email, phone, employee ID, password. 'Create Administrator' button (similar modal). Actions per row: Edit, Deactivate/Activate, Reset Password (confirmation modal). Filter by role and status. Search by name/email.",
      "navigates_to": [
        "admin_dashboard"
      ]
    },
    {
      "page_id": "checkout_process",
      "page_title": "Book Checkout",
      "route_path": "/circulation/checkout",
      "route_params": [],
      "image_indices": [],
      "description": "Checkout processing page for librarians. Two-step form: Step 1 - Member lookup with search field (by member ID, name, or email) showing member info card once found (name, ID, status, current loans count/limit, outstanding fines). Validation messages if member is suspended or over fine threshold. Step 2 - Book entry with search/scan field (by book ID, ISBN, or title) showing book info card (title, author, status, shelf location). Validation if book is unavailable or reserved by another member. Checkout summary showing calculated due date. 'Process Checkout' button creates the loan. Success confirmation with receipt details (member, book, checkout date, due date). Option to check out another book to same member.",
      "navigates_to": [
        "librarian_dashboard",
        "loans_list"
      ]
    },
    {
      "page_id": "return_process",
      "page_title": "Book Return",
      "route_path": "/circulation/return",
      "route_params": [],
      "image_indices": [],
      "description": "Return processing page for librarians. Single search/scan field to enter book ID or ISBN. Once entered, system displays: book info (title, author), loan info (member name, checkout date, due date), return status (on time or overdue with days count). If overdue, shows calculated fine amount. Option to mark book as damaged (dropdown: minor/moderate/severe with additional fine). 'Process Return' button completes the return. Success confirmation showing: return receipt, any fines generated, and notification if book has pending reservations (shows next member in queue). Option to process another return.",
      "navigates_to": [
        "librarian_dashboard",
        "loans_list"
      ]
    },
    {
      "page_id": "loans_list",
      "page_title": "Loans Management",
      "route_path": "/circulation/loans",
      "route_params": [],
      "image_indices": [],
      "description": "Comprehensive loans management page. Table with columns: Loan ID, Book Title, Member Name, Checkout Date, Due Date, Return Date, Renewals (count/max), Status (Active/Returned/Overdue as colored badges), Fine Amount, Actions. Filters: status (Active/Returned/Overdue), date range picker, member search, book search. Actions per row: View Details (modal showing full loan info including renewal history), Renew (if eligible), Process Return (redirects to return process). Summary stats at top: total active loans, overdue count, due today count. Pagination and export to CSV button.",
      "navigates_to": [
        "checkout_process",
        "return_process",
        "librarian_dashboard",
        "admin_dashboard"
      ]
    },
    {
      "page_id": "reservations_list",
      "page_title": "Reservations Management",
      "route_path": "/circulation/reservations",
      "route_params": [],
      "image_indices": [],
      "description": "Reservations management page for staff. Table with columns: Reservation ID, Book Title, Member Name, Reservation Date, Queue Position, Status (Active/Ready for Pickup/Fulfilled/Cancelled/Expired as colored badges), Expiry Date (for ready pickups), Actions. Filters: status dropdown, date range, book search, member search. Actions per row: View Details (modal with full reservation info), Cancel (modal with reason field), Process Pickup (triggers checkout workflow). Summary stats: total active reservations, ready for pickup count, expired today. Pagination.",
      "navigates_to": [
        "librarian_dashboard",
        "checkout_process"
      ]
    },
    {
      "page_id": "fines_list",
      "page_title": "Fines Management",
      "route_path": "/fines",
      "route_params": [],
      "image_indices": [],
      "description": "Fines management page. Table with columns: Fine ID, Member Name, Type (Overdue/Damaged/Lost/Other), Amount, Paid Amount, Balance, Associated Book/Loan, Date Assessed, Status (Outstanding/Partially Paid/Paid/Waived as colored badges), Actions. Filters: status, type, date range, member search. Actions: View Details (modal with fine breakdown and payment history), Process Payment (modal with amount field, payment method dropdown: Cash/Credit Card/Debit Card/Check, and notes), Waive Fine (admin only, modal with reason). 'Add Manual Fine' button opens modal with: member select, type, amount, reason, associated loan (optional). Summary stats: total outstanding, collected this month, waived this month. Pagination and export.",
      "navigates_to": [
        "admin_dashboard",
        "librarian_dashboard",
        "member_detail"
      ]
    },
    {
      "page_id": "reports",
      "page_title": "Reports & Analytics",
      "route_path": "/reports",
      "route_params": [],
      "image_indices": [],
      "description": "Reports page with tabs or cards for different report types. Available reports: Circulation Statistics (checkouts, returns, renewals by date range with line chart), Overdue Items Report (table with member contact info, days overdue, fine amount), Popular Books (bar chart of most borrowed/reserved books), Member Activity (new registrations, active members, suspensions over time), Fine Collection (fines assessed vs collected vs outstanding, pie chart by type), Inventory Report (total books by category, by status with donut charts), Reservation Queue Report. Each report has: date range picker, category filter, export buttons (PDF, CSV). Charts are interactive with tooltips.",
      "navigates_to": [
        "admin_dashboard",
        "librarian_dashboard"
      ]
    },
    {
      "page_id": "system_settings",
      "page_title": "System Settings",
      "route_path": "/admin/settings",
      "route_params": [],
      "image_indices": [],
      "description": "Administrator-only system configuration page with sections/tabs: Loan Settings (loan period in days, max renewals, max concurrent loans), Reservation Settings (max reservations per member, hold period in days), Fine Settings (daily overdue rate, max fine cap, suspension threshold amount), Membership Settings (membership duration, expiration reminder days), Library Information (library name, address, phone, email, operating hours). Each section has input fields with current values, validation, and a 'Save' button. Changes are logged to audit trail.",
      "navigates_to": [
        "admin_dashboard"
      ]
    },
    {
      "page_id": "audit_logs",
      "page_title": "Audit Logs",
      "route_path": "/admin/audit-logs",
      "route_params": [],
      "image_indices": [],
      "description": "Administrator-only audit log viewer. Table with columns: Timestamp, User (name and role), Action Type, Entity Type, Entity ID, Description, IP Address. Filters: date range picker, user search, action type dropdown (Login, Checkout, Return, Payment, Configuration Change, etc.), entity type dropdown (Book, Member, Loan, Fine, etc.). Search across descriptions. Expandable rows showing before/after values for data changes. Read-only - no edit or delete actions available. Pagination with large page sizes. Export to CSV.",
      "navigates_to": [
        "admin_dashboard"
      ]
    },
    {
      "page_id": "member_profile",
      "page_title": "My Profile",
      "route_path": "/member/profile",
      "route_params": [],
      "image_indices": [],
      "description": "Member self-service profile page. Displays current profile information: name, email, phone, address, date of birth, member ID, membership status, membership expiry date. 'Edit Profile' button enables inline editing of contact fields (phone, address). 'Change Password' section with current password, new password, confirm password fields with strength indicator. Avatar/photo upload area. Notification preferences section with toggles for: email due date reminders, overdue notifications, reservation notifications, fine notifications. Save button for each section.",
      "navigates_to": [
        "member_dashboard"
      ]
    },
    {
      "page_id": "member_loans",
      "page_title": "My Loans",
      "route_path": "/member/loans",
      "route_params": [],
      "image_indices": [],
      "description": "Member's personal loan history page. Two sections: Current Loans table (book title with cover thumbnail, checkout date, due date, renewals used/max, status badge, 'Renew' button for eligible loans) and Loan History table (book title, checkout date, due date, return date, status, any fines). Filter history by date range and status. Renew button triggers confirmation modal showing new due date. If renewal is denied, modal shows reason (reserved by another, max renewals reached, overdue, excessive fines). Pagination on history.",
      "navigates_to": [
        "member_dashboard",
        "book_detail"
      ]
    },
    {
      "page_id": "member_reservations",
      "page_title": "My Reservations",
      "route_path": "/member/reservations",
      "route_params": [],
      "image_indices": [],
      "description": "Member's reservations page showing active and past reservations. Active reservations table: book title, reservation date, queue position, estimated availability, status (Active/Ready for Pickup), expiry date (if ready), 'Cancel' button with confirmation modal. Past reservations table: book title, reservation date, status (Fulfilled/Cancelled/Expired), resolution date. Info text explaining reservation rules (3-day pickup window, max 5 active).",
      "navigates_to": [
        "member_dashboard",
        "book_detail"
      ]
    },
    {
      "page_id": "member_fines",
      "page_title": "My Fines",
      "route_path": "/member/fines",
      "route_params": [],
      "image_indices": [],
      "description": "Member's fines and payment history page. Summary card at top showing total outstanding balance. Outstanding fines table: fine type, associated book/loan, amount, date assessed, status. Payment history table: payment date, amount, method, fines applied to, receipt number. If online payment is enabled, 'Pay Now' button opens payment modal with amount field and payment method selection. Info text about fine policies (daily rate, max cap, suspension threshold).",
      "navigates_to": [
        "member_dashboard"
      ]
    },
    {
      "page_id": "member_notifications",
      "page_title": "My Notifications",
      "route_path": "/member/notifications",
      "route_params": [],
      "image_indices": [],
      "description": "Member's notification inbox. List of notifications with: icon by type (due reminder, overdue alert, reservation ready, fine notice, payment confirmation, system announcement), title, message preview, timestamp, read/unread indicator (bold for unread). Clicking a notification expands to show full message and marks as read. 'Mark All as Read' button at top. Filter by type dropdown and read/unread toggle. Pagination. Notifications sorted by date descending.",
      "navigates_to": [
        "member_dashboard"
      ]
    },
    {
      "page_id": "notifications_mgmt",
      "page_title": "Notifications Management",
      "route_path": "/admin/notifications",
      "route_params": [],
      "image_indices": [],
      "description": "Staff notification management page. Table of sent notifications: ID, recipient member, type, subject, sent date, delivery status (Sent/Failed/Pending), read status. 'Send Custom Notification' button opens modal with: recipient member search/select (or 'All Members' broadcast), subject, message body text area, send immediately or schedule. Filter by type, status, date range. Retry button for failed notifications. Pagination.",
      "navigates_to": [
        "admin_dashboard"
      ]
    }
  ],
  "shared_state": [
    {
      "key": "currentUser",
      "type": "{ id: string; name: string; email: string; role: 'administrator' | 'librarian' | 'member' | 'guest'; memberId?: string; } | null",
      "initial_value": "null",
      "description": "Currently authenticated user information used for role-based access control, navigation, and personalization across all pages"
    },
    {
      "key": "authToken",
      "type": "string | null",
      "initial_value": "null",
      "description": "JWT or session token for authenticating API requests from any page"
    },
    {
      "key": "unreadNotificationCount",
      "type": "number",
      "initial_value": "0",
      "description": "Count of unread notifications displayed in the navigation header badge across all pages"
    },
    {
      "key": "librarySettings",
      "type": "{ loanPeriodDays: number; maxRenewals: number; maxLoans: number; maxReservations: number; dailyFineRate: number; maxFineCap: number; suspensionThreshold: number; holdPeriodDays: number; libraryName: string; } | null",
      "initial_value": "null",
      "description": "System configuration settings used across circulation, fines, and reservation pages for validation and display"
    }
  ],
  "default_route": "login",
  "design_system": {
    "theme_mode": "light",
    "density": "comfortable",
    "color_primary": "#1677ff",
    "color_success": "#52c41a",
    "color_warning": "#faad14",
    "color_error": "#ff4d4f",
    "color_bg_container": "#ffffff",
    "color_bg_layout": "#f5f5f5",
    "color_text": "#000000e0",
    "color_border": "#d9d9d9",
    "font_family": "Inter, -apple-system, sans-serif",
    "font_size_base": 14,
    "border_radius": 6,
    "component_overrides": {}
  }
}
