Skip to content

Shepherdca-stack/SET-SRE-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SET-SRE Web — Interactive SET Mathematics Hub

Public-facing React application for the Spectral Emergence Theory (SET) research program. Deployed at set.coreyshepherdofficial.com.


Local development

npm install
npm run dev        # http://localhost:5173
npm run build      # output → dist/
npm run preview    # serve the built dist/ locally

Requires Node.js 18+. KaTeX is loaded from the CDN — an internet connection is required for equation rendering in development.


Architecture

src/
  App.jsx                    # React Router route table
  index.jsx                  # createRoot entry point
  styles/
    variables.css            # Design tokens (exact match to WordPress theme)
    global.css               # Reset, typography, utility classes
  components/
    Layout/                  # Header (sticky, mobile drawer), Footer
    Dashboard/               # Overview page, MetricsDisplay, DriverEquation (KaTeX)
    Papers/                  # PaperTracker (filter tabs), PaperCard
    Derivations/             # DerivationExplorer, ParameterSlider (Recharts),
    │                        #   ObservableChart, ConvergenceMonitor
    Scoring/                 # ScoringViewer, ScoreDimensionCard
    Resources/               # RepoLinks, Glossary
  data/
    papers.json              # 13 papers — auto-updated by CI sync
    observables.json         # Derived observables — auto-updated by CI sync
    scores.json              # 16-dimension scoring — auto-updated by CI sync
scripts/
  export_data.py             # Reads SET-SRE repo (SQLite / JSON) → writes src/data/*.json
  requirements.txt           # Python deps (stdlib only — no install needed)
.github/workflows/
  sync-and-deploy.yml        # CI: clone SET-SRE → export → build → deploy

JSON data schemas

The React components import these files directly at build time. Do not rename fields.

papers.json — array of objects:

{
  "id":         "P1",
  "title":      "Benford's Law from Spectral Emergence",
  "venue":      "Annals of Mathematics Monthly",
  "venueShort": "AMM",
  "status":     "submitted",
  "keyResult":  "...",
  "preprint":   null
}

Valid status values: submitted · editorial · preparation · published · forthcoming

observables.json — array of objects:

{
  "id":         "alpha",
  "symbol":     "\\alpha",
  "name":       "Fine Structure Constant",
  "setDerived": "1/137.036",
  "setFormula": "\\text{spectral series expansion at }d=14.01",
  "observed":   "1/137.036",
  "unit":       "dimensionless",
  "accuracy":   "2 ppm",
  "notes":      "Zero new free parameters"
}

scores.json — top-level object:

{
  "dimensions": [{"id": "D1", "name": "Mathematical Rigor", "description": "..."}],
  "denominator": 48,
  "laws": [
    {
      "id":     "L001",
      "name":   "Fine Structure Constant Derivation",
      "scores": {"D1": 3, "D2": 3, "D3": 3, "D4": 3, "D5": 3, "D6": 3, "D7": 3, "D8": 2,
                 "D9": 3, "D10": 3, "D11": 3, "D12": 3, "D13": 2, "D14": 3, "D15": 2, "D16": 3},
      "total":  44,
      "notes":  "2 ppm precision, zero free parameters"
    }
  ]
}

Score keys must be exactly D1D16. Each value is an integer 0–3.


Auto-sync CI pipeline

The GitHub Actions workflow runs on every push to main, daily at 06:00 UTC, and on manual dispatch.

Steps:

  1. Checkout set-sre-web
  2. Clone private Shepherdca-stack/SET-SRE using PAT authentication
  3. Run scripts/export_data.py — reads SQLite DB or JSON metadata → writes src/data/*.json
  4. npm run builddist/
  5. Deploy to GitHub Pages or Hostinger FTP

Required secrets

Set these in GitHub → set-sre-web repo → Settings → Secrets and variables → Actions.

Secret Purpose Required for
SET_SRE_REPO_TOKEN PAT with Contents: Read on the private SET-SRE repo All runs
HOSTINGER_FTP_HOST FTP hostname from Hostinger control panel FTP deploys only
HOSTINGER_FTP_USER FTP username FTP deploys only
HOSTINGER_FTP_PASS FTP password FTP deploys only

Creating the PAT

  1. GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token
  2. Resource owner: Shepherdca-stack
  3. Repository access: Only select SET-SRE
  4. Permissions: Contents → Read-only (nothing else needed)
  5. Copy the token → save as secret SET_SRE_REPO_TOKEN in the set-sre-web repo

Triggering a manual sync

GitHub → Actions → Sync Data & DeployRun workflow → choose deploy target (ghpages or ftp).

Switching deploy targets

  • GitHub Pages (default): Enable Pages in repo Settings → Pages → Source: branch gh-pages. Every push to main deploys automatically.
  • Hostinger FTP: Trigger manually and select ftp, or change the if: condition in the workflow. Verify the server-dir path matches your Hostinger subdomain folder (e.g. /public_html/set/).

What happens when the database doesn't exist

export_data.py tries multiple file paths for the SQLite database. If it finds nothing, it falls back to the static JSON already committed in src/data/ and logs a WARNING. The build still succeeds — no broken CI from a missing DB.


Deploying to Hostinger (manual)

  1. npm run build
  2. Upload contents of dist/ to the subdomain root via FTP
  3. Add .htaccess for React Router support:
    Options -MultiViews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.html [QSA,L]

Updating paper status manually

  1. Edit src/data/papers.json — find the paper by id (P1–P13)
  2. Update status to one of: preparation · submitted · editorial · published · forthcoming
  3. Add "preprint": "https://arxiv.org/abs/..." when available (currently all null)
  4. Commit to main — the workflow rebuilds and deploys automatically

Design system

All tokens in src/styles/variables.css are identical to the WordPress shepherd-official theme. To change an accent color, update both files.

Key tokens: --color-gold: #c9a84c · --font-display: 'Cinzel', serif · --font-body: 'Lato', sans-serif · breakpoints 768px / 1200px


Technology stack

  • Vite 5 — build tool
  • React 18 — UI with hooks
  • React Router v6 — client-side routing
  • Recharts 2 — LineChart, BarChart, RadarChart
  • KaTeX 0.16.9 — LaTeX rendering (CDN)
  • CSS Modules — scoped component styles
  • CSS custom properties — design tokens (no Tailwind)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors