Feel free to ask any questions regarding building using issues.
- Git: Version control system
- Node.js:
v21(recommended) - pnpm: Package manager - Install with
npm install -g pnpmorcorepack enable
- Windows: Windows 10+ (Windows 11 recommended)
- macOS: macOS 10.15+ (Catalina or later)
- Linux: Ubuntu 20.04+, Debian 11+, or equivalent
git clone https://github.com/mienaiyami/yomikiru/
cd yomikiru
# install dependencies
pnpm install
# run dev build
pnpm dev
# build for current OS (output in ./out)
pnpm package
# or
pnpm make:zip64
# or check `make:` commands in package.json scripts for more optionsOutput is in ./out folder.
Check package.json, forge.config.ts -> makers and https://www.electronforge.io/config/makers for more options.
Yomikiru uses Drizzle ORM with SQLite as the database backend to store user data like library items, reading progress, bookmarks, and notes.
The database is configured in drizzle.config.ts:
- Database: SQLite (
data.db) - Schema:
src/electron/db/schema.ts - Migrations:
drizzle/directory
# Generate migrations after schema changes
pnpm drizzle:generate
# Push schema changes to database (for development)
pnpm drizzle:push
# Apply migrations to database
pnpm drizzle:migrate
# Open Drizzle Studio (database viewer/editor)
pnpm drizzle:studioDatabase operations are exposed to the renderer process through IPC handlers in src/electron/ipc/database.ts. The main process handles all database operations and sends change notifications to renderer windows.
- Development:
data.dbin project root - Production:
data.dbin app's userData directory - Portable:
userdata/data.dbrelative to app executable
- Schema Changes: Edit
src/electron/db/schema.ts - Generate Migration: Run
pnpm drizzle:generate - Apply Changes: Run
pnpm drizzle:migrateorpnpm drizzle:push - View Database: Use
pnpm drizzle:studioor any other database viewer to inspect data
# Start development server
pnpm dev
# The app will automatically reload when you make changes to:
# - React components (renderer process)
# - Main process code (with restart)
# - Styles and assets# Run all checks
pnpm lint
# Fix auto-fixable issues
pnpm eslint --fix
# Check TypeScript types
pnpm tslint- Main Process: Use VS Code debugger or
console.logstatements - Renderer Process: Use Chrome DevTools (Ctrl+Shift+I in development)
- Database: Use
pnpm drizzle:studioor any other database viewer to inspect database state - Logs: Check
logs/main.login userData directory
# 64-bit (recommended)
pnpm make:win64
# 32-bit (legacy systems)
pnpm make:win32
# Installer only
pnpm make:exe64# Debian/Ubuntu package
pnpm make:deb
# Generic ZIP
pnpm make:zip64# ZIP package
pnpm make:zip64
# Note: macOS specific builds may require additional setup-
Native Module Compilation Errors
# Clear node_modules and reinstall rm -rf node_modules pnpm-lock.yaml pnpm install # Rebuild native modules pnpm rebuild:electron
-
SQLite/Database Issues
# Delete database and restart rm data.db pnpm dev -
Build Failures
# Clean build artifacts rm -rf .webpack out pnpm package -
Permission Issues (Linux)
# Make sure you have build tools sudo apt-get install build-essential
- Follow the existing TypeScript and React patterns
- Use the provided ESLint configuration
- Write meaningful commit messages
- Test your changes on different platforms when possible
Note
Native modules need to compiled for electron's node version. If you have issues with native modules, try running pnpm rebuild:node or pnpm rebuild:electron to rebuild native modules for electron.
Try removing node_modules and running pnpm install again if you still have issues.
Contact me if you have issues.