Skip to content

Repository files navigation

Base Electron App

A minimal cross-platform desktop application built with Next.js and Electron, providing a clean foundation for Windows and Linux desktop applications.

Overview

This is a stripped-down Electron app template featuring a dark UI with two main sections: Library and Profile. It serves as a base foundation for building custom desktop applications.

Note: The langchain-agent-base and cli-art-tools folders are included for future development in part 2 of the project and are not currently integrated with the Electron app.

Architecture

graph TD
    A[Electron Main Process] -->|Creates| B[BrowserWindow]
    B -->|Loads| C[Next.js App]
    C -->|Routes| D[Home Page]
    C -->|Routes| E[Library Page]
    C -->|Routes| F[Profile Page]
    C -->|Routes| G[Settings Page]
    
    E -->|Manages| H[App Discovery]
    E -->|Manages| I[Installation]
    E -->|Manages| J[Launch Apps]
    
    F -->|Handles| K[Authentication]
    F -->|Manages| L[User Preferences]
    
    G -->|Controls| M[Theme Settings]
    G -->|Controls| N[Auto-Updates]
    G -->|Controls| O[Notifications]
    
    A -->|IPC Communication| C
    A -->|Native Features| P[File System]
    A -->|Native Features| Q[OS Integration]
    
    style A fill:#4a90e2
    style C fill:#61dafb
    style E fill:#10b981
    style F fill:#f59e0b
    style G fill:#8b5cf6
Loading

Application Flow

sequenceDiagram
    participant User
    participant Electron
    participant NextJS
    participant Library
    participant Install
    
    User->>Electron: Launch Application
    Electron->>NextJS: Create Window & Load
    NextJS->>User: Show Home Page
    
    User->>Library: Navigate to Library
    Library->>User: Display Available Apps
    
    User->>Library: Click Install App
    Library->>Install: Trigger Installation
    Install->>Library: Download & Setup
    Library->>User: App Ready to Launch
    
    User->>Library: Click Launch
    Library->>Electron: Execute App Process
    Electron->>User: App Running
Loading

Features

  • 🖥️ Native Desktop Experience - Browser-like controls wrapped in a native window
  • 🪟 Standard Window Controls - Minimize, maximize, and close buttons
  • 🐧 Cross-Platform - Full support for Windows and Linux
  • ⚡ Hot Reload - Instant updates during development
  • 📦 Easy Distribution - Automated installers for multiple platforms
  • 🎨 Modern UI - Built with Radix UI and Tailwind CSS
  • 📚 Library Page - Base template for content management
  • 👤 Profile Page - Base template for user profiles

Getting Started

Development Mode

Run the application in development mode with hot reload:

npm run electron:dev

This will start the Next.js dev server and launch the Electron window automatically.

Building for Production

Build for Windows:

npm run electron:build:win

Creates NSIS installer and portable executable in the dist/ folder.

Build for Linux:

npm run electron:build:linux

Creates AppImage, .deb, and .rpm packages in the dist/ folder.

Build for both platforms:

npm run electron:build:all

Project Structure

base-electron-app/
├── app/                    # Next.js application
│   ├── page.jsx           # Home page - main navigation hub
│   ├── library/           # Library page template
│   └── profile/           # Profile page template
├── electron/              # Electron main process
│   ├── main.js           # Window management and app lifecycle
│   └── preload.js        # Secure IPC bridge
├── components/            # Reusable UI components
│   └── ui/               # shadcn/ui components
├── langchain-agent-base/  # For future integration (part 2)
├── cli-art-tools/         # For future integration (part 2)
├── public/               # Static assets and app icons
├── dist/                 # Built executables (generated)
└── out/                  # Next.js static export (generated)

Tech Stack

  • Framework: Next.js 15 with React 19
  • Desktop Runtime: Electron
  • UI Components: Radix UI + shadcn/ui
  • Styling: Tailwind CSS v4
  • Build System: electron-builder
  • Development: concurrently, wait-on, cross-env

Key Components

Home Page

Simple navigation hub with quick access to Library and Profile pages.

Library Page

Base template ready for custom content management functionality.

Profile Page

Base template ready for user profile and preferences functionality.

Library Page

  • Browse available AI tools and applications
  • Filter between installed and available apps
  • One-click installation and launching
  • Manage installed applications

Profile Page

  • User authentication with email and activation key
  • Account management
  • Preferences and user data

Settings Page

  • Theme customization (Dark/Light mode)
  • Notification preferences
  • Auto-update configuration
  • Cache and data management

Learn More

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages