215 lines
7.3 KiB
Markdown
215 lines
7.3 KiB
Markdown
# VitFit V2 - Additional Considerations
|
|
|
|
This document captures planning items that are not fully covered elsewhere, or that deserve an explicit decision before implementation starts.
|
|
|
|
## Operational Readiness
|
|
|
|
### Backups and Restore Drills
|
|
|
|
The migration plan covers the V1 backup, but V2 also needs an ongoing backup strategy.
|
|
|
|
Consider documenting:
|
|
- Automatic SQLite backups on a schedule.
|
|
- Backup retention period.
|
|
- Whether uploads are backed up with the database.
|
|
- How database rows and video files stay consistent after restore.
|
|
- A tested restore procedure, not just backup creation.
|
|
|
|
### Multi-Instance Update Process
|
|
|
|
V2 is intentionally multi-instance, which means every customer install eventually needs patching.
|
|
|
|
Consider documenting:
|
|
- Version numbering and release notes.
|
|
- A standard update checklist per customer.
|
|
- Whether migrations can be dry-run or prechecked.
|
|
- Maintenance window expectations.
|
|
- Rollback strategy after a migration has already changed the database.
|
|
- How urgent security patches are pushed across all installs.
|
|
|
|
### Monitoring and Alerts
|
|
|
|
The docs include a `/health` endpoint and storage monitoring UI, but not an alert path.
|
|
|
|
Consider documenting:
|
|
- PM2 log rotation and disk limits.
|
|
- External uptime checks.
|
|
- Alerting when disk space is low, the process is down, or HTTPS renewal fails.
|
|
- Where operational logs live and how long they are retained.
|
|
|
|
## Security and Privacy
|
|
|
|
### First-Run Bootstrap
|
|
|
|
Open registration is correctly out of scope, but the first Owner/SystemAdmin creation flow needs a safe path.
|
|
|
|
Consider documenting:
|
|
- One-time setup command or seed script.
|
|
- How default credentials are avoided.
|
|
- How the first Organization, Owner, Branding, and SystemAdmin records are created.
|
|
- How setup mode is disabled after first run.
|
|
|
|
### Device Security Policy
|
|
|
|
Device tokens support the iPad kiosk use case, but the physical device workflow should be explicit.
|
|
|
|
Consider documenting:
|
|
- Lost/stolen iPad response.
|
|
- Required iPad passcode, auto-lock, Guided Access, and Apple ID ownership.
|
|
- Whether kiosk tokens are limited to specific roles.
|
|
- How Owners identify and revoke old devices.
|
|
- Whether device tokens should rotate on use.
|
|
|
|
### Privacy, Consent, and Data Export
|
|
|
|
Client features introduce personal fitness and scheduling data. This may not be regulated medical data, but it still needs basic privacy handling.
|
|
|
|
Consider documenting:
|
|
- What client data is collected and why.
|
|
- Owner/client data export process.
|
|
- Client deactivation vs deletion.
|
|
- Retention policy for inactive clients.
|
|
- Whether audit logs intentionally retain user identifiers forever.
|
|
|
|
### API and Error Standards
|
|
|
|
The docs call for clean REST APIs, but implementation will be easier if response conventions are defined early.
|
|
|
|
Consider documenting:
|
|
- API versioning, such as `/api/v1`.
|
|
- Standard error response shape.
|
|
- Pagination response shape.
|
|
- Date/time serialization format.
|
|
- Whether an OpenAPI document will be maintained.
|
|
|
|
## Data and Domain Rules
|
|
|
|
### Time Zones and Daylight Saving Time
|
|
|
|
Workouts and calendar sessions are date-sensitive, and gyms operate in local time.
|
|
|
|
Consider documenting:
|
|
- Organization time zone field.
|
|
- Whether dates are stored as UTC instants or local calendar dates.
|
|
- How "today's workouts" are calculated.
|
|
- Daylight saving behavior for recurring or scheduled sessions.
|
|
|
|
### Soft Deletes and Data Lifecycle
|
|
|
|
The data model uses `isActive` for users, while other objects still look hard-deletable.
|
|
|
|
Consider documenting:
|
|
- Which entities are soft deleted.
|
|
- Whether videos, workouts, timers, categories, and client workouts can be restored.
|
|
- How deleted videos affect historical workouts and audit logs.
|
|
- Whether Owners can permanently purge data.
|
|
|
|
### Permission Edge Cases
|
|
|
|
The permission matrix is strong, but a few edge cases should be specified.
|
|
|
|
Consider documenting:
|
|
- Preventing the last Owner from being deactivated or demoted.
|
|
- Whether an Owner can change their own role.
|
|
- Whether Coaches can delete content created by another Coach.
|
|
- Whether Coaches can self-assign clients by default.
|
|
- What happens when a Client changes Coaches.
|
|
|
|
### SQLite Concurrency
|
|
|
|
SQLite is reasonable for this scale, but a few high-write moments can still create lock contention.
|
|
|
|
Consider documenting:
|
|
- SQLite busy timeout settings.
|
|
- WAL mode.
|
|
- Transaction boundaries for upload + DB write + audit log.
|
|
- Behavior when two admins edit or delete the same record at the same time.
|
|
|
|
## Media and Display
|
|
|
|
### Video Compatibility
|
|
|
|
The streaming route handles authenticated Range requests, but upload compatibility should also be defined.
|
|
|
|
Consider documenting:
|
|
- Allowed video formats and codecs for iPad Safari.
|
|
- Maximum upload size and duration.
|
|
- Whether unsupported files are rejected or transcoding is introduced later.
|
|
- How MIME type is verified beyond browser-provided metadata.
|
|
- Path traversal protections for streaming filenames.
|
|
|
|
### Offline and Degraded Modes
|
|
|
|
The app shell may be cached, but most features depend on the server and network.
|
|
|
|
Consider documenting:
|
|
- What the iPad displays if the server is unreachable.
|
|
- Whether the last loaded workout can remain visible.
|
|
- Whether timers can continue locally if Socket.io disconnects.
|
|
- What happens if AirPlay drops during an active timer.
|
|
- Manual recovery steps for staff.
|
|
|
|
### Physical Device Test Matrix
|
|
|
|
The docs are Safari-first, but the deployment depends on specific real hardware behavior.
|
|
|
|
Consider documenting:
|
|
- Supported iPad models and iPadOS versions.
|
|
- Supported TV/AirPlay setup.
|
|
- Landscape/portrait lock expectations.
|
|
- 24-hour burn-in test checklist.
|
|
- Video seek/playback test checklist.
|
|
|
|
### Accessibility and Color Safety
|
|
|
|
Display mode has strong contrast goals, but branded colors can undermine readability.
|
|
|
|
Consider documenting:
|
|
- Contrast validation for custom branding.
|
|
- Colorblind-safe timer states.
|
|
- Reduced-motion option if display animations are distracting.
|
|
- Minimum touch target sizes for coach controls.
|
|
|
|
## Product and Support
|
|
|
|
### Support and Diagnostics
|
|
|
|
For resold installs, support will need a repeatable way to inspect problems.
|
|
|
|
Consider documenting:
|
|
- Support bundle export, such as app version, config summary, recent logs, storage stats, and DB migration status.
|
|
- Redaction rules for tokens, passwords, client notes, and personal data.
|
|
- Whether SystemAdmin support access is enabled by default or requires Owner approval.
|
|
|
|
### Licensing and Instance Ownership
|
|
|
|
Billing is out of scope for V2, but resale still benefits from basic license metadata.
|
|
|
|
Consider documenting:
|
|
- License key or customer identifier.
|
|
- Instance owner contact.
|
|
- Support expiration or renewal date.
|
|
- What happens when an organization is suspended.
|
|
|
|
### Client Portal Future Hooks
|
|
|
|
The data model anticipates clients, but the surrounding product flows are not fully defined yet.
|
|
|
|
Consider documenting:
|
|
- Client invitation flow.
|
|
- Password reset flow.
|
|
- Whether clients need email addresses before Phase 2.
|
|
- Progress tracking, notes visibility, and client feedback.
|
|
- Calendar conflict detection and recurring sessions.
|
|
|
|
## Documentation Hygiene
|
|
|
|
### Encoding Cleanup
|
|
|
|
Some Markdown output appears with mojibake characters in PowerShell, such as smart punctuation and icons rendering incorrectly.
|
|
|
|
Consider documenting or enforcing:
|
|
- UTF-8 encoding for planning docs.
|
|
- Plain ASCII diagrams where possible.
|
|
- Editor settings so future docs render consistently in terminals, GitHub, and deployment notes.
|