Blue Fox offers a comprehensive solution for building desktop-first applications with a focus on simplicity and efficiency. Featuring a React front-end, NestJS backend, and Tauri for desktop shell management, this starter kit comes with essential features like authentication, flexible data persistence, and more, tailored for product teams.
Blue Fox: Ultimate Desktop Starter Kit
Blue Fox is a powerful commercial full-stack starter kit designed specifically for building desktop-first applications utilizing NestJS, React, and Tauri. This repository serves as a public documentation hub, providing insight into an Nx monorepo that includes well-structured code and ready-to-use components.
Key Features
- A fully-featured React desktop client built with Mantine UI.
- A NestJS API sidecar equipped with JWT authentication and cookie fallback capabilities.
- A shared package for interface types, available as
@blue-fox/api-interfaces. - Comprehensive authentication, user management, and dashboard flows, easily extendable as per project needs.
- Built-in internationalization (i18n) support, currently offering translations in English (en), German (de), and Ukrainian (ua).
Advantages of Using Blue Fox
- The architecture is optimized for desktop applications, enabling seamless Tauri sidecar process management.
- Quickly bootstrap projects with essential features such as authentication, user management, and API documentation.
- Offers flexible persistence options, supporting SQLite, PostgreSQL, or MongoDB through dynamic configuration.
- Ideal for development teams operating under a commercial license model, especially for product teams and client project deliveries.
Technology Stack
- Monorepo: Nx
- Frontend: React, Vite, Mantine, React Router
- Desktop shell: Tauri (v2, utilizing Rust)
- Backend: NestJS, Passport JWT, Swagger
- Data Layer: TypeORM with support for multiple databases
- Testing: Vitest, Playwright, Jest
Directory Structure Overview
apps/
client/ # React desktop UI
server/ # NestJS API sidecar
client-e2e/ # Playwright smoke tests
server-e2e/ # Jest end-to-end scaffolds
libs/
api-interfaces # Shared contracts and DTO interfaces
src-tauri/
src/main.rs # Tauri bootstrap and sidecar orchestration
tauri.conf.json
LICENSE.md # Commercial license agreement
PRODUCTION_CHECKLIST.md
Authentication and Environment Configuration
Blue Fox supports a robust authentication model:
- The API provides endpoints such as
POST /api/auth/loginthat return access tokens for user authentication. - Configuration can be done through environment variables for easy adaptation to different deployment settings.
- Example configuration for PostgreSQL:
set DB_TYPE=postgres
set DB_HOST=localhost
set DB_PORT=5432
set DB_USERNAME=postgres
set DB_PASSWORD=your_password
set DB_NAME=blue_fox_db
Quick Start Guide
For developers looking to get started quickly, follow the recommended commands to install dependencies and run the application:
npm install
npm run fox:dev
This command builds the NestJS server bundle, packages it for Tauri, and starts the development mode for the React frontend.
API Overview
The API base URL dynamically adjusts during runtime (http://localhost:<sidecar-port>/api). Key endpoints include:
GET /api- Retrieve sidecar information and versioning.- User authentication and management endpoints such as
GET /api/auth/profileandPOST /api/auth/register.
Next Steps for Production
Before deploying the application, consult the PRODUCTION_CHECKLIST.md for essential settings and optimizations. Key recommendations include:
- Updating JWT secret values, configuring database settings, and securing CORS.
Conclusion
With its comprehensive features and architecture tailored for desktop applications, Blue Fox provides a solid foundation for developing robust and scalable applications using modern technologies.
No comments yet.
Sign in to be the first to comment.