Temple of the Moon Books - Technical Specification
Stack Recommendation
Frontend
| Component | Technology | Rationale |
|---|---|---|
| Framework | Next.js 14+ | React + SSR, great for SEO, Node.js based |
| Styling | Tailwind CSS | Rapid styling, easy theming (grey/purple palette) |
| Animations | Framer Motion | Smooth moon phase entrance animation |
| State | Zustand or Jotai | Lightweight cart state management |
Backend
| Component | Technology | Rationale |
|---|---|---|
| API | Next.js API Routes | Keep it simple, same codebase |
| Database | PostgreSQL | Relational for complex tag queries |
| ORM | Prisma | Type-safe, great DX |
| Auth | NextAuth.js | If user accounts needed |
E-commerce
| Component | Technology | Rationale |
|---|---|---|
| Payments | Stripe | Industry standard, easy setup |
| Cart | Custom + Zustand | Correspondence-aware cart logic |
| Inventory | Custom DB | Sync with Azure Green catalog |
Infrastructure
| Component | Technology | Rationale |
|---|---|---|
| Hosting | Vercel or Railway | Easy Next.js deployment |
| Images | Cloudflare Images or S3 | Product photography CDN |
| Domain | Already owned | templeofthemoonbooks.com |
Database Schema (Draft)
-- Products
CREATE TABLE products (
id UUID PRIMARY KEY,
name VARCHAR(255) NOT NULL,
slug VARCHAR(255) UNIQUE NOT NULL,
description TEXT,
price DECIMAL(10,2) NOT NULL,
sale_price DECIMAL(10,2),
sku VARCHAR(100),
source ENUM('inhouse', 'azuregreen') NOT NULL,
azure_green_id VARCHAR(100),
stock_quantity INT DEFAULT 0,
featured BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
-- Correspondence Tags
CREATE TABLE tags (
id UUID PRIMARY KEY,
name VARCHAR(100) NOT NULL,
slug VARCHAR(100) UNIQUE NOT NULL,
category ENUM(
'physical', -- candle, book, incense, oil
'color', -- red, black, white
'planet', -- Mars, Venus, Saturn
'element', -- Fire, Water, Air, Earth
'sephira', -- Geburah, Netzach, etc
'day', -- Tuesday, Friday
'metal', -- Iron, Copper
'number', -- 5, 7, 3
'intent', -- protection, love, banishing
'zodiac', -- Aries, Scorpio
'decan', -- specific decans
'herb', -- associated herbs
'stone' -- associated stones
) NOT NULL,
description TEXT,
source VARCHAR(100) -- "777:col6", "CMT:p42"
);
-- Product-Tag Junction
CREATE TABLE product_tags (
product_id UUID REFERENCES products(id),
tag_id UUID REFERENCES tags(id),
PRIMARY KEY (product_id, tag_id)
);
-- Images
CREATE TABLE product_images (
id UUID PRIMARY KEY,
product_id UUID REFERENCES products(id),
url VARCHAR(500) NOT NULL,
alt_text VARCHAR(255),
position INT DEFAULT 0
);
-- Blog Posts
CREATE TABLE posts (
id UUID PRIMARY KEY,
title VARCHAR(255) NOT NULL,
slug VARCHAR(255) UNIQUE NOT NULL,
content TEXT NOT NULL,
excerpt TEXT,
featured_image VARCHAR(500),
published BOOLEAN DEFAULT FALSE,
published_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW()
);
-- Orders (simplified)
CREATE TABLE orders (
id UUID PRIMARY KEY,
customer_email VARCHAR(255) NOT NULL,
customer_name VARCHAR(255),
shipping_address JSONB,
is_local_delivery BOOLEAN DEFAULT FALSE,
subtotal DECIMAL(10,2),
shipping DECIMAL(10,2),
total DECIMAL(10,2),
status ENUM('pending', 'paid', 'shipped', 'delivered') DEFAULT 'pending',
stripe_payment_id VARCHAR(255),
created_at TIMESTAMP DEFAULT NOW()
);
CREATE TABLE order_items (
id UUID PRIMARY KEY,
order_id UUID REFERENCES orders(id),
product_id UUID REFERENCES products(id),
quantity INT NOT NULL,
price_at_purchase DECIMAL(10,2) NOT NULL
);Correspondence Tag Categories
From Liber 777 and Complete Magicianβs Tables:
| Category | Examples | Use Case |
|---|---|---|
| Planet | Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn | Core filter |
| Element | Fire, Water, Air, Earth, Spirit | Elemental workings |
| Sephira | KetherβMalkuth | Qabalistic practice |
| Day | SundayβSaturday | Timing rituals |
| Color | Red, Blue, Black, White, Purple | Visual browsing |
| Metal | Gold, Silver, Iron, Copper, Tin, Lead, Mercury | Tool shopping |
| Number | 1-10, significant numbers | Numerology |
| Intent | Love, Protection, Banishing, Prosperity, Healing | Beginner-friendly |
| Zodiac | 12 signs | Astrological timing |
| Physical | Candle, Incense, Oil, Book, Tool, Herb, Stone | Basic categories |
Moon Phase Animation Concept
Page Load:
βββββββββββββββββββββββ
β β
β π β β Dark moon, centered
β β
β "Enter the Temple" β β Subtle text prompt
β β
βββββββββββββββββββββββ
On click/tap (or auto after 2s):
βββββββββββββββββββββββ
β β± β² β
ββ± π (waxing) β²β β Moon phases through
β β new β full
ββ² reveals page β± β β Content fades in
β β² β± β as moon "opens"
βββββββββββββββββββββββ
Result: Homepage revealed
- Moon settles into header as current phase indicator
- Smooth 1.5-2s animation
- Skip option for returning visitors (localStorage)
API Routes (Draft)
GET /api/products - List products (paginated, filtered)
GET /api/products/:slug - Single product
GET /api/products/featured - Featured items for carousel
GET /api/tags - All tags (grouped by category)
GET /api/tags/:category - Tags in category
GET /api/tags/:slug/products - Products with tag
GET /api/cart - Get cart (session-based)
POST /api/cart/add - Add to cart
POST /api/cart/remove - Remove from cart
POST /api/cart/build-ritual - Auto-build from tag selection
POST /api/checkout - Create Stripe session
POST /api/webhooks/stripe - Handle payment confirmation
GET /api/posts - Blog posts
GET /api/posts/:slug - Single post
GET /api/moon - Current moon phase (for header)
Local Delivery Logic
// KC Metro ZIP codes for free local delivery
const KC_METRO_ZIPS = [
// Missouri
'64101', '64102', /* ... Kansas City MO core */
'64110', '64111', '64112', '64113', /* ... Midtown/Plaza */
'64114', '64145', '64146', /* ... South KC */
// Kansas
'66101', '66102', '66103', /* ... KCK */
'66208', '66209', '66210', /* ... Overland Park */
// ... expand as needed
];
function getShippingCost(zip, subtotal) {
if (KC_METRO_ZIPS.includes(zip)) {
return 0; // Free local delivery
}
// Standard shipping tiers
if (subtotal >= 75) return 0; // Free shipping over $75
if (subtotal >= 35) return 5.99;
return 8.99;
}MVP Checklist
Phase 1: Foundation
- Next.js project setup
- PostgreSQL + Prisma schema
- Tailwind theme (grey/purple palette)
- Basic product model + admin seeding
Phase 2: Core Features
- Product listing with tag filters
- Product detail pages
- Tag-based browsing
- Shopping cart (Zustand)
- Stripe checkout integration
Phase 3: Polish
- Moon phase entrance animation
- Featured carousel
- Blog system
- Local delivery ZIP detection
- Mobile responsive pass
Phase 4: Content
- Photograph book inventory
- Import Azure Green catalog
- Tag all products with correspondences
- Write initial blog posts
- SEO optimization