Commit Graph

23 Commits

Author SHA1 Message Date
William Valentin
bffd13e6fc feat(build): add backend-focused testing commands
- Add 'make full-check-backend' for fast backend testing without E2E
- Add 'make test-backend' for unit and integration tests only
- Update 'test:integration' to use Jest instead of bun for consistency
- Improve command descriptions for clarity
- Enable fast development workflow by skipping E2E tests when not needed
2025-09-07 16:14:58 -07:00
William Valentin
2e3fbaf1e6 fix(auth): resolve service import and dependency issues
- Replace dynamic imports with static imports for better test compatibility
- Fix circular dependency issues between auth service and CouchDB factory
- Use correct CouchDB service methods (createUserWithPassword, etc.)
- Remove unused imports and improve code organization
- Fix email verification service to work properly with mocked dependencies
- Ensure proper error handling and service interaction patterns
2025-09-07 16:14:25 -07:00
William Valentin
38699c6724 test(auth): enhance auth integration tests with comprehensive coverage
- Restructure tests with better organization by functionality
- Add comprehensive test coverage for all auth flows
- Include OAuth authentication testing (registration and login)
- Add password management tests (change password, reset password)
- Test error scenarios and edge cases
- Improve type safety with proper interfaces
- Fix mock configuration and service interaction testing
- Add tests for user registration, login, and verification flows
2025-09-07 16:13:50 -07:00
William Valentin
65c846d7c5 test(auth): improve email verification service tests
- Restructure tests with better organization and describe blocks
- Add comprehensive test coverage for all service methods
- Test edge cases including expired tokens and database errors
- Add integration scenario tests for full verification flow
- Fix TypeScript issues with mock user creation
- Improve test isolation and mock management
- Add tests for unique token generation and error handling
2025-09-07 16:13:14 -07:00
William Valentin
e7097ee102 feat(test): enhance test setup with comprehensive mocking
- Add proper TypeScript types for all mocks
- Implement UUID library mocking for unique token generation
- Add comprehensive fetch, FormData, Blob, and File API mocks
- Include crypto, performance, and observer API mocks
- Add utility functions for test helpers
- Improve console suppression for cleaner test output
- Fix localStorage and sessionStorage implementation
2025-09-07 16:12:35 -07:00
William Valentin
b4a9318324 test: enhance E2E and integration testing infrastructure
- Add comprehensive TypeScript types to E2E test helpers
- Improve medication, auth, modal, and wait helper classes with proper typing
- Enhance test data with readonly type assertions for better immutability
- Update integration tests with better error handling and assertions
- Improve Playwright type definitions for better IDE support
- Add environment variable support to manual test scripts
2025-09-07 15:22:33 -07:00
William Valentin
172bb2bd74 refactor: improve service layer logging and configuration
- Change email service logging from console.log to console.warn for better visibility
- Update mailgun and couchdb configuration with improved error handling
- Enhance database seeder with better logging and error management
- Improve service factory patterns for better testability
2025-09-07 15:22:04 -07:00
William Valentin
58a4988b58 feat: add cross-platform environment utility
- Create universal environment variable utility for Vite and Node.js
- Support both import.meta.env (browser/Vite) and process.env (Node.js)
- Add environment detection helpers (isBrowser, isNode, isTest, isProduction)
- Safely handle environment access across different runtime contexts
- TypeScript support with proper type definitions
2025-09-07 15:21:36 -07:00
William Valentin
2814237e71 deps: add testing dependencies and update configuration
- Add Babel core, presets for env and TypeScript support
- Add babel-jest for JavaScript transformation in Jest
- Add node-fetch and @types/node-fetch for HTTP testing
- Update TypeScript config for better Jest compatibility
- Update bun.lock with new dependency resolutions
2025-09-07 15:21:27 -07:00
William Valentin
c5d3631cb6 feat: configure Jest testing infrastructure
- Update Jest config with module name mapping for uuid and node-fetch
- Add Babel transform for mixed JS/TS support
- Configure transformIgnorePatterns for ES modules
- Add comprehensive test mocks for uuid and node-fetch
- Setup import.meta environment variables for Jest compatibility
- Increase test timeout to 30 seconds for integration tests
2025-09-07 15:20:59 -07:00
William Valentin
315303b120 Fix pre-commit script to properly handle multiple files and resolve ESLint warnings 2025-09-07 13:34:39 -07:00
William Valentin
8fa2d3fb60 feat: Switch project tooling from npm to bun and add enhanced pre-commit
checks

- Replace npm commands with bun/bunx in scripts, docs, and CI - Add
enhanced pre-commit checks with parallel execution - Document pre-commit
hook behavior in PRE_COMMIT_HOOKS.md - Update .gitignore/.dockerignore
for bun-debug.log - Refine ESLint config for bun and Prettier
integration - Add scripts/type-check-staged.sh for fast staged type
checks - Improve developer workflow and code quality automation
2025-09-07 12:40:57 -07:00
William Valentin
585c526a65 feat: Add APP_NAME env support for branding and deployment
- Make app name configurable via APP_NAME env variable - Update UI,
HTML, Docker, scripts, and k8s to use APP_NAME - Add process-html.sh for
template substitution - Document APP_NAME usage in
docs/APP_NAME_CONFIGURATION.md - Update Dockerfile, compose, and scripts
for dynamic naming - Add index.html.template for environment-based
branding
2025-09-07 12:21:44 -07:00
William Valentin
46d737ed37 fix: Add symlinks for Dockerfile and .dockerignore; update compose
config
2025-09-07 11:42:38 -07:00
William Valentin
6bddac7656 feat: Enable multi-platform Docker builds and dynamic image tagging
- Detect host architecture to set build platform - Support
multi-platform builds when MULTI_PLATFORM=1 or CONTAINER_REGISTRY is set
- Dynamically set image tag based on registry and platform - Pull pushed
images for local validation - Update all docker run and inspect commands
to use dynamic image tag
2025-09-06 17:44:53 -07:00
William Valentin
75d0f772e9 chore: Remove .env.production file and update documentation for environment file security 2025-09-06 10:52:45 -07:00
William Valentin
fb26939a9a feat: Add Makefile to organize project commands and enhance usability 2025-09-06 02:50:59 -07:00
William Valentin
48a2802411 Add undeploy script and ensure namespace function for Kubernetes management 2025-09-06 02:46:11 -07:00
William Valentin
5852626c10 Refactor K8S_DIR assignment to use PROJECT_ROOT for improved path resolution 2025-09-06 02:45:45 -07:00
William Valentin
f56aa0797c Fix import path for icons in OnboardingModal component 2025-09-06 01:59:44 -07:00
William Valentin
79bfdeaa94 Use npm script for pre-commit hook to avoid bunx issues 2025-09-06 01:54:15 -07:00
William Valentin
5eeb7d62ca Fix pre-commit hook: use local lint-staged instead of bunx 2025-09-06 01:53:46 -07:00
William Valentin
e48adbcb00 Initial commit: Complete NodeJS-native setup
- Migrated from Python pre-commit to NodeJS-native solution
- Reorganized documentation structure
- Set up Husky + lint-staged for efficient pre-commit hooks
- Fixed Dockerfile healthcheck issue
- Added comprehensive documentation index
2025-09-06 01:42:48 -07:00