10 Commits

Author SHA1 Message Date
Benjamin
24e2de2922 refactor(arch): enforce strict layered architecture with private interfaces
Apply Clean Architecture principles throughout the codebase to eliminate tight coupling between layers. Handlers now depend exclusively on services through private interfaces, never directly on repositories.
Introduce a ServerBuilder pattern with pluggable capability providers.

refactor(auth): introduce injectable AuthorizerService

Replace hardcoded AdminEmails and OnlyAdminCanCreate config fields
with an injectable AuthorizerService. This improves testability and
follows the dependency injection pattern used elsewhere in the codebase.

- Create AuthorizerService in application/services/
- Define minimal Authorizer interfaces in consuming packages
- Update middleware, handlers, and router to use injected authorizer
- Update all affected tests with mock implementations

refactor(build): move go.mod to backend directory
Move Go module files from project root to backend/ directory while keeping the module name as github.com/btouchard/ackify-ce.
This improves project structure by keeping Go-specific files within the Go codebase directory.

# Conflicts:
#	backend/internal/application/services/checksum_service_test.go
#	backend/internal/application/services/document_service.go
#	backend/internal/application/services/document_service_duplicate_test.go
#	backend/internal/application/services/document_service_test.go
#	backend/internal/presentation/api/documents/handler.go
#	backend/internal/presentation/api/documents/handler_test.go
#	backend/internal/presentation/api/router.go
#	backend/pkg/web/server.go
2025-12-08 16:07:03 +01:00
Benjamin
714f122cfa fix: missing database integration test 2025-10-26 21:52:32 +01:00
Benjamin
7291c1083b fix: makefile to make coverage-all on 2 stage unit and then integration 2025-10-26 02:45:53 +02: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
5e74921ee7 feat: admin dashboard document request signatures
- New, clearer dashboard showing the status of each document
- The administrator can create a list of expected signatures for a given document.
- The administrator can manage the list of users who must confirm that they have read the document
2025-10-06 23:34:01 +02:00
Benjamin
3aaf1b25f8 docs: migrate to AGPL-3.0-or-later and add COPYRIGHT
- Replace SSPL with GNU AGPLv3 (LICENSE)
- Add COPYRIGHT with attribution
- Update Dockerfile label, README(s), BUILD.md
- Add SPDX headers across repo

refacto: remove redundant descriptive comments; keep only meaningful rationales
- Convert doc-comments to GoDoc style without colons
- Keep only security/algorithm rationales (CSRF state, CSP, chain hash, Bresenham)

tests: harden OAuth handlers tests (state missing/invalid) and fix fakes
- Add VerifyState token checks; ensure CreateAuthURL used
- Clean noisy comments in tests

docs: align docker-compose and scripts headers
2025-09-27 17:39:17 +02:00
Benjamin
06fb2d5b89 docs: standardize health endpoint; document admin ACL and routes; add staticcheck guidance and target 2025-09-26 23:32:20 +02:00
Benjamin
ff657e6d0d ci: fix docker-test service; skip outdated generate-mocks target 2025-09-26 23:32:20 +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