docs: comprehensive documentation updates and modernization
- Update BUILDING.md with current build system information - Modernize various README files across the project - Update CHANGELOG.md with recent changes - Improve documentation consistency and formatting - Update platform-specific documentation (iOS, Electron, Docker) - Enhance test documentation and build guides
This commit is contained in:
@@ -18,6 +18,7 @@ This guide covers building and running the TimeSafari Electron application for d
|
||||
## Quick Start
|
||||
|
||||
### Development Mode
|
||||
|
||||
```bash
|
||||
# Start development server
|
||||
npm run build:electron:dev
|
||||
@@ -28,6 +29,7 @@ npm run electron:start
|
||||
```
|
||||
|
||||
### Production Builds
|
||||
|
||||
```bash
|
||||
# Build for current platform
|
||||
npm run build:electron:prod
|
||||
@@ -48,16 +50,19 @@ npm run build:electron:deb # Linux DEB package
|
||||
The Electron app enforces single instance operation to prevent database conflicts and resource contention:
|
||||
|
||||
### Implementation
|
||||
|
||||
- Uses Electron's built-in `app.requestSingleInstanceLock()`
|
||||
- Second instances exit immediately with user-friendly message
|
||||
- Existing instance focuses and shows informational dialog
|
||||
|
||||
### Behavior
|
||||
|
||||
- **First instance**: Starts normally and acquires lock
|
||||
- **Second instance**: Detects existing instance, exits immediately
|
||||
- **User experience**: Clear messaging about single instance requirement
|
||||
|
||||
### Benefits
|
||||
|
||||
- Prevents database corruption from concurrent access
|
||||
- Avoids resource conflicts
|
||||
- Maintains data integrity
|
||||
@@ -66,6 +71,7 @@ The Electron app enforces single instance operation to prevent database conflict
|
||||
## Build Configuration
|
||||
|
||||
### Environment Modes
|
||||
|
||||
```bash
|
||||
# Development (default)
|
||||
npm run build:electron:dev
|
||||
@@ -78,6 +84,7 @@ npm run build:electron:prod
|
||||
```
|
||||
|
||||
### Platform-Specific Builds
|
||||
|
||||
```bash
|
||||
# Windows
|
||||
npm run build:electron:windows:dev
|
||||
@@ -96,6 +103,7 @@ npm run build:electron:linux:prod
|
||||
```
|
||||
|
||||
### Package Types
|
||||
|
||||
```bash
|
||||
# Linux AppImage
|
||||
npm run build:electron:appimage:dev
|
||||
@@ -116,26 +124,31 @@ npm run build:electron:deb:prod
|
||||
## Platform-Specific Requirements
|
||||
|
||||
### Windows
|
||||
|
||||
- Windows 10+ (64-bit)
|
||||
- Visual Studio Build Tools (for native modules)
|
||||
|
||||
### macOS
|
||||
|
||||
- macOS 10.15+ (Catalina)
|
||||
- Xcode Command Line Tools
|
||||
- Code signing certificate (for distribution)
|
||||
|
||||
### Linux
|
||||
|
||||
- Ubuntu 18.04+ / Debian 10+ / CentOS 7+
|
||||
- Development headers for native modules
|
||||
|
||||
## Database Configuration
|
||||
|
||||
### SQLite Integration
|
||||
|
||||
- Uses native Node.js SQLite3 for Electron
|
||||
- Database stored in user's app data directory
|
||||
- Automatic migration from IndexedDB (if applicable)
|
||||
|
||||
### Single Instance Protection
|
||||
|
||||
- File-based locking prevents concurrent database access
|
||||
- Automatic cleanup on app exit
|
||||
- Graceful handling of lock conflicts
|
||||
@@ -143,11 +156,13 @@ npm run build:electron:deb:prod
|
||||
## Security Features
|
||||
|
||||
### Content Security Policy
|
||||
|
||||
- Strict CSP in production builds
|
||||
- Development mode allows localhost connections
|
||||
- Automatic configuration based on build mode
|
||||
|
||||
### Auto-Updater
|
||||
|
||||
- Disabled in development mode
|
||||
- Production builds check for updates automatically
|
||||
- AppImage builds skip update checks
|
||||
@@ -157,6 +172,7 @@ npm run build:electron:deb:prod
|
||||
### Common Issues
|
||||
|
||||
#### Build Failures
|
||||
|
||||
```bash
|
||||
# Clean and rebuild
|
||||
npm run clean:electron
|
||||
@@ -164,6 +180,7 @@ npm run build:electron:dev
|
||||
```
|
||||
|
||||
#### Native Module Issues
|
||||
|
||||
```bash
|
||||
# Rebuild native modules
|
||||
cd electron
|
||||
@@ -171,16 +188,19 @@ npm run electron:rebuild
|
||||
```
|
||||
|
||||
#### Single Instance Conflicts
|
||||
|
||||
- Ensure no other TimeSafari instances are running
|
||||
- Check for orphaned processes: `ps aux | grep electron`
|
||||
- Restart system if necessary
|
||||
|
||||
#### Database Issues
|
||||
|
||||
- Check app data directory permissions
|
||||
- Verify SQLite database integrity
|
||||
- Clear app data if corrupted
|
||||
|
||||
### Debug Mode
|
||||
|
||||
```bash
|
||||
# Enable debug logging
|
||||
DEBUG=* npm run build:electron:dev
|
||||
@@ -203,6 +223,7 @@ electron/
|
||||
## Development Workflow
|
||||
|
||||
1. **Start Development**
|
||||
|
||||
```bash
|
||||
npm run build:electron:dev
|
||||
```
|
||||
@@ -212,11 +233,13 @@ electron/
|
||||
- Changes auto-reload in development
|
||||
|
||||
3. **Test Build**
|
||||
|
||||
```bash
|
||||
npm run build:electron:test
|
||||
```
|
||||
|
||||
4. **Production Build**
|
||||
|
||||
```bash
|
||||
npm run build:electron:prod
|
||||
```
|
||||
@@ -224,16 +247,19 @@ electron/
|
||||
## Performance Considerations
|
||||
|
||||
### Memory Usage
|
||||
|
||||
- Monitor renderer process memory
|
||||
- Implement proper cleanup in components
|
||||
- Use efficient data structures
|
||||
|
||||
### Startup Time
|
||||
|
||||
- Lazy load non-critical modules
|
||||
- Optimize database initialization
|
||||
- Minimize synchronous operations
|
||||
|
||||
### Database Performance
|
||||
|
||||
- Use transactions for bulk operations
|
||||
- Implement proper indexing
|
||||
- Monitor query performance
|
||||
@@ -251,16 +277,19 @@ electron/
|
||||
## Deployment
|
||||
|
||||
### Distribution
|
||||
|
||||
- Windows: `.exe` installer
|
||||
- macOS: `.dmg` disk image
|
||||
- Linux: `.AppImage` or `.deb` package
|
||||
|
||||
### Code Signing
|
||||
|
||||
- Windows: Authenticode certificate
|
||||
- macOS: Developer ID certificate
|
||||
- Linux: GPG signing (optional)
|
||||
|
||||
### Auto-Updates
|
||||
|
||||
- Configured for production builds
|
||||
- Disabled for development and AppImage
|
||||
- Handles update failures gracefully
|
||||
@@ -269,4 +298,4 @@ electron/
|
||||
|
||||
**Last Updated**: 2025-07-11
|
||||
**Version**: 1.0.3-beta
|
||||
**Status**: Production Ready
|
||||
**Status**: Production Ready
|
||||
|
||||
Reference in New Issue
Block a user