Skip to main content

πŸš€ Getting Started

Welcome to The Human Pattern Lab

The Human Pattern Lab is a living system for exploring human behavior, AI collaboration, and emergent patterns β€” built with care, curiosity, and the occasional raccoon in a lab coat.

Whether you’re:

  • exploring the ideas,
  • contributing content,
  • building features,
  • or integrating with the Lab’s data systems,

this guide will orient you quickly and safely.


Most visitors should begin with:

  • 🧭 Departments β€” understand how the Lab is organized
  • πŸ§ͺ API Reference β€” see the real data shape behind the systems
  • πŸ“ Lab Notes β€” read published work and in-progress drafts

If you’re here to build or run the Lab locally, continue below.


πŸ§ͺ Working With Lab Data (Quick Overview)​

The Lab exposes a read-only API for inspecting notes, drafts, and published material.

  • Base URL: https://api.thehumanpatternlab.com
  • Primary resource: Lab Notes

You can explore:

  • published vs draft notes
  • departmental ownership
  • summaries and rendered content

Full contracts live here:
β†’ API Reference β†’ Lab Notes API

(If you can β€œshow me the data,” you’re already doing it right.)


🧰 Prerequisites (Local Development)​

To run the Lab locally, your machine needs:

βœ” Node.js​

Recommended version: 20.19+

Check your version:

node -v

If you need to update, install nvm:

nvm install 20
nvm use 20

If you don’t have nvm installed:
https://github.com/nvm-sh/nvm


βœ” npm​

Bundled with Node.

Check with:

npm -v

πŸ“¦ Clone the Repository​

git clone https://github.com/<your-repo>/human-pattern-lab.git
cd human-pattern-lab

πŸ“ Install Dependencies​

npm install

This installs:

  • React
  • Vite
  • React Router
  • Tailwind CSS v4
  • TypeScript
  • Vitest
  • Lab mascot and data systems
  • Shared UI components

πŸ§ͺ Run the Development Server​

Start Vite:

npm run dev

Local dev URL:

http://localhost:5173

Open that in your browser to launch the Lab UI.


🧬 Project Structure (Quick Map)​

src/
components/ β†’ UI building blocks
pages/ β†’ Route-driven screens
data/ β†’ Lab members, departments, notes
router/ β†’ Routing configuration
styles/ β†’ Global Tailwind v4 styles
types/ β†’ Shared TypeScript models
assets/ β†’ Images, icons, mascots

Mascot lore lives in:

src/data/labteam.ts

(marked @status lore-critical)


πŸ›  Build for Production​

To create an optimized build:

npm run build

Output is written to:

/dist

Preview the production build:

npm run preview

πŸ§ͺ Running Tests​

The Lab uses Vitest with a JSDOM test environment.

Run tests:

npm run test

Watch mode:

npm run test:watch

🌌 Metadata & File Headers​

Most major files include:

  • A cosmic metadata banner
  • JSDoc authorship
  • @lab-unit ownership
  • @status maturity indicators

Additional docs:

  • docs/code-status.md
  • docs/lab-units.md (coming soon)

πŸ’‘ Troubleshooting​

Tailwind styles not loading​

Ensure this import exists at the top of src/main.tsx:

import '@/index.css';

Node version mismatch​

Use Node 20.19+

Routes misbehaving​

Check all paths in:

src/router/routes.tsx

React Router is strict about nesting and relative paths.


πŸŽ‰ You’re Oriented​

You now know:

  • how the Lab is structured
  • where the data lives
  • how to run it locally
  • where to explore next

Welcome to The Human Pattern Lab.
May your systems stay legible and your raccoons remain caffeinated.