React/TypeScript frontend for the SecPal platform.
- Node.js >= 20.0.0
- npm >= 10.0.0
- Git with GPG signing configured
cd ~/code/SecPal
git clone https://github.com/SecPal/frontend.git
cd frontendnpm install./scripts/setup-pre-commit.shnpm run devnpm run build# Run all tests
npm test
# Run tests in watch mode
npm run test:ui
# Generate coverage report
npm run test:coverage# Lint code
npm run lint
# Type checking
npm run typecheck
# Format code
npm run format
# Check formatting
npm run format:checkBefore every push, run the preflight script:
./scripts/preflight.shThis runs:
- β Prettier formatting check
- β Markdownlint
- β REUSE compliance
- β ESLint
- β TypeScript type checking
- β Vitest test suite
- β PR size validation (β€600 lines)
frontend/
βββ src/
β βββ components/ # React components
β βββ hooks/ # Custom hooks
β βββ pages/ # Page components
β βββ services/ # API services
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
β βββ App.tsx # Root component
β βββ main.tsx # Entry point
βββ public/ # Static assets
βββ tests/ # Test files
βββ .github/ # GitHub workflows and templates
βββ scripts/ # Build and utility scripts
βββ package.json # Dependencies and scripts
- Coverage target: 80%+ for new code, 100% for critical paths
- TDD mandatory: Write failing test first, implement, refactor
- Use
@testing-library/reactfor component testing - Mock API calls with MSW (Mock Service Worker)
- Test user-visible behavior, not implementation
- Secret scanning: Enabled with push protection
- Dependabot: Daily security updates (04:00 CET)
- SAST: CodeQL analysis on pull requests
- Never commit: API keys, passwords, tokens,
.envfiles
See SECURITY.md for reporting vulnerabilities.
See CONTRIBUTING.md for guidelines.
feature/- New featuresfix/- Bug fixesdocs/- Documentationrefactor/- Code refactoringtest/- Test additions/fixeschore/- Maintenancespike/- Exploration (no TDD required, cannot merge to main)
Follow Conventional Commits:
feat: add user authentication
fix: resolve memory leak in dashboard
docs: update API integration guide
test: add tests for login form
AGPL-3.0-or-later - See LICENSE for details.
This project is REUSE 3.3 compliant. All files contain SPDX license headers.
- Contracts - OpenAPI 3.1 specifications
- .github - Organization-wide settings and documentation
- API - Laravel backend (planned)
- Issues: GitHub Issues
- Security: See SECURITY.md
- Code of Conduct: CODE_OF_CONDUCT.md
Maintained by: SecPal Team Last Updated: October 2025