Skip to content

Desktop App#105

Open
zachbresler21 wants to merge 2 commits intostagingfrom
desktop-app
Open

Desktop App#105
zachbresler21 wants to merge 2 commits intostagingfrom
desktop-app

Conversation

@zachbresler21
Copy link
Copy Markdown
Contributor

What

Added Electron desktop application support to enable running Pager as a native desktop app across Windows, macOS, and Linux platforms.

Why

  • Better user experience: Native desktop app with proper window management, system integration, and
    offline capabilities
    • Professional deployment: Distribute Pager as a standalone application without browser dependencies
    • Enhanced productivity: Users can access Pager directly from their desktop/dock without opening a
      browser
    • System integration: Future potential for desktop notifications, file system access, and OS-specific
      features

How

Using Electron to wrap the existing Next.js application with the following approach:

  • Smart server management: Development mode uses existing dev server, production mode starts embedded
    Next.js server
  • Full feature preservation: All API routes, authentication, real-time features, and routing work
    identically
  • Electron-aware navigation: Custom redirect handling to ensure Next.js redirects work properly in the
    Electron environment
  • Cross-platform builds: Configured electron-builder for Windows, macOS, and Linux distribution
  • Security hardening: Disabled node integration, enabled context isolation, and implemented secure
    preload scripts

Testing

  • Tested locally with npm run dev
  • Ran quality checks with npm run check-all
  • Tested in multiple browsers (if UI changes)
  • Verified accessibility (if UI changes)

Describe specific testing steps you took.

Screenshots

Checklist

  • Code follows the project's style guidelines
  • Self-review of the code completed
  • Code is properly commented (if complex)
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Linked related issues (if any)

Related Issues

Additional Notes

New Scripts Available:

  • npm run electron - Start development mode
  • npm run dist - Build for all platforms
  • npm run dist:mac - Build for macOS only
  • npm run dist:win - Build for Windows only
  • npm run dist:linux - Build for Linux only

Architecture Notes:

  • Reuses 100% of existing Next.js codebase without modifications
  • Production builds include embedded Next.js server to support API routes
  • Custom redirect handling ensures Next.js middleware works properly in Electron
  • All existing features (authentication, real-time, file handling) work identically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant