You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Matthew Raymer 6213235a16 feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
..
src feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
.eslintrc.cjs feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
.gitignore feat: add minimal Capacitor test apps for all platforms 1 month ago
GRADLE_TROUBLESHOOTING.md chore: update Android test app dependencies to latest stable versions 1 month ago
README.md feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
capacitor.config.ts feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
env.d.ts feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
index.html feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
package-lock.json chore: update Android test app dependencies to latest stable versions 1 month ago
package.json feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
tsconfig.json feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
vite.config.ts feat(test-app): refactor to Vue 3 + Vite + vue-facing-decorator architecture 1 week ago
webpack.config.js feat: add minimal Capacitor test apps for all platforms 1 month ago

README.md

Daily Notification Test App - Vue 3

A modern Vue 3 + Vite + Capacitor test application for the Daily Notification Plugin, built with vue-facing-decorator for TypeScript class-based components.

๐Ÿš€ Features

  • Vue 3 with Composition API and TypeScript
  • Vite for fast development and building
  • vue-facing-decorator for class-based components
  • Pinia for state management
  • Vue Router for navigation
  • Capacitor for native Android functionality
  • Modern UI with glassmorphism design
  • Responsive design for mobile and desktop

๐Ÿ“ฑ App Structure

src/
โ”œโ”€โ”€ components/          # Reusable Vue components
โ”‚   โ”œโ”€โ”€ cards/          # Card components (ActionCard, StatusCard, etc.)
โ”‚   โ”œโ”€โ”€ items/          # List item components
โ”‚   โ”œโ”€โ”€ layout/         # Layout components (Header, Footer)
โ”‚   โ””โ”€โ”€ ui/             # UI components (Loading, Error, etc.)
โ”œโ”€โ”€ stores/             # Pinia stores
โ”‚   โ”œโ”€โ”€ app.ts         # Global app state
โ”‚   โ””โ”€โ”€ notifications.ts # Notification management
โ”œโ”€โ”€ views/              # Page components
โ”‚   โ”œโ”€โ”€ HomeView.vue   # Dashboard
โ”‚   โ”œโ”€โ”€ ScheduleView.vue # Schedule notifications
โ”‚   โ”œโ”€โ”€ NotificationsView.vue # Manage notifications
โ”‚   โ”œโ”€โ”€ StatusView.vue # System status
โ”‚   โ”œโ”€โ”€ HistoryView.vue # Notification history
โ”‚   โ””โ”€โ”€ SettingsView.vue # App settings
โ”œโ”€โ”€ router/             # Vue Router configuration
โ”œโ”€โ”€ types/              # TypeScript type definitions
โ””โ”€โ”€ utils/              # Utility functions

๐Ÿ› ๏ธ Development

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Android Studio (for Android development)
  • Capacitor CLI

Installation

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Type checking
npm run type-check

# Linting
npm run lint

Android Development

# Sync with Capacitor
npm run sync

# Open Android Studio
npm run open

# Run on Android device/emulator
npm run android

๐ŸŽจ UI Components

Class-Based Components

All components use vue-facing-decorator for TypeScript class-based syntax:

@Component({
  components: {
    ChildComponent
  }
})
export default class MyComponent extends Vue {
  @Prop() title!: string
  
  private data = ref('')
  
  get computedValue(): string {
    return this.data.value.toUpperCase()
  }
  
  private handleClick(): void {
    // Handle click
  }
}

State Management

Uses Pinia stores for reactive state management:

// stores/notifications.ts
export const useNotificationsStore = defineStore('notifications', () => {
  const scheduledNotifications = ref<ScheduledNotification[]>([])
  
  async function scheduleNotification(options: ScheduleOptions): Promise<void> {
    // Schedule logic
  }
  
  return {
    scheduledNotifications,
    scheduleNotification
  }
})

๐Ÿ“Š Features

Dashboard (Home)

  • Quick action cards
  • System status overview
  • Next scheduled notification
  • Recent activity feed

Schedule Notifications

  • Time picker
  • Title and message inputs
  • Sound and priority options
  • URL support for deep linking
  • Quick schedule presets

Notification Management

  • View all scheduled notifications
  • Cancel notifications
  • Status indicators

System Status

  • Permission checks
  • Channel status
  • Exact alarm settings
  • Platform information
  • Test notification functionality

History

  • Delivered notification history
  • Click and dismiss tracking
  • Time-based filtering

๐Ÿ”ง Configuration

Capacitor Config

// capacitor.config.ts
const config: CapacitorConfig = {
  appId: 'com.timesafari.dailynotification.androidtest',
  appName: 'Daily Notification Test - Vue 3',
  webDir: 'dist',
  plugins: {
    DailyNotification: {
      storage: 'shared',
      ttlSeconds: 1800,
      prefetchLeadMinutes: 15,
      enableETagSupport: true,
      enableErrorHandling: true,
      enablePerformanceOptimization: true
    }
  }
}

Vite Config

// vite.config.ts
export default defineConfig({
  plugins: [vue()],
  build: {
    outDir: 'dist',
    sourcemap: true
  },
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  }
})

๐ŸŽฏ Testing the Plugin

  1. Start Development Server

    npm run dev
    
  2. Build and Sync

    npm run build
    npm run sync
    
  3. Run on Android

    npm run android
    
  4. Test Features

    • Schedule notifications
    • Check system status
    • View notification history
    • Test clickable notifications

๐Ÿ“ฑ Native Features

  • Notification Scheduling - Schedule daily notifications
  • Permission Management - Check and request permissions
  • Status Monitoring - Real-time system status
  • Deep Linking - URL support in notifications
  • Background Processing - WorkManager integration

๐ŸŽจ Design System

Colors

  • Primary: Linear gradient (purple to blue)
  • Success: #4caf50
  • Warning: #ff9800
  • Error: #f44336
  • Info: #2196f3

Typography

  • Headers: Bold, white with text-shadow
  • Body: Regular, rgba white
  • Code: Courier New monospace

Components

  • Glassmorphism design with backdrop-filter
  • Rounded corners (8px, 12px, 16px)
  • Smooth transitions and hover effects
  • Responsive grid layouts

๐Ÿš€ Production Build

# Build for production
npm run build

# Preview production build
npm run preview

# Sync with Capacitor
npm run sync

# Build Android APK
npm run android

๐Ÿ“ Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run android - Run on Android
  • npm run sync - Sync with Capacitor
  • npm run open - Open Android Studio
  • npm run lint - Run ESLint
  • npm run type-check - TypeScript type checking

๐Ÿ” Debugging

Vue DevTools

Install Vue DevTools browser extension for component inspection.

Capacitor Logs

# Android logs
adb logcat | grep -i "daily\|notification"

# Capacitor logs
npx cap run android --livereload --external

TypeScript

Enable strict mode in tsconfig.json for better type checking.

๐Ÿ“š Dependencies

Core

  • Vue 3.4+
  • Vite 5.0+
  • TypeScript 5.3+
  • Capacitor 5.0+

UI & State

  • vue-facing-decorator 3.0+
  • Pinia 2.1+
  • Vue Router 4.2+

Development

  • ESLint + TypeScript configs
  • Vue TSC for type checking
  • Modern module resolution

๐Ÿค Contributing

  1. Follow Vue 3 + TypeScript best practices
  2. Use vue-facing-decorator for class components
  3. Maintain responsive design
  4. Add proper TypeScript types
  5. Test on both web and Android

๐Ÿ“„ License

MIT License - see LICENSE file for details.


Built with โค๏ธ using Vue 3 + Vite + Capacitor