GitHunt
JA

Jakedoes1111/MetaMap

Explore and compare insights from astrology, numerology, human design, and other personal insight systemsโ€”all in one unified platform.

๐Ÿ—บ๏ธ MetaMap

Explore and compare insights from astrology, numerology, human design, and other personal insight systemsโ€”all in one unified platform.

MetaMap is a modern TypeScript + React web application (built with Next.js) that allows you to explore and compare insights from various self-model systemsโ€”including Western Astrology (WA/HA), Jyotish (JA), BaZi, Zi Wei Dou Shu, Feng Shui, Human Design, Gene Keys, Numerology, Tarot, I Ching, and moreโ€”all within one cohesive interface.

๐Ÿ“– What is a "Self-Model"?

A self-model is a system or framework that provides insights about an individual's personality, life patterns, timing, and potential based on specific inputs (such as birth data, names, or other personal information). These systems range from ancient traditions like astrology and numerology to modern approaches like Human Design and Gene Keys. Each system offers a unique lens through which to understand oneself, but they often operate in isolation. MetaMap bridges these systems by providing a unified platform to explore, compare, and visualize insights across multiple self-model frameworks.

๐Ÿค” What is MetaMap?

MetaMap solves a common problem: self-model systems (astrology, numerology, human design, etc.) each have their own data formats, tools, and interfaces, making it difficult to see connections and patterns across systems. MetaMap provides:

  • ๐Ÿ“Š Unified Data Schema: A normalized, Zod-validated schema that works across all systems
  • ๐Ÿ“ˆ Cross-System Visualization: Timeline, compass, network, and heatmap views to see patterns across systems
  • โš–๏ธ Configurable Weighting: Adjust the importance of different systems (e.g., Human Design 0.6, Gene Keys 0.5)
  • โœ… Verifiable Data: No invented resultsโ€”only verified calculator outputs or explicit UNKNOWN placeholders
  • ๐Ÿ”’ Privacy-First: Local data storage, privacy flags for paid sources, and no external data transmission

โœจ Key Features

  • โœ… Normalized Schema - Enforced via Zod with CSV/JSON import/export
  • ๐ŸŽจ Rich Visualizations - Timeline, compass, network, and heatmap views powered by D3 and CSS variable palettes
  • โš–๏ธ Adjustable Weights - Customize system importance (defaults: HD 0.6, GK 0.5, others 1.0) stored in localStorage
  • ๐ŸŽฒ RNG Tools - Built-in random number generators for I Ching, Tarot, and Geomancy using crypto.getRandomValues
  • ๐Ÿงฎ Live Calculator Demos - Demo providers for ephemeris, Chinese calendar, Zi Wei Dou Shu, Qi Men Dun Jia, Feng Shui, Human Design, and Gene Keys
  • ๐Ÿ”Œ Plugin Architecture - TypeScript interfaces ready for calculator integrations under src/calculators
  • โ™ฟ Accessibility - WCAG AA compliant with focus styles and prefers-reduced-motion support
  • ๐Ÿ“ฑ Responsive Design - Works seamlessly on desktop and mobile devices

๐Ÿงญ Project Docs


๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

  • ๐Ÿ“ฆ Node.js 20+ (or use Docker)
  • ๐Ÿ“ฆ npm or yarn

๐Ÿ’ป Installation

# Install dependencies
npm ci --ignore-scripts

# Optional: Install Playwright browsers for E2E tests
npx playwright install --with-deps

# Start development server
npm run dev

Open http://localhost:3010 in your browser. ๐ŸŒ

๐Ÿณ Docker

For a containerized environment:

docker compose up --build

This runs a Node 20 Alpine environment with the app available on port 3010.


๐Ÿ“œ Available Scripts

Command Description
npm run dev ๐Ÿš€ Start the Next.js development server (port 3010)
npm run build ๐Ÿ—๏ธ Create production build
npm run start โ–ถ๏ธ Start production server
npm run type-check ๐Ÿ”Ž Run TypeScript checks (tsc --noEmit)
npm run lint ๐Ÿ” Run ESLint (TypeScript + React + jsx-a11y)
npm run test ๐Ÿงช Run Vitest unit tests with jsdom
npm run test:ci ๐Ÿ“Š Run Vitest with coverage report
npm run test:e2e ๐ŸŽญ Run Playwright E2E tests (auto-starts app server)
npm run playwright:install ๐Ÿงฐ Install Playwright browsers/deps explicitly
npm run playwright:install:ci ๐Ÿงฐ Install Playwright + OS deps for CI runners
npm run format ๐Ÿ’… Format code with Prettier

