A powerful desktop writing application built for professional authors
- 🤖 AI-Powered Writing: Integrated OpenAI and Gemini for real-time writing assistance and deep project analysis
- 📚 Project Management: Organize novels, characters, plot structures, and notes in one place
- ✍️ Multi-Editor Support: Rich text editing with Tiptap and code/markdown with CodeMirror
- 🎨 Beautiful UI: Modern, distraction-free interface built with React 19 and TailwindCSS
- 🔒 Privacy-First: All data stored locally with SQLite, no telemetry or tracking
- ⚡ High Performance: Optimized memory management and 6-level hardware acceleration
- 🔐 Security-Focused: Multi-layer security with CSP, contextBridge isolation, and secure IPC
Get the latest version from GitHub Releases:
- macOS:
Loop-{version}-arm64.dmg(Apple Silicon M1/M2/M3)Loop-{version}.dmg(Intel)
- Windows:
Loop Setup {version}.exe
If you see "Loop is damaged and can't be opened", this is due to macOS Gatekeeper. Run this command in Terminal:
xattr -cr /Applications/Loop.appThen restart the app. More troubleshooting tips →
Loop is built on a modern 3-layer Electron architecture:
┌─────────────────────────────────────────────────┐
│ Renderer Process (React 19 + React Router 7) │
│ - UI Components, State Management, Editors │
└─────────────────┬───────────────────────────────┘
│ IPC (Type-Safe)
┌─────────────────▼───────────────────────────────┐
│ Preload (contextBridge) │
│ - Secure API Exposure, Node.js Isolation │
└─────────────────┬───────────────────────────────┘
│ IPC
┌─────────────────▼───────────────────────────────┐
│ Main Process (Electron + Node.js) │
│ - 16 Managers, IPC Handlers, Security, DB │
└─────────────────────────────────────────────────┘
Learn more about the architecture →
| Category | Technology |
|---|---|
| Desktop Framework | Electron 38.1.2 LTS |
| UI Library | React 19 |
| Routing | React Router DOM 7 |
| Language | TypeScript 5 (strict mode) |
| Build Tool | Vite + electron-vite 4.0 |
| Database | Prisma 6 + SQLite |
| Editors | Tiptap 2.24+, CodeMirror 6 |
| Styling | TailwindCSS 3.4 |
| State | Zustand 5 (minimal), useState, Prisma |
| AI | OpenAI API, Google Gemini SDK |
| Cloud | Firebase 12.3 (Auth, Firestore) |
| Package Manager | pnpm 10.17+ |
- Node.js: 20+ (LTS recommended)
- pnpm: 9+ (required, do not use npm/yarn)
- Git: Latest version
-
Clone the repository
git clone https://github.com/maildan/loop.git cd loop -
Install dependencies
pnpm install
-
Setup environment variables
cp .env.example .env # Edit .env with your API keys (OpenAI, Gemini, Firebase) -
Initialize database
pnpm prisma generate pnpm prisma migrate dev
-
Run development server
pnpm dev
This will start both the Electron app and Vite dev server.
pnpm dev # Start development server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm lint # Run ESLint
pnpm test # Run tests (Vitest)
pnpm test:e2e # Run E2E tests (Playwright)loop/
├── src/
│ ├── main/ # Electron main process
│ │ ├── core/ # ApplicationBootstrapper, ManagerCoordinator
│ │ ├── handlers/ # IPC handlers (32 total)
│ │ ├── managers/ # 16 managers (Memory, Security, etc.)
│ │ └── services/ # Business logic (Prisma, AI, etc.)
│ ├── preload/ # contextBridge security layer
│ │ └── index.ts # API exposure (10 categories)
│ ├── renderer/ # React application
│ │ ├── src/
│ │ │ ├── routes/ # 7 routes (Dashboard, Projects, etc.)
│ │ │ ├── components/
│ │ │ ├── hooks/
│ │ │ ├── stores/ # Zustand (minimal, 1 store)
│ │ │ └── contexts/ # React contexts
│ │ └── main.tsx # React entry point
│ └── shared/ # Shared types, DTOs, utilities
│ ├── types/
│ ├── services/ # AI services (Gemini, OpenAI)
│ └── ipc/ # IPC contracts
├── prisma/
│ └── schema.prisma # Database schema (17 models)
├── docs/ # Documentation
├── test/ # Tests
└── scripts/ # Build and utility scripts
- Architecture Overview - System design and patterns
- Development Guide - Setup and debugging
- Database Schema - Prisma models and optimization
- Contributing Guide - How to contribute
- Troubleshooting - Common issues and solutions
We welcome contributions! Please see our Contributing Guide for details.
- Use pnpm exclusively (not npm/yarn)
- Follow TypeScript strict mode
- Write tests for new features
- Follow Conventional Commits
- Ensure all checks pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
Built with:
Made with ❤️ for writers