Skip to content

Commit 8e395d4

Browse files
committed
feat: initial app, data + CI and Pages workflows
0 parents  commit 8e395d4

File tree

11 files changed

+2301
-0
lines changed

11 files changed

+2301
-0
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Validate JSON dataset
17+
run: |
18+
jq . data/controls.json > /dev/null
19+
20+
- name: Basic HTML presence
21+
run: |
22+
test -f index.html
23+

.github/workflows/pages.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Upload artifact
23+
uses: actions/upload-pages-artifact@v3
24+
with:
25+
path: .
26+
27+
deploy:
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
needs: build
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Deploy to GitHub Pages
35+
id: deployment
36+
uses: actions/deploy-pages@v4
37+

AGENTS.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `index.html`: Single-page app entry point (tabs, layout).
5+
- `styles.css`: Theme and component styles (dark/light toggle).
6+
- `app.js`: Vanilla JS for routing, filters, dialog, study tools.
7+
- `data/controls.json`: Source of truth for CIS v8 controls (IDs, text, checklists).
8+
- `cis_v8_infographic.svg` and `cis_v8_infographic.html`: Infographic assets.
9+
- `CIS Controls V8/`: Upstream reference docs (PDF/XLSX). Do not edit.
10+
11+
## Build, Test, and Development Commands
12+
- Run locally (no build step):
13+
- `open index.html` (macOS) or double‑click in Explorer/Finder.
14+
- `python3 -m http.server 8000` then visit `http://localhost:8000`.
15+
- Lint (optional if you add tooling):
16+
- `npx eslint app.js` and `npx prettier -w .` (if configured).
17+
18+
## Coding Style & Naming Conventions
19+
- HTML/JS/CSS with 2‑space indentation; wrap at ~100 chars where sensible.
20+
- Filenames: kebab‑case (`cis_v8_infographic.svg`, `styles.css`).
21+
- JS: lowerCamelCase for variables/functions, PascalCase for classes, no one‑letter names.
22+
- Keep logic framework‑free, modular, and accessible (ARIA roles, semantic tags).
23+
24+
## Testing Guidelines
25+
- No automated tests configured. For manual QA:
26+
- Verify search/filter/sort in Controls tab.
27+
- Open a card: dialog shows Why/How/Metrics; add to Study.
28+
- Study tab: flashcard flip, checklist persistence (localStorage), reset.
29+
- Light/dark toggle persists across refresh.
30+
- If adding tests, place under `tests/` and prefer lightweight browser tests (Playwright). Document commands in this section.
31+
32+
## Commit & Pull Request Guidelines
33+
- Messages: imperative, concise. Prefer Conventional Commits, e.g., `feat: add IG filters`, `fix: dialog close on ESC`.
34+
- PRs: include summary, screenshots/GIFs for UI, and reference any issue IDs. Limit scope; avoid unrelated refactors.
35+
36+
## Security & Configuration Tips
37+
- Do not commit large binaries (e.g., the included video). Keep external assets out of `data/`.
38+
- Local file links to PDFs/XLSX rely on hosting from the project root or a static server.
39+
- Treat `data/controls.json` as the canonical content; validate JSON before commit.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Learn CIS Controls v8 – Interactive Web App
2+
3+
An interactive, self-contained web app to explore CIS Controls v8. It features search, filters (IG1–IG3 and NIST CSF ID/PR/DE/RS/RC), detailed control dialogs with examples and metrics, a Study mode (flashcards, checklists, scenarios), and a quiz system. A built-in Data Loader lets you import authoritative datasets via CSV for accuracy.
4+
5+
## Quick Start
6+
- Open `index.html` directly, or serve locally:
7+
- `python3 -m http.server 8000`http://localhost:8000
8+
- Resources → Data Loader to import CSV (columns: `control_num,control_title,sg_id,sg_title,igs,csf`).
9+
- Use the Controls tab to search and filter; Study tab for scenarios and quizzes.
10+
11+
## Project Structure
12+
- `index.html` – SPA entry, tabs, inline data fallback, PDF embed
13+
- `styles.css` – theme, responsive layout, accessible color tokens
14+
- `app.js` – routing, filters, dialogs, study flow, CSV loader
15+
- `data/controls.json` – canonical CIS v8 dataset (served via http)
16+
- `cis_v8_infographic.svg` – infographic used on Overview
17+
- `.github/workflows/ci.yml` – CI checks (JSON validation)
18+
- `.github/workflows/pages.yml` – Deploy static site to GitHub Pages
19+
20+
## Accuracy & Data
21+
- For exact safeguards/IG/CSF mappings, export from your official XLSX to CSV and import via the Data Loader.
22+
- Scenario mode in Study → Quiz will grade against exact scenario safeguards if provided.
23+
24+
## Development Notes
25+
- No build step required; pure HTML/CSS/JS.
26+
- Theme toggle persists; bookmarks and progress stored in localStorage.
27+
- To extend to other standards (e.g., NIST CSF 2.0, OWASP), provide a JSON/CSV aligned to the app schema.
28+
29+
## License
30+
No license specified by the author. Consult repository owner before reuse.
31+

0 commit comments

Comments
 (0)