๐Ÿ“Š Data Schema

MetaMap uses a normalized schema defined in src/schema.ts (Zod + TypeScript types). The CSV column order is:

person_id,birth_datetime_local,birth_timezone,system,subsystem,
source_tool,source_url_or_ref,data_point,verbatim_text,category,
subcategory,direction_cardinal,direction_degrees,timing_window_start,
timing_window_end,polarity,strength,confidence,weight_system,notes

๐Ÿ“ Schema Rules

  • ๐Ÿ“… Datetime: ISO 8601 format, closed intervals only (start <= end)
  • ๐Ÿงญ Direction: Degrees 0โ€“359 (auto-derives cardinal direction if missing)
  • ๐Ÿ’ช Strength: Integer range -2 to +2
  • ๐ŸŽฏ Confidence: Float between 0 and 1
  • โš–๏ธ Weight: Positive number (defaults: HD 0.6, GK 0.5, others 1.0)
  • ๐ŸŒ Timezone: Must be a valid IANA timezone database identifier

๐Ÿ”ฎ Supported Systems

  • โญ WA/HA - Western Astrology (Tropical/Tropical Houses)
  • ๐ŸŒ™ JA - Jyotish (Vedic Astrology)
  • ๐Ÿ›๏ธ BaZi - Four Pillars of Destiny
  • ๐ŸŸฃ ZWDS - Zi Wei Dou Shu (Purple Star)
  • ๐ŸŽด QMDJ - Qi Men Dun Jia
  • ๐Ÿ  FS - Feng Shui
  • ๐Ÿ‘ค HD - Human Design
  • ๐Ÿ”‘ GK - Gene Keys
  • ๐Ÿ”ข Numerology - Pythagorean & Chaldean
  • ๐Ÿƒ Tarot - Card readings
  • โ˜ฏ๏ธ I Ching - Hexagram readings
  • ๐Ÿ”ท Geomancy - Geomantic figures
  • โœ‹ Palmistry - Palm reading
  • ๐Ÿ‘๏ธ MianXiang - Face reading

๐Ÿ“ฅ Import & Export Data

๐Ÿ“ค Importing Data

  1. ๐Ÿ“„ Prepare a CSV or JSON file matching the schema header
  2. ๐Ÿ  Navigate to the overview page (/)
  3. ๐Ÿ“ฅ Use the Import data panel to:
    • โž• Append new rows to existing data
    • ๐Ÿ”„ Replace the entire dataset
  4. โœ… Zod validates every row and surfaces detailed error messages for invalid data

๐Ÿ“ฅ Exporting Data

  1. ๐Ÿ” Apply any filters you want to include
  2. ๐Ÿ’พ Click Export data to download:
    • ๐Ÿ“Š CSV format (maintains schema column order)
    • ๐Ÿ“‹ JSON format (preserves ISO timestamps)

๐Ÿ“ Sample Data

A sample CSV file is included at public/sample.csv with representative rows spanning natal astrology, Jyotiแนฃa, Feng Shui, BaZi, Qi Men Dun Jia, Human Design, Gene Keys, numerology, and Tarot (including a privacy:paid note example).


๐Ÿงฎ Calculator Providers & Plugins

MetaMap uses a plugin architecture for calculator integrations. Provider interfaces are defined in src/calculators/:

  • ๐ŸŒŸ EphemerisProvider - Swiss Ephemeris/JPL-compatible natal positions
  • ๐Ÿ“… ChineseCalendarProvider - BaZi pillars, luck cycles, sexagenary conversions
  • ๐ŸŸฃ ZWDSProvider - Zi Wei Dou Shu chart calculations
  • ๐ŸŽด QMDJProvider - Qi Men Dun Jia board generation
  • ๐Ÿ  FSProvider - Feng Shui Flying Stars & Eight Mansions
  • ๐Ÿ‘ค HDProvider - Human Design BodyGraph
  • ๐Ÿ”‘ GKProvider - Gene Keys sequences

๐ŸŽญ Demo Providers

The app includes demo providers for Ephemeris, Chinese Calendar, Zi Wei Dou Shu, Qi Men Dun Jia, Feng Shui, Human Design, and Gene Keys when NEXT_PUBLIC_ENABLE_DEMO_PROVIDERS=true (enabled by default in non-production). Register licensed providers by calling registerProvider in src/providers/bootstrap.ts or supplying your own bootstrap module. Production builds should disable the demo flag.

