@@ -67,9 +67,29 @@ ColorArchive/
6767│ ├── compare/ # /compare/ — side-by-side two-color comparison tool
6868│ ├── tints/ # /tints/ — tints & shades generator (11-step tonal scale, CSS/Tailwind/Sass/JSON export)
6969│ ├── mixer/ # /mixer/ — Color Mixer (RGB/HSL/OKLCH interpolation, 11-step blend, CSS vars/JSON/color-mix() export)
70- │ └── combinations/ # /combinations/ — Color Combinations Library (30+ curated 2-5 color combos, filter by harmony type)
71- │ └── tokens/ # /tokens/ — Design Token Generator (primary/neutral/semantic scales, CSS/Tailwind/SCSS/JSON export)
72- │ └── packs/quiz/ # /packs/quiz/ — interactive pack recommendation quiz
70+ │ ├── combinations/ # /combinations/ — Color Combinations Library
71+ │ ├── tokens/ # /tokens/ — Design Token Generator
72+ │ ├── packs/quiz/ # /packs/quiz/ — interactive pack recommendation quiz
73+ │ ├── brand-generator/ # /brand-generator/ — AI brand palette generator
74+ │ ├── mood-palette/ # /mood-palette/ — AI mood palette generator
75+ │ ├── color-quiz/ # /color-quiz/ — Color personality quiz
76+ │ ├── image-palette/ # /image-palette/ — Image color extractor
77+ │ ├── identify/ # /identify/ — Color finder (camera/image/eyedropper)
78+ │ ├── preview/ # /preview/ — Palette UI preview (5 scenes + dark mode)
79+ │ ├── mesh-gradient/ # /mesh-gradient/ — Mesh gradient generator
80+ │ ├── stories/ # /stories/ — Color stories (cultural/psychological)
81+ │ ├── today/ # /today/ — Color of the Day
82+ │ ├── colorblind/ # /colorblind/ — Color blindness simulator
83+ │ ├── wcag-audit/ # /wcag-audit/ — Full WCAG audit matrix
84+ │ ├── brand/ # /brand/ — Brand palette system builder
85+ │ ├── tools/ # /tools/ — All tools listing page
86+ │ ├── api-docs/ # /api-docs/ — Public API documentation
87+ │ ├── pro/ # /pro/ — Pro subscription pricing page
88+ │ ├── projects/ # /projects/ — Cloud project library
89+ │ ├── projects/shared/[shareId]/ # /projects/shared/:id — Public shared project view
90+ │ ├── account/ # /account/ — User account dashboard
91+ │ ├── analyze/ # /analyze/ — Brand color analyzer (URL extraction)
92+ │ ├── admin/tiktok/ # /admin/tiktok/ — TikTok publishing admin
7393│
7494├── src/
7595│ ├── components/ # "use client" UI components (one per page + shared)
@@ -145,13 +165,38 @@ ColorArchive/
145165│ │ ├── copy-upsell-toast.tsx # Subtle upsell toast after 5th copy
146166│ │ ├── pack-quiz-page.tsx # Interactive pack recommendation quiz
147167│ │ ├── back-to-top.tsx # Floating back-to-top button
148- │ │ ├── colorblind-page.tsx # Color blindness simulator (4 deficiency types, palette mode)
149- │ │ └── error-boundary.tsx # Global error boundary component
168+ │ │ ├── colorblind-page.tsx # Color blindness simulator
169+ │ │ ├── error-boundary.tsx # Global error boundary component
170+ │ │ ├── brand-generator-page.tsx # AI brand palette generator
171+ │ │ ├── mood-palette-page.tsx # AI mood palette generator
172+ │ │ ├── color-quiz-page.tsx # Color personality quiz
173+ │ │ ├── image-palette-page.tsx # Image color extractor (k-means)
174+ │ │ ├── color-finder-page.tsx # Color finder (camera/image/eyedropper)
175+ │ │ ├── palette-preview-page.tsx # Palette UI preview (5 scenes + dark mode)
176+ │ │ ├── mesh-gradient-page.tsx # Mesh gradient generator
177+ │ │ ├── color-stories-page.tsx # Color stories page
178+ │ │ ├── color-of-day-page.tsx # Color of the Day
179+ │ │ ├── wcag-audit-page.tsx # WCAG audit matrix
180+ │ │ ├── token-generator-page.tsx # Design token generator
181+ │ │ ├── tools-page.tsx # All tools listing
182+ │ │ ├── api-docs-page.tsx # API documentation
183+ │ │ ├── pro-page.tsx # Pro pricing page
184+ │ │ ├── pro-gate.tsx # Export gating component (Free: 1/day, Pro: unlimited)
185+ │ │ ├── upgrade-modal.tsx # Pro upgrade modal + useUpgradeModal hook
186+ │ │ ├── projects-page.tsx # Cloud projects list
187+ │ │ ├── shared-project-page.tsx # Public shared project view
188+ │ │ ├── save-to-project.tsx # "Save to Projects" button (used across 8+ pages)
189+ │ │ ├── account-page.tsx # Account dashboard (tier, usage, referral)
190+ │ │ ├── palette-critique-panel.tsx # AI design critique panel
191+ │ │ ├── url-analyzer-page.tsx # Brand color analyzer (URL extraction)
192+ │ │ ├── referral-card.tsx # Referral link + credits display
193+ │ │ └── ai-usage-badge.tsx # AI usage counter badge
150194│ │
151195│ ├── data/
152- │ │ ├── colors.ts # Algorithmic generation of all 2016 colors
153- │ │ │ # (hue roots × lightness bands × chroma bands)
154- │ │ └── newsletter-issues.json # 130 newsletter issues (Issue 001–129+)
196+ │ │ ├── colors.ts # Algorithmic generation of 3,066 colors
197+ │ │ │ # (36 hues × 14 lightness × 6 chroma + 3 neutral groups × 14)
198+ │ │ ├── color-stories.json # Color stories (cultural/psychological content)
199+ │ │ └── newsletter-issues.json # 130+ newsletter issues
155200│ │
156201│ ├── lib/
157202│ │ ├── color-utils.ts # HSL↔RGB↔HEX, family classification,
@@ -167,7 +212,13 @@ ColorArchive/
167212│ │ ├── favorites.ts # localStorage favorites + subscriptions
168213│ │ ├── recent-colors.ts # localStorage recent history
169214│ │ ├── pinterest.ts # Pinterest OAuth + API proxy helpers
170- │ │ ├── checkout-config.ts # Lemon Squeezy checkout URLs
215+ │ │ ├── checkout-config.ts # Lemon Squeezy checkout URLs + Pro subscription config
216+ │ │ ├── auth-client.ts # Client API: session, projects, usage, referral, types
217+ │ │ ├── brand-palette.ts # Single-hex → 11-step design system + semantic colors
218+ │ │ ├── color-relationships.ts # Color relationships (analogous, complementary, triadic, tonal)
219+ │ │ ├── color-contrast.ts # WCAG contrast ratio + relative luminance
220+ │ │ ├── color-of-day.ts # Deterministic daily color selection
221+ │ │ ├── license-tiers.ts # License tier definitions
171222│ │ ├── color-family-pages.ts # Color family page slug/metadata
172223│ │ ├── colorblind.ts # Viénot (1999) color blindness simulation matrices
173224│ │ ├── combinations.ts # 30+ curated color combinations (complementary, analogous, triadic, monochromatic, neutral+accent)
@@ -178,28 +229,32 @@ ColorArchive/
178229│
179230├── server/ # Express backend — DO Droplet
180231│ ├── index.js # Entry point, routes registration
181- │ ├── email.js # Resend email functions:
182- │ │ # sendFreePackEmail (Day-0)
183- │ │ # sendFollowUp3DayEmail
184- │ │ # sendFollowUp7DayEmail
185- │ │ # sendFollowUp14DayEmail
186- │ │ # sendWaitlistConfirmationEmail
187- │ │ # sendOrderConfirmationEmail
188- │ │ # sendMagicLinkEmail
189- │ ├── email-scheduler.js # Hourly cron: Day-3/7/14 follow-ups + A/B variants
190- │ ├── db.js # SQLite setup (subscribers, orders, sessions)
191- │ ├── auth.js # Magic link auth logic
232+ │ ├── email.js # Resend email functions (11 types incl. Pro upsell)
233+ │ ├── email-scheduler.js # Hourly cron: Day-3/7/14/21/30 follow-ups + COTD + A/B
234+ │ ├── db.js # SQLite setup (subscribers, orders, sessions, users,
235+ │ │ # projects, ai_usage, user_preferences)
236+ │ ├── auth.js # Magic link + Google OAuth auth, tier management
192237│ ├── catalog.js # Pack catalog data
238+ │ ├── colors.js # Server-side 3,066 color generation (mirrors client)
239+ │ ├── ai-rate-limit.js # AI rate limiting middleware (anon 3/day, free 10/day,
240+ │ │ # pro unlimited, credit consumption)
241+ │ ├── api-rate-limit.js # API rate limiting middleware (60/1k/10k per hour)
242+ │ ├── ig-scheduler.js # Instagram auto-posting scheduler
243+ │ ├── ig-image-generator.js # Instagram image generation
193244│ └── routes/
194- │ ├── subscribe.js # POST /subscribe — email capture
245+ │ ├── subscribe.js # POST /subscribe — email capture + referral tracking
195246│ ├── webhook.js # POST /webhook — Lemon Squeezy events
196- │ ├── auth.js # POST /auth/request, GET /auth/verify
197- │ ├── me.js # GET /me — session user info
247+ │ ├── auth.js # Magic link + Google OAuth + session (with tier)
248+ │ ├── me.js # GET /me, /me/usage, /me/referral, /me/api-key,
249+ │ │ # /me/preferences, /me/orders
250+ │ ├── projects.js # CRUD /projects + GET /projects/shared/:id
251+ │ ├── ai.js # POST /ai/brand-palette, /ai/mood-palette,
252+ │ │ # /ai/name-color, /ai/critique, /ai/analyze-url
198253│ ├── admin.js # GET /admin/* — orders dashboard
199254│ ├── analytics.js # GET /analytics/* — internal stats
200255│ ├── pageviews.js # POST /pageviews — page tracking
201256│ ├── og.js # GET /og — OG image generation
202- │ └── instagram.js # GET/POST /instagram/* — Instagram API (OAuth, publish, media feed)
257+ │ └── instagram.js # Instagram API (OAuth, publish, media feed)
203258│
204259├── public/
205260│ └── downloads/ # Pack download files (.zip, .swatches)
@@ -236,7 +291,7 @@ app/colors/[slug]/page.tsx → src/components/color-detail-page.tsx
236291```
237292
238293### Static Generation
239- ` generateStaticParams() ` in dynamic routes pre-renders all pages at build time. 2016 color pages + family/collection/pack/guide/note pages = ~ 2134 total pages.
294+ ` generateStaticParams() ` in dynamic routes pre-renders all pages at build time. 3,066 color pages + family/collection/pack/guide/note pages = ~ 3,200+ total pages.
240295
241296### localStorage Persistence
242297Three independent stores, each with a subscription pattern for cross-component reactivity:
@@ -253,20 +308,34 @@ Triggered by `email-scheduler.js` running hourly on the DO droplet:
253308- ** Day 3** — How to use CSS tokens + Dark Mode UI Kit upsell
254309- ** Day 7** — Full catalog overview (all 7 packs)
255310- ** Day 14** — 10% discount code ` FIRSTPACK `
311+ - ** Day 21** — Creative inspiration email
312+ - ** Day 30** — Final conversion email
313+ - ** On AI limit hit** — Pro upsell email (max 1/day per user)
314+ - ** Daily** — Color of the Day (COTD) for opted-in subscribers
256315
257- Each follow-up uses A/B subject-line variants (deterministic hash on email). Variant assignment stored in ` ab_variant ` column; per-stage variant tracked in ` follow_up_Xd_variant ` . Results available via ` GET /analytics/ab-results ` .
316+ Each follow-up uses A/B subject-line variants (deterministic hash on email). Variant assignment stored in ` ab_variant ` column; per-stage variant tracked in ` follow_up_Xd_variant ` .
317+
318+ ### Pro Subscription & Monetization
319+ - ** Tier system** : anonymous (3 AI/day) → free (10 AI/day, 3 projects) → Pro (unlimited)
320+ - ** ProGate** : Export gating on token generator, WCAG audit, image palette, palette builder, preview
321+ - ** Referral credits** : +5 AI credits per referred signup, credits consumed before tier limits
322+ - ** API tiering** : 60/hr (anonymous) → 1,000/hr (free key) → 10,000/hr (Pro key)
323+ - ** Upgrade triggers** : 429 rate limit → modal + email; ProGate lock → /pro link
258324
259325---
260326
261- ## Content Counts (as of 2026-03-23 )
327+ ## Content Counts (as of 2026-03-24 )
262328
263329| Content | Count |
264330| ---------| -------|
265- | Colors | 2016 |
331+ | Colors | 3,066 (3,024 chromatic + 42 neutral grays) |
332+ | Saturation bands | 6 (Faint 10%, Muted 18%, Soft 34%, Clear 54%, Vivid 74%, Pure 92%) |
333+ | Neutral groups | 3 (Warm Gray, Cool Gray, True Gray) |
266334| Collections | 68 |
267- | Palette packs | 7 |
335+ | Palette packs | 7 (USD $9–$129) |
268336| SEO guides | 113 |
269337| Newsletter issues | 166 |
270338| Color families | 9 |
271- | Tool pages | 15 (converter, contrast, spectrum, word-to-color, surprise, palette-generator, gradient, harmonies, compare, quiz, colorblind, tints, mixer, combinations) |
272- | i18n keys | ~ 710+ (EN/ZH) |
339+ | Tool pages | 22+ (converter, contrast, spectrum, word-to-color, palette-generator, gradient, harmonies, compare, colorblind, tints, mixer, combinations, brand-generator, mood-palette, color-quiz, image-palette, identify, preview, mesh-gradient, wcag-audit, tokens, analyze) |
340+ | AI endpoints | 5 (brand-palette, mood-palette, name-color, critique, analyze-url) |
341+ | i18n keys | ~ 750+ (EN/ZH) |
0 commit comments