Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

Commit 5ecf64d

Browse files
Replace Next.js API with static JSON on GitHub Pages
The SCF data is static and ~1.3MB total. Agents don't need server-side filtering for that. Replaced the Next.js project with a build script that pre-generates all JSON files into docs/ for GitHub Pages hosting. 1,451 control files, 33 family files, 15 crosswalk files, summary, llms.txt, and a landing page. No dependencies, no runtime, no cost.
1 parent 1828ef8 commit 5ecf64d

1,533 files changed

Lines changed: 179498 additions & 4140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,2 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.*
7-
.yarn/*
8-
!.yarn/patches
9-
!.yarn/plugins
10-
!.yarn/releases
11-
!.yarn/versions
12-
13-
# testing
14-
/coverage
15-
16-
# next.js
17-
/.next/
18-
/out/
19-
20-
# production
21-
/build
22-
23-
# misc
1+
node_modules
242
.DS_Store
25-
*.pem
26-
27-
# debug
28-
npm-debug.log*
29-
yarn-debug.log*
30-
yarn-error.log*
31-
.pnpm-debug.log*
32-
33-
# env files (can opt-in for committing if needed)
34-
.env*
35-
36-
# vercel
37-
.vercel
38-
39-
# typescript
40-
*.tsbuildinfo
41-
next-env.d.ts

‎AGENTS.md‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎CLAUDE.md‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎README.md‎

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,62 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# SCF API
22

3-
## Getting Started
3+
The [Secure Controls Framework](https://securecontrolsframework.com) is the best cross-framework control mapping out there. It's also trapped in spreadsheets. I use SCF as the backend for most of my control tooling, and I got tired of parsing `.xlsx` files every time I needed a lookup.
44

5-
First, run the development server:
5+
So I built this: the entire SCF v2025.4 served as static JSON files on GitHub Pages. 1,451 controls across 33 families, with bidirectional crosswalk mappings to 15 frameworks (NIST 800-53, CMMC, FedRAMP, ISO 27001, HIPAA, GDPR, PCI DSS, CCPA, NIS2, and the rest).
6+
7+
No server. No API keys. No rate limits. Just fetch the JSON files directly.
8+
9+
## For AI Agents
10+
11+
Hit `llms.txt` at the root of the site. It's a machine-readable index of every file path and what it contains. Your agent reads it once and knows how to navigate the entire dataset. That's the [llms.txt standard](https://llmstxt.org): agents self-discover what's available instead of you hand-wiring each call.
12+
13+
## Files
14+
15+
| Path | What it contains |
16+
|------|-----------------|
17+
| `api/summary.json` | Control counts, family breakdown, framework coverage, weight distribution |
18+
| `api/controls.json` | All 1,451 controls with crosswalk mappings to all 15 frameworks |
19+
| `api/controls/{ID}.json` | Single control (e.g., `GOV-01`, `CRY-05.3`) |
20+
| `api/families.json` | All 33 control families with counts |
21+
| `api/families/{CODE}.json` | Family detail with all its controls (e.g., `GOV`, `NET`) |
22+
| `api/crosswalks.json` | All 15 mapped frameworks with coverage stats |
23+
| `api/crosswalks/{FRAMEWORK}.json` | Full bidirectional crosswalk (e.g., `nist-800-53-r5`, `hipaa`) |
24+
| `llms.txt` | Machine-readable file index for agents |
25+
26+
## Examples
627

728
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
29+
# Fetch the full controls dataset
30+
curl https://ethanolivertroy.github.io/scf-api/api/controls.json
31+
32+
# Get a single control with all its crosswalk mappings
33+
curl https://ethanolivertroy.github.io/scf-api/api/controls/GOV-01.json
34+
35+
# Get the NIST 800-53 crosswalk (both directions)
36+
curl https://ethanolivertroy.github.io/scf-api/api/crosswalks/nist-800-53-r5.json
37+
38+
# Get all controls in the Network Security family
39+
curl https://ethanolivertroy.github.io/scf-api/api/families/NET.json
1540
```
1641

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
42+
## How it works
1843

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
44+
No server, no database. A build script reads the source SCF JSON files, enriches each control with crosswalk mappings from all 15 frameworks, and generates static JSON files into `docs/`. GitHub Pages serves them directly.
2045

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
46+
Total output is ~8.7MB across 1,500+ files. An agent grabs `api/controls.json` (the full dataset), loads it into context, and works with it locally. Sub-second fetches, zero infrastructure.
2247

23-
## Learn More
48+
## Rebuilding
2449

25-
To learn more about Next.js, take a look at the following resources:
50+
```bash
51+
node scripts/build.mjs
52+
```
2653

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
54+
Regenerates everything in `docs/`. Commit and push to update the live site.
2955

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
56+
## Note on CORS
3157

32-
## Deploy on Vercel
58+
GitHub Pages doesn't set CORS headers. CLI tools, MCP servers, and server-side code can fetch these files without issues. Browser-based JavaScript running on a different domain will get blocked. If you need browser access, deploy behind a proxy or use a CORS-friendly host.
3359

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
60+
## Data license
3561

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
62+
SCF data is from [securecontrolsframework.com](https://securecontrolsframework.com), licensed under CC BY-ND.

‎app/favicon.ico‎

-25.3 KB
Binary file not shown.

‎app/globals.css‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

‎app/layout.tsx‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎app/page.module.css‎

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)