โš™๏ธ Environment Variables

Copy .env.example to .env.local and set values for your deployment:

  • APP_VERSION (required in production)
  • NEXT_PUBLIC_ENABLE_DEMO_PROVIDERS (default non-production: true, production: false)
  • SWISS_EPHEMERIS_ENABLED
  • SWISS_EPHEMERIS_ENGINE (swiss, moshier, jpl)
  • SWISS_EPHEMERIS_DATA_PATH, SWISS_EPHEMERIS_JPL_FILE
  • SWISS_EPHEMERIS_DEFAULT_HOUSE_SYSTEM, SWISS_EPHEMERIS_DEFAULT_AYANAMSA
  • SWISS_EPHEMERIS_LICENSE_KEY, SWISS_EPHEMERIS_LICENSE_FILE
  • API_MAX_BODY_BYTES (default 262144)
  • RATE_LIMIT_PROVIDER_WINDOW_MS (default 60000)
  • RATE_LIMIT_PROVIDER_MAX_REQUESTS (default 120)
  • ALLOWED_ORIGINS (comma-separated origin allowlist for API routes)
  • ERROR_WEBHOOK_URL (optional webhook endpoint for server-side exception forwarding)

Runtime config is validated at startup on server routes. Invalid production config fails fast with an explicit error.

