A modern monorepo containing a desktop Electron application, landing page, and web SaaS platform built with TypeScript, React, and Next.js.
This monorepo contains three main applications:
apps/
├── desktop/ # Electron desktop application
├── landing/ # Marketing landing page (Next.js)
└── web/ # Main SaaS web application (Next.js)
- Node.js >= 18.0.0
- Bun >= 1.2.14 (recommended package manager)
- Git
-
Clone the repository
git clone <repository-url> cd singularity-desktop
-
Install dependencies
bun install
-
Set up environment variables
Copy the example environment files and configure them:
# For web app cp apps/web/.env.example apps/web/.env.local # For landing page cp apps/landing/.env.example apps/landing/.env.local
Configure the following environment variables:
CLERK_SECRET_KEYMONGODB_URINEXT_PUBLIC_CLERK_PUBLISHABLE_KEYNEXT_PUBLIC_CLERK_SIGN_IN_URL
Start all applications in development mode:
bun run devThis will start:
- Desktop app: Electron application with hot reload
- Landing page: Next.js dev server on
http://localhost:3000 - Web app: Next.js dev server on
http://localhost:3001
cd apps/desktop
bun run devAvailable scripts:
bun run dev- Start development with file watchingbun run dev:nowatch- Start development without file watchingbun run build- Build the applicationbun run build:win- Build for Windowsbun run build:mac- Build for macOSbun run build:linux- Build for Linux
cd apps/landing
bun run devAvailable scripts:
bun run dev- Start development serverbun run build- Build for productionbun run start- Start production serverbun run preview- Preview with OpenNext Cloudflarebun run deploy- Deploy to Cloudflare
cd apps/web
bun run devAvailable scripts:
bun run dev- Start development serverbun run build- Build for productionbun run start- Start production serverbun run test- Run testsbun run test:e2e- Run end-to-end testsbun run db:generate- Generate database migrationsbun run db:migrate- Run database migrationsbun run db:studio- Open database studio
bun run build# Desktop app
cd apps/desktop && bun run build
# Landing page
cd apps/landing && bun run build
# Web app
cd apps/web && bun run buildbun run testcd apps/web
bun run test # Unit tests
bun run test:e2e # End-to-end testsbun run lint # Lint all applications
bun run lint:fix # Fix linting issuesbun run check-types # Check TypeScript typesbun run format # Format code with Prettier- Electron - Cross-platform desktop app framework
- Electron Vite - Build tooling
- React - UI framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Radix UI - UI components
- Next.js 15 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Framer Motion - Animations
- Lottie - Interactive animations
- OpenNext Cloudflare - Deployment platform
- Next.js 15 - React framework
- TypeScript - Type safety
- Clerk - Authentication
- Drizzle ORM - Database ORM
- Tailwind CSS - Styling
- Vitest - Testing framework
- Playwright - E2E testing
- Storybook - Component documentation
cd apps/landing
bun run deployBuild platform-specific distributables:
cd apps/desktop
bun run build:win # Windows
bun run build:mac # macOS
bun run build:linux # LinuxBuild and deploy to your preferred hosting platform:
cd apps/web
bun run build- Turbo - Monorepo build system
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Type checking
- Husky - Git hooks
- Commitizen - Conventional commits
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.