Skip to content

dtwaling/thnd.ai

Repository files navigation

⚡️ THND.ai ⚡️ Website Project README

This readme is the main user-facing documentation and AI assistant instructions. (Optimized using claude AI agent.)

Project Overview

THND.ai is the documentation website for THND, a utility token that grants access to NΞXUS (Omni TradeX), an AI-assisted cryptocurrency trading platform. Built with Astro and Starlight, deployed on Cloudflare Pages.

Site URL: https://thnd.ai


Tech Stack

Technology Purpose Version
Framework Static site generator with SSR support Astro 5.6.1
Theme Documentation framework Starlight 0.36.1
Styling Utility-first CSS framework Tailwind CSS 4.1.16
Deployment Edge hosting platform Cloudflare Pages
Image Processing Optimized image handling Sharp 0.34.2
Content Markdown/MDX with Zod validation Built-in
TypeScript Type safety Strict mode enabled

Key Dependencies

  • @astrojs/cloudflare (12.6.10) - Cloudflare adapter with compile-time image service
  • @astrojs/starlight (0.36.1) - Documentation theme
  • @astrojs/starlight-tailwind (4.0.1) - Tailwind integration for Starlight
  • @astrojs/sitemap (3.2.1) - Automatic sitemap generation
  • @astrojs/rss (4.0.11) - RSS feed generation
  • @tailwindcss/vite (4.1.16) - Tailwind Vite plugin
  • @tailwindcss/typography (0.5.19) - Typography plugin (dev)

Commands

All commands run from project root:

npm install          # Install dependencies
npm run dev          # Start dev server at localhost:4321
npm start            # Alias for npm run dev
npm run build        # Build production site to ./dist/
npm run preview      # Preview dev server (same as dev)
npm run astro        # Run Astro CLI commands

Project Structure

thnd.ai/
├── src/
│   ├── content/
│   │   └── docs/              # Main content - Starlight auto-routes .md/.mdx files
│   │       ├── index.mdx      # Homepage (reserved filename)
│   │       └── resources/     # Documentation pages
│   │           ├── faq.md     # FAQ page
│   │           └── litepaper.md  # Technical litepaper
│   ├── assets/
│   │   ├── img/               # Content images (8 files)
│   │   │   ├── ai-dreaming-*.png
│   │   │   ├── hotrods-*.png
│   │   │   └── scotch-on-the-blocks.jpg
│   │   └── logo/              # Brand assets (8 files)
│   │       ├── bolt-icon.png
│   │       ├── thnd-logo*.png (various versions)
│   │       └── thnd-cloud-logo*.png
│   ├── components/
│   │   ├── theme/
│   │   │   ├── ForceDarkTheme.astro  # Forces dark mode site-wide
│   │   │   └── EmptyComponent.astro  # Hides theme selector
│   │   ├── layouts/
│   │   │   └── defaultlayout.astro   # Default layout component
│   │   ├── Card.astro         # Card with icon, title, nested content
│   │   ├── CardGrid.astro     # 2-column responsive grid (supports stagger)
│   │   ├── TitleCard.astro    # Hero-style title card with optional logo
│   │   ├── Accordion.astro    # Collapsible sections
│   │   ├── ItemGrid.astro     # Grid layouts
│   │   ├── Icon.astro         # Icon component
│   │   ├── Icons.ts           # Custom SVG icon definitions
│   │   └── Prose.astro        # Typography wrapper
│   ├── styles/
│   │   └── custom.css         # CSS custom properties and theme overrides
│   ├── Layouts/
│   │   └── Layout.astro       # Base layout (stub)
│   ├── pages/
│   │   └── _placeholder.txt   # Reserved for special Astro pages
│   ├── .obsidian/             # Obsidian MD app config for non-developers
│   │   ├── plugins/
│   │   │   ├── edit-mdx/      # MDX compatibility plugin
│   │   │   └── obsidian-git/  # Git integration plugin
│   │   └── *.json             # Obsidian configuration files
│   └── content.config.ts      # Content collection schemas (Zod validation)
├── public/
│   └── favicon/               # Favicon assets
├── .astro/                    # Astro build cache and type definitions
├── .git/                      # Git repository
├── .idea/                     # JetBrains IDE configuration
├── .vscode/                   # VSCode configuration
├── .wrangler/                 # Wrangler/Cloudflare build cache
├── astro.config.mjs           # Astro configuration
├── tsconfig.json              # TypeScript configuration (strict mode)
├── package.json               # Project dependencies
├── README.md                  # This file - User-facing documentation and AI assistant instructions
├── backlog.md                 # Project backlog - features and issues tracking
└── bl-item-templates.md       # Backlog item templates for standardized entries

Configuration Details

Astro Config (astro.config.mjs)

  • Site URL: https://thnd.ai
  • Adapter: Cloudflare with compile-time image service
  • Integrations:
    • Starlight (documentation theme)
    • MDX (enhanced Markdown)
    • Sitemap (automatic generation)
  • Theme Overrides:
    • ThemeProviderForceDarkTheme.astro (enforces dark mode)
    • ThemeSelectEmptyComponent.astro (hides theme toggle)
  • Custom CSS: ./src/styles/custom.css
  • Vite Config:
    • Build minification: disabled
    • SSR externals: Node.js built-ins (buffer, fs/promises, url, path, crypto)

