Commit Graph

19 Commits

Author SHA1 Message Date
Benjamin
4d84224548 fix(ci): configure rate limits for E2E tests
Add rate limit environment variables to prevent 429 errors during E2E tests.
Use high limits (1000) matching compose.e2e.yml configuration to allow
rapid sequential requests during test execution.
2025-11-24 11:17:28 +01:00
Benjamin
84e7743429 fix(ci): use Node.js 20 for E2E tests to fix nyc compatibility
The @cypress/code-coverage package bundles nyc@15 which is incompatible
with Node.js 22+. Downgrade to Node.js 20 for E2E tests only to maintain
coverage collection while other workflows use Node.js 22.
2025-11-24 10:23:32 +01:00
Benjamin
ecd47fd8ec fix(ci): set locales and templates directories for E2E tests
Add ACKIFY_LOCALES_DIR and ACKIFY_TEMPLATES_DIR environment variables
to point to backend directories when running the binary from repo root.
2025-11-24 09:47:53 +01:00
Benjamin
f7a22efc3b fix(ci): create empty web/dist directory before backend tests
The go:embed directive in main.go requires web/dist to exist during compilation.
Backend tests don't need the actual frontend, just an empty directory to satisfy the embed directive.
2025-11-24 09:21:28 +01:00
Benjamin
a7891618c1 feat: comprehensive CI/CD refactoring with unified code coverage
Reorganize GitHub Actions workflows into reusable components and implement
complete code coverage tracking across backend, frontend, and E2E tests.

**CI/CD Improvements:**
- Split monolithic ci.yml into 6 specialized reusable workflows
- New workflows: test-backend, test-frontend, test-e2e, build-docker, security, coverage-report
- Orchestrated execution with proper dependencies and parallel jobs
- Codecov integration with multi-flag coverage (backend/frontend/e2e)

**Frontend Testing:**
- Add Vitest for unit testing with coverage-v8 provider
- Create test setup with window mocks for Ackify globals
- Add 34 unit tests for titleExtractor, referenceDetector, and http utils
- Configure Istanbul instrumentation for E2E coverage collection
- Integrate @cypress/code-coverage for E2E test coverage

**Test Infrastructure:**
- Create run-tests-suite.sh for local comprehensive test execution
- Proper Docker Compose orchestration for integration and E2E tests
- Automatic cleanup handlers with trap for test environments
- Coverage summary aggregation across all test types

**Bug Fixes:**
- Fix backend config tests after OAuth/MagicLink validation changes
- Update tests from panic expectations to error checking
- Ensure OAUTH_COOKIE_SECRET is properly configured in tests

**Configuration:**
- Add .codecov.yml for coverage reporting with flags
- Add .nycrc.json for E2E LCOV generation
- Update .gitignore for test artifacts and coverage reports
- Configure Vite for test environment and code instrumentation
2025-11-23 23:36:02 +01:00
Benjamin
a5c376bae5 fix(ci): build frontend before running go vet
Add Node.js setup and frontend build steps before Go verification
to ensure web/dist directory exists for go:embed directive.
2025-11-06 14:09:40 +01:00
Benjamin
264f3d40d5 fix(e2e): copy webapp/dist to backend embed location before build
The Go binary embeds static files from backend/cmd/community/web/dist
via go:embed directive. The e2e-tests workflow was building the frontend
in webapp/dist but not copying it to the embed location before compiling,
resulting in an empty app (no Vue frontend loaded).

This commit adds the missing copy step, matching the Dockerfile build process.
2025-11-05 21:17:04 +01:00
Benjamin
bba992102b fix: copy locales and templates for e2e-tests GitHub Actions workflow
The e2e-tests workflow was failing because the application couldn't find
the locales/en.json and templates files. These files are in backend/locales
and backend/templates, but the standalone binary expects them at the root.

This commit adds a step to copy these directories before starting the server.
2025-11-05 21:02:26 +01:00
Benjamin
c88508897f fix: github actions tests runs 2025-11-05 20:43:13 +01:00
Benjamin
b45d332c26 fix: migrations path in e2e-tests.yml workflow 2025-11-05 17:51:55 +01:00
Benjamin
32b469f04e feat: add magic link authentication
- Now can activate OIDC and/or MagicLink for user authentication.
- Add page to choose authentication method (if only OIDC is enabled, auto redirecting to login screen)
2025-11-05 15:01:23 +01:00
Benjamin
9ad267a704 feat(ci): fix push only release to latest tag on dockerhub 2025-10-27 19:20:59 +01:00
Benjamin
c5e41e9e93 fix: split unit and integration coverage 2025-10-26 18:47:54 +01:00
Benjamin
e95185f9c7 feat: migrate to Vue.js SPA with API-first architecture
Major refactoring to modernize the application architecture:

Backend changes:
- Restructure API with v1 versioning and modular handlers
- Add comprehensive OpenAPI specification
- Implement RESTful endpoints for documents, signatures, admin
- Add checksum verification system for document integrity
- Add server-side runtime injection of ACKIFY_BASE_URL and meta tags
- Generate dynamic Open Graph/Twitter Card meta tags for unfurling
- Remove legacy HTML template handlers
- Isolate backend source on dedicated folder
- Improve tests suite

Frontend changes:
- Migrate from Go templates to Vue.js 3 SPA with TypeScript
- Add Tailwind CSS with shadcn/vue components
- Implement i18n support (fr, en, es, de, it)
- Add admin dashboard for document and signer management
- Add signature tracking with file checksum verification
- Add embed page with sign button linking to main app
- Implement dark mode and accessibility features
- Auto load file to compute checksum

Infrastructure:
- Update Dockerfile for SPA build process
- Simplify deployment with embedded frontend assets
- Add migration for checksum_verifications table

This enables better UX, proper link previews on social platforms,
and provides a foundation for future enhancements.
2025-10-26 02:32:10 +02:00
Benjamin
8bda0ae1b9 ci: use -tags=integration to match build tags 2025-09-26 23:32:20 +02:00
Benjamin
16e7b60e69 ci: align IMAGE_TAG across build and security jobs 2025-09-19 23:03:12 +02:00
Benjamin
78da25559a fix: prevent invalid Docker tags on release builds 2025-09-14 23:11:52 +02:00
Benjamin
c38558fea6 feat: refactor Ackify to support CE/EE separation
- Move web server logic to pkg/web package for external imports
- Rename cmd/ackify to cmd/community for clarity
- Create NewServer(multitenant bool) function for EE integration
- Add basic unit tests for Community Edition
- Update Dockerfile to build from cmd/community
- Add comprehensive build and deployment documentation

This change enables the Enterprise Edition to import and extend
the Community Edition while maintaining clean separation.
2025-09-13 22:28:27 +02:00
Benjamin
62f8a56c7a feat: initial project setup
Add complete Go application for cryptographic document signature validation with OAuth2 authentication, Ed25519 signatures, and PostgreSQL storage following clean architecture principles.
2025-09-10 17:10:22 +02:00