Skip to content

michaelborck-dev/electron-kit

Repository files navigation

Electron Template System

A comprehensive, modular Electron application template system for building consistent, professional desktop applications with modern web technologies.

License: MIT TypeScript Electron React

πŸš€ Features

Core Framework

  • πŸ”· TypeScript-first - Complete type safety throughout the stack
  • ⚑ Modern Build System - Vite + Electron Builder for fast development and optimized builds
  • 🎨 Design System - Tailwind CSS with custom theme and dark mode support
  • πŸ“± Responsive Layout - Professional desktop UI patterns with collapsible sidebars
  • πŸ”§ Universal Settings - Theme, accessibility, window management, and user preferences
  • 🌍 Multi-platform - Windows, macOS, and Linux builds with GitHub Actions CI/CD

Modular Architecture

  • 🧩 Pick Your Stack - Include only the modules you need
  • πŸ”Œ Plugin System - Clean integration patterns for extending functionality
  • πŸ“¦ Self-contained Modules - Each module is independently developed and tested
  • πŸ”„ Hot Reload - Fast development experience across all modules

Advanced Modules

  • πŸ€– AI Integration - Multi-provider support (OpenAI, Claude, Gemini, Ollama)
  • πŸ—„οΈ Database - SQLite integration with migrations and backups
  • πŸ” Vector Search - Local semantic search with LanceDB
  • πŸ“Š Data Visualization - Chart.js, D3.js, and Recharts integration
  • πŸ“„ Documentation - Markdown rendering with search and interactive tours
  • πŸ”” Notifications - Toast, system, and progress notifications
  • ⌨️ Shortcuts - Comprehensive keyboard shortcut management
  • πŸ”„ Auto-Updates - Built-in update system with rollback support
  • πŸ“€ Import/Export - Multiple format support with drag-drop interface

πŸ—οΈ Template Structure

electron-template/
β”œβ”€β”€ packages/              # Core modules
β”‚   β”œβ”€β”€ core/             # Base Electron + React setup
β”‚   β”œβ”€β”€ settings/         # Universal settings system
β”‚   β”œβ”€β”€ ai/               # AI service integration
β”‚   β”œβ”€β”€ database/         # SQLite database
β”‚   β”œβ”€β”€ vector-search/    # Semantic search
β”‚   β”œβ”€β”€ charts/           # Data visualization
β”‚   β”œβ”€β”€ docs/             # Documentation system
β”‚   β”œβ”€β”€ notifications/    # Notification system
β”‚   β”œβ”€β”€ shortcuts/        # Keyboard shortcuts
β”‚   β”œβ”€β”€ updater/          # Auto-update system
β”‚   └── import-export/    # Data import/export
β”œβ”€β”€ templates/            # Pre-built combinations
β”‚   β”œβ”€β”€ basic/            # Minimal setup
β”‚   β”œβ”€β”€ ai-app/           # AI-focused application
β”‚   β”œβ”€β”€ data-app/         # Data analysis application
β”‚   └── full/             # Complete feature set
└── tools/                # Development tools
    └── create-app/       # CLI generator

πŸš€ Quick Start

Using the CLI Generator (Recommended)

# Create a new AI-powered application
npx @michaelborck/create-electron-kit my-ai-app --template=ai-app

# Create a data analysis application
npx @michaelborck/create-electron-kit my-data-app --template=data-app

# Create with all modules
npx @michaelborck/create-electron-kit my-full-app --template=full

# Start with minimal setup
npx @michaelborck/create-electron-kit my-basic-app --template=basic

Manual Setup

# Clone the template
git clone https://github.com/yourusername/electron-template.git my-app
cd my-app

# Install dependencies
npm install

# Start development
npm run dev

πŸ“‹ Available Templates

