Skip to content

SecPal/frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

SecPal Frontend

REUSE Compliance License Check Quality Gates

React/TypeScript frontend for the SecPal platform.

πŸ“‹ Prerequisites

  • Node.js >= 20.0.0
  • npm >= 10.0.0
  • Git with GPG signing configured

πŸš€ Getting Started

Clone Repository

cd ~/code/SecPal
git clone https://github.com/SecPal/frontend.git
cd frontend

Install Dependencies

npm install

Setup Pre-Commit Hooks

./scripts/setup-pre-commit.sh

πŸ› οΈ Development

Start Development Server

npm run dev

Build for Production

npm run build

Run Tests

# Run all tests
npm test

# Run tests in watch mode
npm run test:ui

# Generate coverage report
npm run test:coverage

Code Quality

# Lint code
npm run lint

# Type checking
npm run typecheck

# Format code
npm run format

# Check formatting
npm run format:check

Pre-Push Validation

Before every push, run the preflight script:

./scripts/preflight.sh

This runs:

  • βœ… Prettier formatting check
  • βœ… Markdownlint
  • βœ… REUSE compliance
  • βœ… ESLint
  • βœ… TypeScript type checking
  • βœ… Vitest test suite
  • βœ… PR size validation (≀600 lines)

πŸ“ Project Structure

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

πŸ§ͺ Testing Guidelines

  • Coverage target: 80%+ for new code, 100% for critical paths
  • TDD mandatory: Write failing test first, implement, refactor
  • Use @testing-library/react for component testing
  • Mock API calls with MSW (Mock Service Worker)
  • Test user-visible behavior, not implementation

πŸ”’ Security

  • 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, .env files

See SECURITY.md for reporting vulnerabilities.

πŸ“ Contributing

See CONTRIBUTING.md for guidelines.

Branch Naming Convention

  • feature/ - New features
  • fix/ - Bug fixes
  • docs/ - Documentation
  • refactor/ - Code refactoring
  • test/ - Test additions/fixes
  • chore/ - Maintenance
  • spike/ - Exploration (no TDD required, cannot merge to main)

Commit Messages

Follow Conventional Commits:

feat: add user authentication
fix: resolve memory leak in dashboard
docs: update API integration guide
test: add tests for login form

πŸ“œ License

AGPL-3.0-or-later - See LICENSE for details.

This project is REUSE 3.3 compliant. All files contain SPDX license headers.

πŸ”— Related Repositories

  • Contracts - OpenAPI 3.1 specifications
  • .github - Organization-wide settings and documentation
  • API - Laravel backend (planned)

πŸ“ž Support


Maintained by: SecPal Team Last Updated: October 2025

About

React/TypeScript frontend for SecPal platform

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •