Commit Graph

140 Commits

Author SHA1 Message Date
William Valentin
ed8cbca1da build: streamline Docker setup and environment config
Some checks failed
Build and Deploy / build (push) Has been cancelled
Build and Deploy / test (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
- Simplify Dockerfile to use official Bun image as base
- Add admin bootstrap environment variables to .env.example
- Include VITE_ADMIN_EMAIL and VITE_ADMIN_PASSWORD build args
- Fix newline at end of .env.example file
- Remove redundant system dependency installations
2025-10-16 13:16:52 -07:00
William Valentin
f44ec57c62 build: enhance test configuration and TypeScript handling
- Update Jest config to use ts-jest for better TypeScript support
- Add TSX test file pattern support for React components
- Improve Babel config with proper TypeScript preset settings
- Enable better import.meta transformation for Jest compatibility
2025-10-16 13:16:37 -07:00
William Valentin
bf36f14eab fix(config): resolve circular import in unified config
- Replace direct logger import with dynamic import pattern
- Add withLogger utility to handle async logger initialization
- Prevent module loading issues during configuration bootstrap
- Maintain logging functionality while avoiding circular dependencies
2025-10-16 13:16:25 -07:00
William Valentin
7f5cf7a9e5 test: add comprehensive test coverage structure
- Add accessibility tests for ResetPasswordPage component
- Add performance tests for schedule generation
- Add visual regression tests with snapshot baselines
- Establish testing patterns for UI accessibility compliance
- Include performance benchmarks for core utilities
2025-10-16 13:16:12 -07:00
William Valentin
6a6b48cbc5 test: update auth and database tests for password hashing
- Refactor AvatarDropdown tests to use helper function pattern
- Add ResetPasswordPage test coverage for form validation and submission
- Update auth integration tests to verify bcrypt password handling
- Fix database service tests to expect hashed passwords
- Add proper mock setup for password verification scenarios
2025-10-16 13:16:00 -07:00
William Valentin
7317616032 feat(ui): improve avatar dropdown keyboard accessibility
- Add keyboard event handler for Enter and Space keys
- Support proper dropdown toggle via keyboard navigation
- Prevent default behavior for key events
- Enhance accessibility for screen reader users
2025-10-16 13:15:37 -07:00
William Valentin
25e25d92bc feat(auth): add password reset page component
- Add ResetPasswordPage with token validation from URL params
- Implement password confirmation validation
- Display success/error states with proper feedback
- Include accessible form labels and navigation buttons
- Export ResetPasswordPage from auth components index
2025-10-16 13:15:25 -07:00
William Valentin
a183aca4d8 feat(auth): implement secure password authentication
- Replace plaintext password comparison with bcrypt verification
- Hash passwords before database storage in registration
- Validate bcrypt hashes during login to reject legacy plaintext
- Update password change and reset flows with proper hashing
- Add legacy password detection for security enforcement
2025-10-16 13:15:08 -07:00
William Valentin
50a352fb27 feat(auth): add bcrypt password hashing service
- Add password hashing and verification utilities
- Implement bcrypt hash detection helper
- Support configurable salt rounds from unified config
- Replace plaintext password storage with secure hashing
2025-10-16 13:14:54 -07:00
William Valentin
35d6a48802 docs: add repository guidelines and development standards 2025-10-16 13:14:42 -07:00
William Valentin
10d1de91fe refactor(logging): replace console usage with logger 2025-09-23 12:19:15 -07:00
William Valentin
16bd4a8b20 chore(makefile): add parity targets and seeding 2025-09-23 11:39:30 -07:00
William Valentin
dec8c7b42e docs: add docker compose quickstart 2025-09-23 11:32:48 -07:00
William Valentin
eb43766b21 docs: clarify run profiles and env setup 2025-09-23 11:29:39 -07:00
William Valentin
de237fd997 refactor: centralize base64 encoding 2025-09-23 11:27:32 -07:00
William Valentin
e3a924c0c6 feat(db): retry on document conflicts 2025-09-23 11:25:28 -07:00
William Valentin
f9ccb50222 feat(db): index users by email 2025-09-23 11:23:45 -07:00
William Valentin
fcfe2a38e2 feat(admin): replace alerts with toasts 2025-09-23 11:20:37 -07:00
William Valentin
e9a662d1e2 feat(admin): add user search and sorting 2025-09-23 10:58:01 -07:00
William Valentin
7c712ae84b test(reminders): cover schedule edge cases 2025-09-23 10:54:33 -07:00
William Valentin
9bed793997 feat(reminders): validate frequency and time range 2025-09-23 10:53:12 -07:00
William Valentin
35dcae07e5 feat(accessibility): improve dose and reminder cards 2025-09-23 10:47:48 -07:00
William Valentin
2cb56d5f5f feat(medication): improve snooze timer handling 2025-09-23 10:45:18 -07:00
William Valentin
9b4ee116e6 test(schedule): cover dst transition logic 2025-09-23 10:39:35 -07:00
William Valentin
e7dbe30763 feat(mail): clarify mailgun configuration feedback 2025-09-23 10:30:12 -07:00
William Valentin
71c37f4b7b test(auth): add token service coverage 2025-09-23 10:24:44 -07:00
William Valentin
c1c8e28f01 refactor(logging): replace console usage in auth flows 2025-09-23 10:15:57 -07:00
William Valentin
6b6a44acef feat(auth): centralize token storage 2025-09-23 10:11:14 -07:00
William Valentin
3702c1da8a build(container): run caddy as root to avoid 'no matching entries in passwd file' in certain runtimes 2025-09-09 13:27:13 -07:00
William Valentin
eb55fb8951 build(container): fix Caddy stage permissions by using COPY --chown and drop chown RUN to avoid rootfs perms error 2025-09-09 12:57:57 -07:00
William Valentin
5ead0d1ce9 make: fix docker-run by using local docker build and add docker-buildx for multi-arch; pass VITE_COUCHDB_* build args 2025-09-09 12:55:04 -07:00
William Valentin
3992765833 chore(container): remove obsolete nginx.conf; docs: update references from Nginx to Caddy 2025-09-09 12:47:54 -07:00
William Valentin
da9d221dae build(container): replace nginx with caddy for static SPA serving (no TLS); embed Caddyfile; keep health endpoint on /health 2025-09-09 12:44:19 -07:00
William Valentin
15170a4f43 db(couchdb): auto-provision databases on startup for production strategy; add TokenService with CouchDB-backed token storage and localStorage fallback; switch OAuth to unified config for client IDs and redirect URI; express Request typing for req.user; align exportAsEnvVars with show-config expectations; remove Vite importmap from index.html; prefer babel-jest over ts-jest; remove duplicate uuid mocking from Jest config 2025-09-09 12:30:38 -07:00
William Valentin
062e0973c1 chore: remove CHANGELOG.md and CONTRIBUTING.md 2025-09-08 22:35:26 -07:00
William Valentin
c4152c9061 fix: clean up tsconfig.json and remove Playwright references
- Remove @playwright/test from types array since Playwright was removed
- Update test documentation to use Jest-based tools instead
- Verify TypeScript compilation still works correctly
- Maintains working Jest types for existing tests
2025-09-08 22:31:18 -07:00
William Valentin
da21692785 remove: broken component test examples
- Remove components/__tests__/example.component.test.tsx
- File contained mock/demo components that don't exist in actual codebase
- All 14 tests were failing due to DOM environment setup issues
- File was example/template code, not real functional tests
- Remove empty __tests__ directory
2025-09-08 22:26:11 -07:00
William Valentin
286ceeb106 remove: obsolete env.test.ts with broken imports
- Remove utils/__tests__/env.test.ts (imports non-existent getEnv function)
- Test was written for old environment utilities API before unified config
- Current env.ts implementation uses unified config system with different exports
- Schedule tests remain and pass (14/14) - keeping functional tests
2025-09-08 22:25:05 -07:00
William Valentin
d693dcf45c remove: broken Playwright E2E testing infrastructure
- Remove playwright.config.ts (references non-existent docker/docker-compose.yaml)
- Remove tests/e2e/ directory with broken test files
- Remove @playwright/test dependency from package.json
- Update documentation to remove E2E test references:
  - docs/architecture/PROJECT_STRUCTURE.md
  - docs/implementation/IMPLEMENTATION_SUMMARY.md
  - README.md
  - CONTRIBUTING.md
- E2E tests were non-functional due to missing Docker setup
- Focus on working unit and integration tests instead
2025-09-08 22:23:17 -07:00
William Valentin
b5b475f21b remove: obsolete HTML template processing system
- Remove index.html.template (template processing never implemented)
- Fix empty title in index.html by adding proper default title
- Update documentation to remove references to non-existent:
  - scripts/process-html.sh
  - predev/prebuild npm scripts
  - HTML template processing workflow
- Simplifies build process and fixes broken page title
2025-09-08 22:21:14 -07:00
William Valentin
10e0d6d14b docs: update references to removed debug and deployment files
- Update tests/README-CLEANUP.md to reflect removal of auth-debug files
- Update docs/development/SECURITY_CHANGES.md to remove Gitea references
- Ensures documentation accurately reflects current codebase state
- Maintains consistency between docs and actual file structure
2025-09-08 22:18:41 -07:00
William Valentin
ad8a16271c remove: legacy test cleanup report
- Remove tests/cleanup-report.json artifact from previous cleanup
- File contained historical cleanup information no longer needed
- Reduces codebase clutter and focuses on current state
2025-09-08 22:18:33 -07:00
William Valentin
930e044144 remove: obsolete auth debug test infrastructure
- Remove auth-debug.spec.ts (functionality merged into auth.spec.ts)
- Remove auth-debug-setup.ts and auth-debug-teardown.ts
- Remove AUTH-DEBUG-GUIDE.md and AUTH-DEBUG-SETUP-GUIDE.md documentation
- Remove specialized playwright.auth.config.ts configuration
- Consolidates testing into main E2E test suite for better maintainability
2025-09-08 22:18:25 -07:00
William Valentin
5e749b8982 remove: pre-production Gitea deployment configuration
- Remove .gitea/workflows/ci-cd.yml deployment workflow
- Remove .gitea/README.md deployment documentation
- App is not yet deployed to production, making these configs premature
- Will recreate deployment configs when ready for production deployment
2025-09-08 22:18:16 -07:00
William Valentin
13a06b71d1 feat: update Docker build to support amd64 and arm64, use --push 2025-09-08 22:09:33 -07:00
William Valentin
2bda21dc2a docs: add configuration management commands to README
- Document the useful show-config.js script and related npm scripts
- Add section explaining bun run config, config:env, config:help commands
- These commands help developers understand the unified configuration system
- Script is functional and well-integrated, so keeping it and making it more discoverable
2025-09-08 22:08:37 -07:00
William Valentin
0bb9e95e7d remove: delete corrupted rename-app.sh file and update references
- Remove rename-app.sh which contains corrupted deployment validation content
- File was misnamed (should be deployment validation, not app renaming)
- Contains broken/mixed content and isn't relevant for current development
- App is not deployed to production yet, so deployment validation scripts aren't needed
- Update SECURITY_CHANGES.md to remove references to deleted file
2025-09-08 22:07:01 -07:00
William Valentin
147be3bcb5 remove: delete Makefile.original backup file
- Remove unused Makefile.original (18KB) backup file
- The current simplified Makefile (3KB) is working well
- No need to keep the complex backup that could confuse developers
- Reduces repository clutter and focuses on current implementation
2025-09-08 22:06:06 -07:00
William Valentin
a7e5c1f7cb docs: major README cleanup and simplification
- Remove irrelevant deployment and production information (app not deployed yet)
- Focus on current development state and local development workflow
- Consolidate redundant sections and remove duplicate commands
- Simplify quick start to focus on development setup
- Remove complex deployment scenarios (K8s, cloud providers, production scripts)
- Streamline Docker section to focus on development use
- Consolidate troubleshooting to common development issues
- Remove extensive production deployment guides and cloud provider instructions
- Simplify API documentation to overview level
- Focus on development workflow rather than operational concerns

Result: README is now ~50% shorter and focused on actual current capabilities
2025-09-08 22:05:40 -07:00
William Valentin
a76f94fba7 fix: resolve Docker build and nginx configuration issues
- Add unzip package to Dockerfile for Bun installation
- Fix nginx.conf gzip_proxied directive (remove invalid 'must-revalidate')
- Add comment acknowledging password warning in Dockerfile
- Docker build now completes successfully and nginx starts without errors
2025-09-08 21:53:08 -07:00