PitchHut logo
White Fox: Ultimate Desktop Starter Kit
White Fox helps you launch production-minded desktop applications faster with a modular monorepo.
Pitch

Build cross-platform desktop products with a modern TypeScript stack Reuse a proven monorepo architecture instead of starting from scratch Ship faster with prewired frontend, backend, authentication, and packaging

Description

White Fox: Ultimate Desktop Starter Kit Commercial desktop starter kit built with Electron + Angular + NestJS + Nx.

White Fox helps you launch production-minded desktop applications faster with a modular monorepo, authentication starter flow, API docs, and ready-to-package distribution setup.

Product Positioning This repository is a commercial starter kit designed for developers, studios, and agencies who want to:

Build cross-platform desktop products with a modern TypeScript stack Reuse a proven monorepo architecture instead of starting from scratch Ship faster with prewired frontend, backend, authentication, and packaging Key Value End-to-end stack in one workspace: Electron shell + Angular UI + NestJS API Monorepo productivity with Nx task orchestration and scalable project layout Built-in authentication baseline (register/login + JWT) Database-ready backend (SQLite, PostgreSQL, MongoDB modes) Swagger docs out of the box for fast API integration Electron Builder configuration included (Windows NSIS target) Core vs Advanced Use this starter in two layers:

Core (recommended for first shipping version): secure Electron baseline, auth starter, API process bootstrap, packaging, lint/test CI, packaged smoke test. Advanced (optional, enable when needed): crash reporter uploads, release channels, custom readiness tuning, deeper release automation. If you are selling a v1 product, focus on Core first and keep Advanced settings disabled.

Tech Stack Monorepo: Nx 22.x Desktop: Electron 40.x Frontend: Angular 21.x, Angular Material, SCSS Backend: NestJS 11.x, TypeORM Language: TypeScript 5.9 Testing: Jest, Vitest, Playwright Packaging: electron-builder What Is Included Frontend (apps/client-app) Angular standalone app architecture Auth screens: Login / Register App shell + header layout Home feature with basic user management UI flow HTTP interceptor and core service layer Backend (apps/server-api) NestJS modular architecture Auth module (/api/auth/register, /api/auth/login) Users module (/api/users CRUD subset, JWT-protected) JWT support TypeORM integration with environment-driven DB provider Swagger docs at runtime (/api/docs) Desktop Shell (apps/electron-shell) Electron main process with preload bridge Runtime API process bootstrap from Electron Dynamic API port allocation API readiness handshake before renderer load Environment-driven app title and window size Structured JSON logs for startup/runtime failures Optional crash reporter setup with release channel metadata Packaging configuration for distributable builds Architecture Overview Nx Monorepo +- apps/client-app -> Angular renderer (UI) +- apps/server-api -> NestJS API (auth/users + docs) +- apps/electron-shell -> Electron main/preload + app packaging At development runtime, Electron starts the backend process and loads the Angular client (dev server URL or packaged static build).

Prerequisites Node.js 20+ (recommended LTS) npm 10+ Windows/macOS/Linux development environment Quick Start 5-Minute Onboarding npm install npx nx serve electron-shell This starts the full desktop development flow:

Angular client dev server Electron shell NestJS API process (spawned by Electron) Starter Commands (Core)

Full desktop dev mode

npx nx serve electron-shell

Frontend only

npx nx run client-app:serve

Backend only

npx nx run server-api:serve

Build packaged application (electron-builder)

npx nx run electron-shell:make Root npm Scripts

Main desktop development flow

npm run dev

Build all deployable apps

npm run build

Unit tests (frontend + backend)

npm run test

End-to-end checks

npm run e2e npm run e2e:packaged

Build distributable package

npm run package Quality and Release Commands

Lint frontend

npx nx run client-app:lint

Backend unit tests

npx nx run server-api:test

Frontend unit tests

npx nx run client-app:test

End-to-end tests (Playwright)

npx nx run client-app:e2e npx nx run electron-shell-e2e:e2e npx nx run electron-shell-e2e:e2e-packaged

Visualize workspace graph

npx nx graph Environment Configuration Project uses root .env.

Core Variables (Required)

Database

DB_TYPE=sqlite DB_NAME=database.sqlite

API

API_PORT_RANGE_START=3000

Client / App

CLIENT_DEV_URL=http://localhost:4200 APP_TITLE="White Fox"

Electron Window

WINDOW_WIDTH=1280 WINDOW_HEIGHT=800

Auth

JWT_SECRET=super-secret-key-change-me JWT_EXPIRES_IN=24h Advanced Variables (Optional)

Readiness tuning

API_HEALTHCHECK_PATH=/api/get-status API_READY_TIMEOUT_MS=20000 API_READY_RETRY_INTERVAL_MS=300

Release metadata

APP_CHANNEL=stable APP_ENV=production

API docs / CORS

SWAGGER_ENABLED=true CORS_ALLOWED_ORIGINS=http://localhost:4200,http://127.0.0.1:4200

Database behavior

DB_SYNCHRONIZE=false DB_LOGGING=none

Crash Reporting

CRASH_REPORTER_ENABLED=false CRASH_REPORTER_UPLOAD_URL= Database Modes Set DB_TYPE to one of:

sqlite (default, local file) postgres (requires DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME) mongodb (uses DB_URL) DB_LOGGING modes:

none / false / 0 -> disable SQL logging full -> enable full SQL logging unset -> warnings/errors only API Documentation Swagger is enabled in backend bootstrap (including production by default).

Base prefix: /api Docs path: /api/docs Runtime URL example:

http://localhost:3000/api/docs (or next free port started by Electron from API_PORT_RANGE_START) In desktop runtime, FINAL_API_PORT is injected by Electron automatically.

0 comments

No comments yet.

Sign in to be the first to comment.