Template Modules Included Best For
basic Core + Settings Simple utilities, minimal apps
ai-app Core + Settings + AI + Notifications Chat apps, AI assistants, content tools
data-app Core + Settings + Database + Charts + Import/Export Analytics, reporting, data management
research-app Core + AI + Database + Vector Search + Docs Research tools, knowledge management
full All modules Feature-rich applications, demos

🧩 Available Modules

Core Modules

Module Description Key Features
@template/core Base Electron setup React 18, TypeScript, Vite, Hot reload
@template/settings Universal settings Theme, accessibility, persistence

Feature Modules

Module Description Key Features
@template/ai AI service integration OpenAI, Claude, Gemini, Ollama, streaming
@template/database SQLite database Migrations, backups, type-safe queries
@template/vector-search Semantic search LanceDB, embeddings, similarity search
@template/charts Data visualization Chart.js, D3, Recharts, responsive
@template/docs Documentation system Markdown, search, tours, highlighting
@template/notifications Notification system Toast, system, progress, DND mode
@template/shortcuts Keyboard shortcuts Global/local, recording, conflict detection
@template/updater Auto-update system Background updates, rollback, channels
@template/import-export Data import/export JSON, CSV, Excel, drag-drop

πŸ’» Development

Prerequisites

  • Node.js 18+
  • npm 9+
  • Git

Setup

# Clone the repository
git clone https://github.com/yourusername/electron-template.git
cd electron-template

# Install dependencies
npm install

# Start development mode
npm run dev

Available Scripts

# Development
npm run dev              # Start development servers
npm run dev:web          # Web-only development
npm run dev:electron     # Electron development

# Building
npm run build            # Build all packages
npm run build:packages   # Build packages only
npm run build:templates  # Build template combinations

# Platform-specific builds
npm run build:win        # Build for Windows
npm run build:mac        # Build for macOS  
npm run build:linux      # Build for Linux

# Quality assurance
npm run test             # Run all tests
npm run test:unit        # Unit tests only
npm run test:e2e         # End-to-end tests
npm run lint             # ESLint check
npm run lint:fix         # Fix linting issues
npm run type-check       # TypeScript check
npm run format           # Prettier formatting

# Utilities
npm run clean            # Clean build artifacts
npm run reset            # Reset all dependencies

πŸ“š Documentation

  • USAGE.md - Comprehensive usage guide with examples
  • ACKNOWLEDGMENTS.md - Open source attributions
  • Module Documentation - Each package includes detailed README
  • Example Applications - See templates/ directory for working examples

πŸ› οΈ Module Integration Example

import React from 'react'
import {
  SettingsProvider,
  AIProvider,
  DatabaseProvider,
  NotificationProvider
} from '@template/core'
import { ChatInterface } from './components/ChatInterface'

function App() {
  return (
    <SettingsProvider>
      <DatabaseProvider>
        <AIProvider>
          <NotificationProvider>
            <div className="app">
              <ChatInterface />
            </div>
          </NotificationProvider>
        </AIProvider>
      </DatabaseProvider>
    </SettingsProvider>
  )
}

export default App

🚒 Deployment

Automated Builds

GitHub Actions automatically builds for all platforms when you push tags:

git tag v1.0.0
git push origin v1.0.0

Manual Builds

# Build for current platform
npm run build

# Build for all platforms
npm run build:all

# Build and publish
npm run release

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Ensure all tests pass: npm run test
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • TypeScript: All code must be properly typed
  • Testing: Add tests for new features
  • Documentation: Update relevant documentation
  • Accessibility: Follow WCAG 2.1 AA guidelines
  • Performance: Consider bundle size and runtime performance

πŸ› Troubleshooting

Common Issues

Build fails with native dependencies:

npm run electron:rebuild

TypeScript errors:

npm run type-check

Module resolution issues:

npm run clean && npm install

For more troubleshooting help, see USAGE.md.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

This template system builds upon many excellent open source projects. See ACKNOWLEDGMENTS.md for the complete list of attributions.


Built with ❀️ for the Electron community

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages