feat(test-app): implement User Zero stars querying with 5-minute fetch timing

- Add comprehensive User Zero configuration based on TimeSafari crowd-master
- Implement stars querying API client with JWT authentication
- Create UserZeroView testing interface with mock mode toggle
- Add 5-minute fetch timing configuration for notification scheduling
- Include comprehensive documentation and TypeScript type safety
- Fix readonly array and property access issues
- Add proper ESLint suppressions for console statements

Files added:
- docs/user-zero-stars-implementation.md: Complete technical documentation
- src/config/test-user-zero.ts: User Zero configuration and API client
- src/views/UserZeroView.vue: Testing interface for stars querying

Files modified:
- capacitor.config.ts: Added TimeSafari integration configuration
- src/components/layout/AppHeader.vue: Added User Zero navigation tab
- src/router/index.ts: Added User Zero route
- src/lib/error-handling.ts: Updated type safety

Features:
- Stars querying with TimeSafari API integration
- JWT-based authentication matching crowd-master patterns
- Mock testing system for offline development
- 5-minute fetch timing before notification delivery
- Comprehensive testing interface with results display
- Type-safe implementation with proper error handling
This commit is contained in:
Matthew Raymer
2025-10-24 13:01:50 +00:00
parent be632b2f0e
commit 14287824dc
7 changed files with 1181 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import type { CapacitorConfig } from '@capacitor/cli';
import { TEST_USER_ZERO_CONFIG } from './src/config/test-user-zero';
const config: CapacitorConfig = {
appId: 'com.timesafari.dailynotification.test',
@@ -7,6 +8,46 @@ const config: CapacitorConfig = {
plugins: {
Clipboard: {
// Enable clipboard functionality
},
DailyNotification: {
// Basic plugin configuration
debugMode: true,
enableNotifications: true,
// TimeSafari integration for User Zero
timesafariConfig: {
activeDid: TEST_USER_ZERO_CONFIG.identity.did,
endpoints: {
projectsLastUpdated: `${TEST_USER_ZERO_CONFIG.api.server}${TEST_USER_ZERO_CONFIG.api.starsEndpoint}`
},
starredProjectsConfig: {
enabled: true,
starredPlanHandleIds: TEST_USER_ZERO_CONFIG.starredProjects.planIds,
fetchInterval: '0 8 * * *' // Daily at 8 AM
},
credentialConfig: {
jwtSecret: 'test-jwt-secret-for-user-zero-development-only',
tokenExpirationMinutes: TEST_USER_ZERO_CONFIG.api.jwtExpirationMinutes
}
},
// Network configuration
networkConfig: {
timeout: TEST_USER_ZERO_CONFIG.testing.timeoutMs,
retryAttempts: TEST_USER_ZERO_CONFIG.testing.retryAttempts,
retryDelay: TEST_USER_ZERO_CONFIG.testing.retryDelayMs
},
// Content fetch configuration (5 minutes before notification)
contentFetch: {
enabled: true,
schedule: `0 ${TEST_USER_ZERO_CONFIG.notifications.scheduleTime.split(':')[1]} * * *`,
fetchLeadTimeMinutes: TEST_USER_ZERO_CONFIG.notifications.fetchLeadTimeMinutes,
callbacks: {
onSuccess: 'handleStarsQuerySuccess',
onError: 'handleStarsQueryError'
}
}
}
}
};