12 Commits

Author SHA1 Message Date
Benjamin
bc53b3ece9 feat: add anonymous telemetry for usage metrics
- Integrate SHM SDK (v1.2.0) to collect anonymous usage statistics
- Track documents, confirmations, webhooks and reminders count
- Add ACKIFY_TELEMETRY env var (disabled by default, opt-in)
2025-12-22 19:04:32 +01:00
Benjamin
41881c02b5 wip 2025-12-18 11:43:05 +01:00
Benjamin
eca55c6bcb refactor(go): restore go.mod (and sum) on project root
and restore missing cypress tests
2025-12-10 16:29:00 +01:00
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
249849b3ed feat(tenant): add tenant support
- Add instance_metadata table with unique UUID per instance
- Add tenant_id column to all business tables (documents, signatures, expected_signers, webhooks, reminder_logs, email_queue, checksum_verifications, webhook_deliveries)
- Backfill existing data with instance tenant UUID
- Create TenantProvider interface and SingleTenantProvider implementation
- Update all repositories to filter by tenant_id
- Add immutability triggers to prevent tenant_id modification after creation

Migration 0015 includes:
- Schema changes with indexes for tenant_id columns
- SQL backfill for existing data
- Trigger functions for data integrity
2025-12-03 22:24:12 +01:00
Benjamin
aa002f824c feat(db): improve db migrations system with force & goto command (for existing db without migration schema) 2025-12-03 11:01:23 +01:00
Benjamin
2c24c3f2f6 feat: add SMTP email service with signature reminders
Add configurable SMTP service for sending signature reminder emails.

Features:
- Configurable via ACKIFY_MAIL_* environment variables
- Multilingual templates (en/fr) with HTML + text versions
- Template rendering with automatic variable injection
- Graceful degradation when SMTP not configured
- TLS/STARTTLS support with configurable timeout
- MailHog integration for local testing
2025-10-06 14:07:09 +02:00
Benjamin
9c53a8bf2b feat: implement complete i18n support with French and English
Add comprehensive internationalization support:
- Browser language detection via Accept-Language header
- Cookie-based language preference persistence (1 year)
- Language switcher with flag emojis (🇫🇷 🇬🇧)
- 71 translation keys covering all UI elements
- Context-based translation injection via middleware

Replace Tailwind CDN with production build:
- Tailwind CLI v3.4.16 for CSS compilation
- Minified CSS output (5.9KB from several MB)
- Docker build integration
- Custom color palette configuration

Update all templates with i18n support:
- Main pages: home, sign, signatures, error
- Admin dashboard and document details
- Embed iframe widget (English only for international use)
- Language switcher preserves current page URL

Technical implementation:
- golang.org/x/text for language matching
- Middleware pattern for consistent i18n injection
- Fallback chain: Cookie → Accept-Language → English
- Separate translation files (locales/fr.json, locales/en.json)
2025-10-01 00:13:40 +02:00
Benjamin
bde1049343 feat: implement standalone SQL migration system
- Add golang-migrate based migration CLI in cmd/migrate/
- Extract hardcoded SQL migrations from connection.go to proper migration files
- Create 0001_init migration with complete signatures table schema
- Remove embedded migrations from Go code for cleaner separation
- Support up/down/version/drop migration operations
- Migration files follow semantic versioning starting at 0001
2025-09-14 17:59:33 +02:00
Benjamin
18c8d61d75 feat: migrate to chi router for ee integration 2025-09-14 15:54:51 +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