mirror of
https://github.com/btouchard/ackify.git
synced 2026-01-06 04:49:52 -06:00
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.
11 KiB
11 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.0 - 2025-10-16
🎉 Major Release: API-First Vue Migration
Complete architectural overhaul to a modern API-first architecture with Vue 3 SPA frontend.
Added
-
RESTful API v1
- Versioned API with
/api/v1prefix - Structured JSON responses with consistent error handling
- Public endpoints: health, documents, signatures, expected signers
- Authentication endpoints: OAuth flow, logout, auth check
- Authenticated endpoints: user profile, signatures, signature creation
- Admin endpoints: document management, signer management, reminders
- OpenAPI specification endpoint
/api/v1/openapi.json
- Versioned API with
-
Vue 3 SPA Frontend
- Modern single-page application with TypeScript
- Vite build tool with hot module replacement (HMR)
- Pinia state management for centralized application state
- Vue Router for client-side routing
- Tailwind CSS for utility-first styling
- Responsive design with mobile support
- Pages: Home, Sign, Signatures, Embed, Admin Dashboard, Document Details
-
Comprehensive Logging System
- Structured JSON logging with
slogpackage - Log levels: debug, info, warn, error (configurable via
ACKIFY_LOG_LEVEL) - Request ID tracking through entire request lifecycle
- HTTP request/response logging with timing
- Authentication flow logging
- Signature operation logging
- Reminder service logging
- Database query logging
- OAuth flow progression logging
- Structured JSON logging with
-
Enhanced Security
- CSRF token protection for all state-changing operations
- Rate limiting (5 auth attempts/min, 100 general requests/min)
- CORS configuration for development and production
- Security headers (CSP, X-Content-Type-Options, X-Frame-Options, etc.)
- Session-based authentication with secure cookies
- Request ID propagation for distributed tracing
-
Public Embed Route
/embed/{docId}route for public embedding (no authentication required)- oEmbed protocol support for unfurl functionality
- CSP headers configured to allow iframe embedding on embed routes
- Suitable for integration in documentation tools and wikis
-
Auto-Login Feature
- Optional
ACKIFY_OAUTH_AUTO_LOGINconfiguration - Silent authentication when OAuth session exists
/api/v1/auth/checkendpoint for session verification- Seamless user experience when returning to application
- Optional
-
Docker Multi-Stage Build
- Optimized Dockerfile with separate Node and Go build stages
- Smaller final image size
- SPA assets built during Docker build process
- Production-ready containerized deployment
Changed
-
Architecture
- Migrated from template-based rendering to API-first architecture
- Introduced clear separation between API and frontend
- Organized API handlers into logical modules (admin, auth, documents, signatures, users)
- Centralized middleware in
sharedpackage (logging, CORS, CSRF, rate limiting, security headers)
-
Routing
- Chi router now serves both API v1 and Vue SPA
- SPA fallback routing for all unmatched routes
- API endpoints prefixed with
/api/v1 - Static assets served from
/assetsfor SPA and/staticfor legacy
-
Authentication
- Standardized session-based auth across API and templates
- CSRF protection on all authenticated API endpoints
- Rate limiting on authentication endpoints
-
Documentation
- Updated BUILD.md with Vue SPA build instructions
- Updated README.md with API v1 endpoint documentation
- Updated README_FR.md with French translations
- Added logging configuration documentation
- Added development environment setup instructions
Fixed
- Consistent error handling across all API endpoints
- Proper HTTP status codes for all responses
- CORS issues in development environment
Technical Details
New Files:
internal/presentation/api/- Complete API v1 implementationadmin/handler.go- Admin endpointsauth/handler.go- Authentication endpointsdocuments/handler.go- Document endpointssignatures/handler.go- Signature endpointsusers/handler.go- User endpointshealth/handler.go- Health check endpointshared/- Shared middleware and utilitieslogging.go- Request logging middlewaremiddleware.go- Auth, admin, CSRF, rate limiting middlewareresponse.go- Standardized JSON response helperserrors.go- Error code constants
router.go- API v1 router configuration
webapp/- Complete Vue 3 SPAsrc/components/- Reusable Vue componentssrc/pages/- Page components (Home, Sign, Signatures, Embed, Admin)src/services/- API client servicessrc/stores/- Pinia state storessrc/router/- Vue Router configurationvite.config.ts- Vite build configurationtsconfig.json- TypeScript configuration
Modified Files:
pkg/web/server.go- Updated to serve both API and SPAinternal/infrastructure/auth/oauth.go- Added structured logginginternal/application/services/signature.go- Added structured logginginternal/application/services/reminder.go- Added structured loggingDockerfile- Multi-stage build for Node and Godocker-compose.yml- Updated for new architecture
Deprecated:
- Template-based admin routes (will be maintained for backward compatibility)
- Legacy
/statusand/status.pngendpoints (superseded by API v1)
Migration Guide
For users upgrading from v1.x to v2.0:
- Environment Variables: Add optional
ACKIFY_LOG_LEVELandACKIFY_OAUTH_AUTO_LOGINif desired - Docker: Rebuild images to include Vue SPA build
- API Clients: Consider migrating to new API v1 endpoints for better structure
- Embed URLs: Update to use
/embed/{docId}instead of token-based system
Breaking Changes
- None - v2.0 maintains backward compatibility with all v1.x features
- Template-based admin interface remains functional
- Legacy endpoints continue to work
1.1.3 - 2025-10-08
Added
-
Document Metadata Management System
- New
documentstable for storing metadata (title, URL, checksum, description) - Document repository with full CRUD operations
- Comprehensive integration tests for document operations
- Admin UI section for viewing and editing document metadata
- Copy-to-clipboard functionality for checksums
- Support for SHA-256, SHA-512, and MD5 checksum algorithms
- Automatic
updated_attimestamp tracking with PostgreSQL trigger
- New
-
Modern Modal Dialogs
- Replaced native JavaScript
alert()andconfirm()with styled modal dialogs - Consistent design across all confirmation actions
- Better UX with warning (orange) and delete (red) visual indicators
- Confirmation modal for email reminder sending
- Delete confirmation modal for removing expected readers
- Replaced native JavaScript
-
SVG Favicon
- Added modern vector favicon with brand identity
- Responsive and works across all modern browsers
Changed
-
Email Reminder Improvements
- Email language now matches user's interface language (fr/en)
- Document URL automatically fetched from metadata instead of manual input
- Simplified reminder form by removing redundant URL field
- Document URL displayed as clickable link in reminder section
-
Admin Dashboard Enhancement
- Document listing now includes documents from
documentstable - Shows documents with metadata even without signatures or expected readers
- Document listing now includes documents from
-
UI Refinements
- Removed "Admin connecté" status indicator from dashboard header
- Document URL in metadata displayed as hyperlink instead of input field
- Cleaner and more focused admin interface
Fixed
- Template syntax error with
notoperator requiring parentheses
Technical Details
- Added database migration
0005_create_documents_table - New domain model:
models.Documentandmodels.DocumentInput - New infrastructure:
DocumentRepositorywith full test coverage - New presentation:
DocumentHandlerswith GET/POST/DELETE endpoints - Routes:
/admin/docs/{docID}/metadata(GET, POST, DELETE) - Updated
ReminderService.SendReminders()signature to include locale parameter - Modified files:
internal/domain/models/document.go(new)internal/infrastructure/database/document_repository.go(new)internal/infrastructure/database/document_repository_test.go(new)internal/presentation/admin/handlers_documents.go(new)internal/application/services/reminder.gointernal/infrastructure/database/admin_repository.gointernal/presentation/admin/handlers_expected_signers.gointernal/presentation/admin/routes_admin.gotemplates/admin_dashboard.html.tpltemplates/admin_document_expected_signers.html.tpltemplates/base.html.tplstatic/favicon.svg(new)migrations/0005_create_documents_table.{up,down}.sql(new)
1.1.2 - 2025-10-03
Added
- SSO Provider Logout: Complete session termination at OAuth provider level
- Added
LogoutURLconfiguration for OAuth providers - Automatic redirect to provider logout (Google, GitHub, GitLab, custom)
- New environment variable
ACKIFY_OAUTH_LOGOUT_URLfor custom providers - Users are now properly logged out from both the application and the SSO provider
- Added
Fixed
- Blockchain chain isolation: Each document now has its own independent blockchain
GetLastSignaturenow filters bydoc_idto prevent cross-document chain corruption- Genesis signatures are correctly created per document
- Prevents blockchain chains from mixing between different documents
- Added comprehensive tests for multi-document blockchain integrity
Changed
GetLastSignaturemethod signature updated to includedocIDparameter- All repository implementations updated to support document-scoped blockchain queries
Technical Details
- Modified files:
internal/application/services/signature.gointernal/infrastructure/database/repository.gointernal/infrastructure/auth/oauth.gointernal/infrastructure/config/config.gointernal/presentation/handlers/auth.gointernal/presentation/handlers/interfaces.gopkg/web/server.go
- All existing tests updated and passing
1.1.1 - 2025-01-XX
Changed
- Refactor template variables to separate from locale strings
- Improve database operations for UserName handling
1.1.0 - 2025-01-XX
Added
- Blockchain hash determinism improvements
- ED25519 key generation documentation
Fixed
- NULL UserName handling in database operations
- Proper string conversion for UserName field