Temple of the Moon Books Admin Guide

Quick Access

Admin Portal: https://templeofthemoonbooks.com/admin

Contact Email: sales@templeofthemoonbooks.com

Admin Sections

Dashboard

/admin/dashboard

Overview of store metrics and quick stats.

Orders

/admin/orders

  • View all customer orders
  • Update order status (Pending β†’ Processing β†’ Shipped β†’ Delivered)
  • View order details, shipping addresses, payment info
  • Generate internal PO numbers (TOTM-YYYY-NNNNN)

Supplier POs

/admin/supplier-orders

  • Generate purchase orders to Azure Green
  • Track supplier order status
  • Manage inventory replenishment
  • /admin/supplier-orders/generate - Create new supplier PO

Inventory

/admin/inventory

  • View all products
  • Check stock levels
  • Update product information
  • Toggle product visibility (eye icon)
  • Filter: Active Only / Show All (includes hidden products)

Visibility Toggle:

  • πŸ‘οΈ Green = Visible on storefront
  • πŸ‘οΈ Gray = Hidden from storefront
  • Click to toggle instantly

Community Posts

/admin/posts

  • Create and manage blog/community posts
  • Pin important posts to top
  • Publish/unpublish content
  • /admin/posts/new - Create new post

Community Posts Management

Creating a New Post

  1. Go to /admin/posts/new
  2. Fill in:
    • Title - Post headline
    • URL Slug - Auto-generated from title (editable)
    • Excerpt - Brief summary for previews
    • Featured Image URL - Hero image (optional)
    • Content - HTML formatted content
  3. Options:
    • Pin to top - Keeps post at top of feed
  4. SEO Settings (expandable):
    • Custom meta title
    • Custom meta description
  5. Click Save Draft or Publish

HTML Content Formatting

The content field accepts HTML. Common tags:

<p>Paragraph text</p>
 
<h2>Section Heading</h2>
<h3>Subsection</h3>
 
<ul>
  <li>Bullet point</li>
</ul>
 
<ol>
  <li>Numbered item</li>
</ol>
 
<blockquote>
Quote or callout text
</blockquote>
 
<strong>Bold text</strong>
<em>Italic text</em>
 
<a href="https://...">Link text</a>
 
<img src="https://..." alt="Description" />

Managing Posts

From /admin/posts:

ActionButtonDescription
Pin/UnpinπŸ“ŒToggle pinned status
Publish/UnpublishπŸ‘οΈToggle visibility
Edit✏️Open post editor
DeleteπŸ—‘οΈRemove post (confirms)

Pinned Posts

  • Pinned posts always appear at top of Community page
  • Multiple posts can be pinned
  • Use for: Welcome message, announcements, promotions

Order Workflow

Customer Order Flow

Customer Places Order
        ↓
Status: PENDING (PayPal captures payment)
        ↓
Admin reviews β†’ PROCESSING
        ↓
Items sourced from Azure Green
        ↓
Supplier PO generated
        ↓
Items received β†’ SHIPPED
        ↓
Tracking provided β†’ DELIVERED

Generating Supplier POs

  1. Go to /admin/supplier-orders/generate
  2. Review pending items needing restock
  3. Generate PO for Azure Green
  4. PO includes: SKUs, quantities, wholesale prices
  5. Place order with Azure Green
  6. Update status when received

Technical Details

Stack

  • Framework: Next.js 16 (App Router)
  • Database: PostgreSQL
  • ORM: Prisma
  • Hosting: Hostinger VPS (76.13.115.76)
  • Process Manager: PM2

Server Access

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76
cd /opt/deploy/repos/templeofthemoonbooks.com

Database Access

psql -h localhost -U admin -d totm

PM2 Commands

pm2 list                    # Show all processes
pm2 logs templeofthemoonbooks.com  # View logs
pm2 restart templeofthemoonbooks.com  # Restart app

Manual Deployment

cd /opt/deploy/repos/templeofthemoonbooks.com
git pull origin master
npx prisma db push
npx prisma generate
npm run build
pm2 restart templeofthemoonbooks.com

Product Management

Products are sourced from Azure Green wholesale catalog.

Current Inventory

  • 698 products imported from Azure Green
  • Auto-tagged with Liber 777 correspondences

Pricing Strategy

Target Markup: Wholesale + 35%

Price Fields:

  • price β€” Our selling price
  • wholesalePrice β€” Azure Green wholesale cost
  • retailPrice β€” Azure Green suggested retail (for comparison)

Formula:

Our Price = Wholesale Price Γ— 1.35

This undercuts Azure Green’s retail while maintaining healthy margins.

Adding Products

Use scraper scripts in /scripts/:

# Scrape a department
npx tsx scripts/scrape-dept.ts <dept-id>
 
# Scrape product descriptions
npx tsx scripts/scrape-descriptions.ts
 
# Sync to database
npx tsx scripts/sync-products.ts

Correspondences System

Products auto-tagged based on Liber 777:

  • Planets (Sun, Moon, Mars, etc.)
  • Elements (Fire, Water, Air, Earth)
  • Sephiroth (Kether through Malkuth)
  • Herbs (Frankincense, Myrrh, etc.)
  • Stones (Amethyst, Quartz, etc.)
  • Intents (Protection, Love, Prosperity, etc.)

Browse correspondences at /correspondences


URLs Summary

PageURL
Storefronthttps://templeofthemoonbooks.com
Shop/shop
Categories/category
Correspondences/correspondences
Community/community
Cart/cart
Admin Home/admin
Admin Dashboard/admin/dashboard
Admin Orders/admin/orders
Admin Supplier POs/admin/supplier-orders
Admin Inventory/admin/inventory
Admin Posts/admin/posts
New Post/admin/posts/new