๐Ÿ”Œ Integrating Your Own Providers

  1. ๐Ÿ“ Implement the provider interface from src/calculators/[system].ts
  2. ๐Ÿ“‹ Register your provider in src/providers/bootstrap.ts
  3. ๐Ÿ”„ Update the relevant system route in app/systems/**

โš ๏ธ Important: When a provider is absent, UI components display UNKNOWN placeholders. MetaMap never invents resultsโ€”only deterministic calculations (like numerology) are pre-filled.

๐Ÿ”’ Privacy & Licensing

  • ๐Ÿท๏ธ Mark paid or proprietary sources with notes:"privacy:paid" so users can filter them
  • ๐Ÿ“œ Review third-party calculator licenses before integration
  • ๐Ÿšซ Production builds should disable demo providers

โœ… Truth Standard & Privacy

MetaMap follows strict principles:

  • ๐Ÿšซ No Invention: UNKNOWN placeholders remain until verified calculators are connected
  • ๐Ÿณ๏ธ Variant Flags: Displayed when settings deviate from defaults (e.g., non-Lahiri ayanฤแนƒล›a)
  • ๐Ÿ’พ Local Storage: Palmistry and MianXiang uploads stay in the browser
  • ๐Ÿ”’ Privacy Flags: Support for marking paid/proprietary data sources
  • โš ๏ธ Disclaimers: "No medical, legal or financial advice. Cultural systems shown respectfully; outcomes are not certainties."

โค๏ธ Health Check

Runtime health is exposed at GET /api/health for container probes and uptime checks.

GitHub Actions includes a scheduled uptime workflow (.github/workflows/uptime-healthcheck.yml) that can monitor this endpoint and dispatch webhook alerts. Configure repository secrets:

  • UPTIME_HEALTH_URL (required)
  • UPTIME_ALERT_WEBHOOK (optional)

๐Ÿ“š References


๐Ÿงช Testing

๐Ÿ”ฌ Unit Tests

Vitest covers utilities, provider APIs, and core components:

npm run test

For CI environments:

npm ci --ignore-scripts
npx vitest run

๐ŸŽญ End-to-End Tests

Playwright E2E tests verify CSV import/export workflows and automatically start the app server through Playwright webServer:

# Install browser locally once
npm run playwright:install

# Run E2E
npm run test:e2e

For CI runners, use: npm run playwright:install:ci

๐Ÿ” CI Matrix

main and pull requests run GitHub Actions checks for:

  • Type-check
  • Lint
  • Unit tests with coverage (npm run test:ci)
  • Production build
  • Dependency audit (npm audit --omit=dev --audit-level=high)
  • Playwright E2E (after quality checks pass)

๐Ÿšš Deployment

Deployment config is committed in vercel.json and disables demo providers by default.

npm i -g vercel
vercel --prod

๐Ÿณ Docker (self-hosted target)

Production image uses Next.js standalone output, non-root runtime user, and /api/health healthchecks.

docker compose up --build -d

๐Ÿ“ Release Notes

See CHANGELOG.md for release entries. Current release version: 0.2.0.


๐Ÿ“ Project Structure

src/
  app/                    # Next.js App Router routes
    timeline/             # ๐Ÿ“… Timeline Gantt view
    compass/              # ๐Ÿงญ Direction compass view
    overlap/              # ๐Ÿ”— Network overlap view
    systems/              # ๐Ÿ”ฎ System dashboards (WA/HA, JA, BaZi, etc.)
    api/                  # ๐Ÿ”Œ API routes for providers
  components/             # ๐Ÿงฉ Reusable UI components & visualizations
  lib/                    # ๐Ÿ› ๏ธ Utilities (time, direction, CSV, numerology, filters, stats)
  calculators/            # ๐Ÿงฎ Provider interfaces (TypeScript stubs)
  providers/              # ๐Ÿ”Œ Provider implementations & registry
  store/                  # ๐Ÿ’พ Zustand state management with localStorage persistence
  schema.ts               # ๐Ÿ“Š Normalized data schema (Zod + TypeScript types)
  hooks/                  # ๐Ÿช React hooks (hydration, element size, etc.)
tests/                    # ๐Ÿงช Vitest unit tests + Playwright E2E tests
public/                   # ๐Ÿ“ Static assets (sample CSV, SVGs)

๐Ÿ› ๏ธ Technology Stack

  • โš›๏ธ Framework: Next.js 16 (App Router)
  • โš›๏ธ UI: React 19, TailwindCSS
  • ๐Ÿ’พ State: Zustand with localStorage persistence
  • โœ… Validation: Zod
  • ๐Ÿ“Š Visualization: D3.js
  • ๐Ÿ“… Date/Time: Luxon, @vvo/tzdb
  • ๐Ÿงช Testing: Vitest, Playwright, Testing Library
  • ๐Ÿ“˜ Type Safety: TypeScript (strict mode)

๐Ÿค Contributing

We welcome and appreciate contributions from everyone! ๐ŸŒŸ

Whether you're a seasoned developer, just starting out, or passionate about self-model systems, there are many ways to contribute to MetaMap. Your help makes this project better for everyone.

๐ŸŒˆ Ways to Contribute

  • ๐Ÿ’ป Code Contributions: Fix bugs, add features, improve performance, or enhance documentation
  • ๐Ÿ› Bug Reports: Found an issue? Let us know! Clear bug reports help us improve
  • ๐Ÿ’ก Feature Ideas: Have a great idea? We'd love to hear it
  • ๐Ÿ“ Documentation: Help improve docs, add examples, or clarify confusing sections
  • ๐Ÿงช Testing: Test new features, write tests, or improve test coverage
  • ๐ŸŽจ Design & UX: Improve the user interface, accessibility, or visual design
  • ๐ŸŒ Translations: Help make MetaMap accessible in more languages
  • ๐Ÿ“š Knowledge Sharing: Share your expertise about self-model systems

๐Ÿš€ Getting Started

  1. ๐Ÿ“– Familiarize yourself: Review the Implementation Plan to understand the roadmap and current priorities
  2. ๐Ÿด Fork & Clone: Fork the repository and clone it locally
  3. ๐ŸŒฟ Create a branch: Create a new branch for your contribution (git checkout -b feature/your-feature-name)
  4. ๐Ÿ’ป Make changes: Write clean, well-documented code
  5. โœ… Test your changes: Ensure npm run lint and npm run test pass
  6. ๐Ÿ“ค Submit a PR: Push your branch and open a pull request with a clear description

๐Ÿ“‹ Guidelines

  • ๐Ÿ’… Code Style: Follow the existing code style (Prettier + ESLint will help)
  • โœ… Testing: Add tests for new features and ensure existing tests pass
  • ๐Ÿ“ Documentation: Update relevant documentation when adding features
  • ๐Ÿ’ฌ Communication: Be respectful, inclusive, and constructive in all interactions
  • ๐ŸŽฏ Scope: Keep PRs focused on a single feature or fix when possible

โ“ Questions?

Not sure where to start? Have questions about the codebase? We're here to help! Feel free to:

  • Open an issue with your question
  • Check existing issues and discussions
  • Reach out through the project's communication channels

Thank you for considering contributing to MetaMap! ๐Ÿ™ Every contribution, no matter how small, makes a difference.


๐Ÿ“„ License

Released under the MIT License.

โš ๏ธ Note: Review third-party calculator licenses before integration. Some providers (Swiss Ephemeris, Human Design, Gene Keys) may require paid licenses. Always annotate privacy notes where required.


๐Ÿ’ฌ Support

For questions, issues, or contributions, please refer to the project's issue tracker or documentation.

Jakedoes1111/MetaMap | GitHunt