Starlight Config

Content Schema (content.config.ts)

Two collections defined with Zod validation:

  1. docs (Starlight loader):
  • Optional frontmatter fields: title (max 60 chars), description (max 250 chars)
  • Optional metadata: cover, coverAlt, coverImage, emoji, pubDate, tags (max 5)
  1. assets (imageAssets):
  • Required: title (10-60 chars), description (30-250 chars), cover, coverAlt, pubDate
  • Optional: coverImage, emoji, lastUpdate, tags (1-5)
  • Validation: Must have either coverImage OR emoji

Styling (custom.css)

  • Dark mode only (light mode commented out)
  • Fonts:
    • Sans: 'Atkinson Hyperlegible'
    • Mono: 'IBM Plex Mono'
  • Color scheme: Indigo accent, Zinc grays
  • Custom variables:
    • Starlight color overrides (accent, text, grays)
    • Card styling (borders, backgrounds, icon sizes)
    • Logo theme variables
  • Tailwind layer: .card base class defined

TypeScript

  • Extends astro/tsconfigs/strict
  • Includes: .astro/types.d.ts, all project files
  • Excludes: dist/

Content Authoring

File-Based Routing

Starlight automatically generates routes from files in src/content/docs/:

Images

  • Store in src/assets/img/ or src/assets/logo/
  • Use relative paths in Markdown:
    ![Alt text](../../../assets/img/example.png)

Obsidian Integration

Non-developers can use Obsidian to edit content:

  • Open src/ directory as vault
  • Plugins included:
    • edit-mdx - MDX file support
    • obsidian-git - Git version control

Development Workflow

Local Development

  1. npm install - Install dependencies
  2. npm run dev - Start dev server at http://localhost:4321
  3. Edit content in src/content/docs/
  4. Changes hot-reload automatically

Production Build

  1. npm run build - Generates static site to ./dist/
  2. Deploy ./dist/ to Cloudflare Pages

Git Workflow

  • Current branch: ui-tweaks
  • Main branch: master (use for PRs)
  • Recent work: Tailwind migration, dark mode implementation, pre-launch checks

Component Reference

Custom Components

Component Purpose Props
Card.astro Content card with icon/title icon, title, slot
CardGrid.astro 2-column responsive grid stagger support
TitleCard.astro Hero-style title card logo optional
Accordion.astro Collapsible sections title, slot
ItemGrid.astro Generic grid layout -
Icon.astro SVG icon display name
Prose.astro Typography wrapper slot

Theme Components

  • ForceDarkTheme.astro - Enforces dark mode (overrides Starlight ThemeProvider)
  • EmptyComponent.astro - Hides theme selector (overrides Starlight ThemeSelect)

Important Guidelines

File Creation Policy

  • DO: Edit existing files whenever possible
  • DON'T: Create new files unless absolutely necessary
  • NEVER: Proactively create documentation (*.md) or README files unless explicitly requested

Content Guidelines

  • Homepage must remain index.mdx
  • Use folders for logical grouping (e.g., resources/)
  • Follow Zod schema validation (see content.config.ts)
  • Keep titles ≤60 characters, descriptions ≤250 characters

Styling Guidelines

  • Use Tailwind utilities via @tailwindcss/vite
  • Custom styles in custom.css using CSS variables
  • Site is dark mode only - no light mode support

Project Management

Backlog System

The project uses a structured backlog system for tracking features, enhancements, and issues:

Files:

  • backlog.md - Main backlog document tracking all features and issues
  • bl-item-templates.md - Standardized templates for creating backlog entries

Backlog Structure:

  • 🎯 Active Sprint - Items currently being worked on
  • 📋 Ready for Development - Prioritized items ready to start
  • 🔮 Feature Backlog - New features and enhancements
  • 🐛 Issue Backlog - Bugs and defects
  • 📦 Completed Items - Implemented and deployed
  • 🚫 Cancelled Items - Will not be implemented

Item Types:

  1. Feature Items (FEATURE-XXX):
  • User story format (As a...I want...So that...)
  • Requirements checklist
  • Use case description
  • Priority: Low | Medium | High | Critical
  • Effort: Small | Medium | Large | XLarge
  • Dependencies and notes
  1. Issue/Bug Items (ISSUE-XXX):
  • Issue description and area affected
  • Expected vs actual behavior
  • Steps to reproduce
  • Environment details (browser, device, OS)
  • Severity and priority levels
  • Workaround information

Workflow:

  1. Review templates in bl-item-templates.md
  2. Add new items to backlog.md using appropriate template
  3. Assign sequential identifiers (FEATURE-XXX or ISSUE-XXX)
  4. When ready to work, create GitHub issue with same identifier
  5. Update item status as work progresses
  6. Move completed items to "Completed Items" section

Current Backlog Highlights:

  • 5 Features: Header/footer templates, Tailwind enhancement, Markdoc integration, RSS feed, search enhancement
  • 2 Issues: Theme selector validation, build minification disabled

See backlog.md for complete list and details.


External Resources


Last Updated: 2026-01-11

About

thnd.ai website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published