diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..41c4874
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,73 @@
+name: Bug report
+description: Report a reproducible problem in the app, tests, or developer workflow.
+title: "bug: "
+labels:
+ - bug
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for filing a bug. Please include a clear reproduction so the issue can be triaged quickly.
+
+ Security vulnerabilities should not be reported here. Use the private reporting flow in SECURITY.md instead.
+ - type: checkboxes
+ id: checks
+ attributes:
+ label: Pre-flight checks
+ options:
+ - label: I searched existing issues and did not find a duplicate.
+ required: true
+ - label: This is not a security vulnerability or private disclosure.
+ required: true
+ - type: textarea
+ id: summary
+ attributes:
+ label: What happened?
+ description: Describe the bug and the actual behavior.
+ placeholder: Opening a story from the mobile swipe view causes...
+ validations:
+ required: true
+ - type: textarea
+ id: steps
+ attributes:
+ label: Steps to reproduce
+ description: Be precise enough that someone else can follow the same path.
+ placeholder: |
+ 1. Open ...
+ 2. Tap ...
+ 3. Scroll or swipe ...
+ 4. Observe ...
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected behavior
+ placeholder: The comment thread should remain visible after...
+ validations:
+ required: true
+ - type: input
+ id: route
+ attributes:
+ label: Affected page, route, or feed
+ description: "Examples: ask, best, item detail, user profile"
+ placeholder: best feed
+ - type: textarea
+ id: environment
+ attributes:
+ label: Environment
+ description: Include browser, OS, device, and whether this happened in the installed PWA if relevant.
+ placeholder: macOS 15, Safari 18, desktop
+ validations:
+ required: true
+ - type: textarea
+ id: evidence
+ attributes:
+ label: Screenshots, logs, or recordings
+ description: Paste any helpful screenshots, console errors, or failing test output.
+ render: shell
+ - type: textarea
+ id: additional
+ attributes:
+ label: Additional context
+ description: Add any extra detail that may help reproduce or narrow down the problem.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..b1af709
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Security vulnerability report
+ url: https://github.com/hackertok/hackertok.github.io/security/advisories/new
+ about: Report security issues privately instead of opening a public issue.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 0000000..449d3e0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,52 @@
+name: Feature request
+description: Propose a product, UX, accessibility, or developer-experience improvement.
+title: "feat: "
+labels:
+ - enhancement
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Please describe the problem first, then the proposed change. Concrete use cases are much easier to evaluate than abstract ideas.
+ - type: checkboxes
+ id: checks
+ attributes:
+ label: Pre-flight checks
+ options:
+ - label: I searched existing issues and did not find a duplicate.
+ required: true
+ - label: This request is scoped to this project and not a security report.
+ required: true
+ - type: textarea
+ id: problem
+ attributes:
+ label: Problem or opportunity
+ description: What user or contributor pain point does this solve?
+ placeholder: It is currently difficult to...
+ validations:
+ required: true
+ - type: textarea
+ id: proposal
+ attributes:
+ label: Proposed change
+ description: Describe the behavior, UI, or workflow you want.
+ placeholder: Add a setting that lets users...
+ validations:
+ required: true
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: Alternatives considered
+ description: List workarounds or other ideas you considered.
+ - type: textarea
+ id: context
+ attributes:
+ label: Additional context
+ description: Mockups, examples, links, or screenshots are helpful.
+ - type: checkboxes
+ id: contribution
+ attributes:
+ label: Contribution intent
+ options:
+ - label: I would be willing to open a pull request for this.
+ required: false
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..898748e
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,17 @@
+## Summary
+
+Describe the change and its user-visible impact.
+
+## Related issues
+
+Link any relevant issue or write `none`.
+
+## Screenshots or recordings
+
+Include before/after screenshots or a short recording for UI changes when helpful.
+
+## Checklist
+
+- [ ] Changes are focused and avoid unrelated refactors
+- [ ] Tests were added or updated when behavior changed
+- [ ] Accessibility and mobile behavior were considered
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1e27ab2..86d4d40 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,8 +39,9 @@ jobs:
LGPL-2.1-or-later, LGPL-3.0-only, LGPL-3.0-or-later,
AGPL-3.0-only, AGPL-3.0-or-later
- lint-and-build:
+ validate:
runs-on: ubuntu-latest
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -66,24 +67,8 @@ jobs:
- name: Build
run: npm run build
- e2e:
- runs-on: ubuntu-latest
- timeout-minutes: 60
- steps:
- - name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
- - name: Setup Node
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- with:
- node-version: '24'
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
- run: npx playwright test
+ run: npm run e2e
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..0da9c59
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,38 @@
+name: CodeQL
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+ schedule:
+ - cron: '30 1 * * 0'
+
+permissions: read-all
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ contents: read
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [javascript-typescript]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
+ with:
+ category: /language:${{ matrix.language }}
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
new file mode 100644
index 0000000..f57e4f6
--- /dev/null
+++ b/.github/workflows/scorecard.yml
@@ -0,0 +1,42 @@
+name: Scorecard
+
+on:
+ push:
+ branches: [main]
+ schedule:
+ - cron: '30 1 * * 6'
+
+permissions: read-all
+
+jobs:
+ analysis:
+ name: Scorecard analysis
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ id-token: write
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false
+
+ - name: Run Scorecard
+ uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ publish_results: true
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: SARIF file
+ path: results.sarif
+ retention-days: 5
+
+ - name: Upload to code-scanning
+ uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
+ with:
+ sarif_file: results.sarif
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9f2b1e8
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,86 @@
+# Contributing to HackerTok
+
+Thanks for helping improve HackerTok.
+
+This project is a React + TypeScript + Vite progressive web app for browsing
+Hacker News, with Vitest for unit tests and Playwright for end-to-end coverage.
+The fastest way to make a useful contribution is to keep changes focused,
+reproducible, and easy to review.
+
+## Before You Start
+
+- Search existing issues and pull requests before opening a new one.
+- For larger changes, open an issue first so the scope and direction can be
+ aligned before implementation.
+- Keep behavior changes small and isolated when possible.
+- Security issues must follow [SECURITY.md](SECURITY.md), not public issues.
+
+## Development Setup
+
+### Prerequisites
+
+- Node.js
+- npm
+
+### Install
+
+```bash
+npm ci
+```
+
+### Start the app
+
+```bash
+npm run dev
+```
+
+### Run tests locally
+
+```bash
+npm run typecheck
+npm run lint
+npm run test:run
+npm run build
+```
+
+If your change affects navigation, comments, theme behavior, responsive layout,
+or touch/swipe interactions, also run Playwright:
+
+```bash
+npx playwright install
+npm run e2e
+```
+
+## Contribution Guidelines
+
+- Prefer TypeScript-first changes and match the existing React component style.
+- Keep accessibility intact: keyboard support, focus behavior, semantics, and
+ readable states matter for this app.
+- Preserve mobile behavior. Swipe flows, viewport sizing, and responsive layout
+ are part of the product surface, not edge cases.
+- Reuse the existing Tailwind-based styling approach instead of adding a second
+ styling system.
+- Avoid adding dependencies unless they solve a clear problem that the current
+ stack cannot reasonably handle.
+- If you touch GitHub Actions, keep actions pinned to full commit SHAs.
+- If you render remote HTML or user-generated content, keep the existing
+ sanitization guarantees intact.
+
+## Testing Expectations
+
+- Add or update tests when behavior changes.
+- Prefer the narrowest test that proves the change.
+- Run the relevant local checks before opening a pull request.
+- For UI changes, include screenshots or a short recording when it helps review.
+
+## Pull Requests
+
+- Use a clear title and explain the user-visible impact.
+- Link the related issue when one exists.
+- Note the commands you ran locally.
+- Call out follow-up work or known limitations explicitly.
+
+## Licensing
+
+By contributing to this repository, you agree that your contributions will be
+licensed under the project's AGPL-3.0-only license.
\ No newline at end of file
diff --git a/README.md b/README.md
index 3d3e103..569c2fe 100644
--- a/README.md
+++ b/README.md
@@ -10,10 +10,13 @@