Rechly
Rechly is an open-source invoicing app for freelancers and small businesses. In addition to the Next.js web application, Rechly is available as a standalone 100% offline desktop application: Rechly Desktop.
Desktop Edition (100 % Offline)
Prefer running everything locally without cloud or account requirements? Rechly Desktop stores all data on-device in a local vault:
- 100% Offline & Privacy-First: No internet connection, cloud login, or remote server required.
- E-Rechnung: XRechnung 3.0 & ZUGFeRD 2.3 XML export for German B2B e-invoicing compliance (EN 16931).
- DATEV Export: Standard DATEV EXTF format 700 CSV export for tax consultants (Steuerberater).
- Optional Local AI: Natural language text-to-invoice quick fill with local Ollama models (e.g.
jonprompter/Rechly-DE-3B). - Downloads:
Stack
- Next.js App Router, React, TypeScript, Ant Design
- Appwrite for auth, database, and server-side admin operations
Repository Layout
src/- web app routes, UI, shared services, and client/server Appwrite codepublic/- static assets and favicons
Prerequisites
- Node.js 20+
- npm
- An Appwrite project with the database and collections used by the app
Web App Setup
- Install dependencies:
npm install
- Copy the example environment file and fill in your values:
cp .env.example .env.local
- Start the app:
npm run dev
The app expects the Appwrite database and collections defined in src/lib/appwrite.ts and src/lib/appwrite-server.ts. Rechly does not yet ship Appwrite provisioning automation, so self-hosters need to create those resources in their own Appwrite project.
Analytics
Revenue forecasting, late-payment risk scoring, customer segmentation, and anomaly detection are computed directly in the Next.js API route (/api/analytics/insights). No external ML service is required — the app trains a lightweight logistic regression model on the fly using your invoice history.
Open-Source Release Notes
- Do not commit
.env.localor any real credentials. - Rotate any secrets that existed in local or historical tracked files before publishing this repository.
- Google Analytics is disabled by default unless
NEXT_PUBLIC_GOOGLE_ANALYTICS_IDis set. - All deploy-specific URLs, repo links, and contact details should be configured via environment variables.
- User-provided AI API keys are encrypted server-side and require
AI_SETTINGS_ENCRYPTION_SECRETto be set. - AI requests are rate-limited per user through
AI_DAILY_REQUEST_LIMITto reduce accidental provider cost spikes.
Development Commands
npm run dev
npm run build
npm run start
npm run lint
npm run test:einvoice
Optional E-Invoice Details
Customers can store buyer identifiers and multiple delivery branches; company settings support seller identifiers. New invoices allow buyer/delivery overrides and optional item GTINs. Advanced fields stay collapsed until needed, with German and English labels. Customer retrieval has no fixed record cap.
Before deploying, run the additive Appwrite migration. See setup, field mappings, tests and validation limits. The export test corpus passes KoSIT XRechnung 3.0.2, veraPDF PDF/A-3b and Mustang Factur-X checks. See validation evidence and reproduction steps.
Electron Development Wrapper
This repository also includes an Electron wrapper for developing the dashboard against an on-device SQLite database. It requires Node.js 24 for development, does not require Appwrite, and stores data in the operating system's application-data directory. The published desktop app and its downloads are maintained in the separate Rechly Desktop repository.
# Start Next.js and Electron in local desktop mode
npm run desktop:dev
# Build an unpacked app for the current operating system
npm run desktop:pack
# Build an installer for the current operating system
npm run desktop:dist
The desktop File menu can open the local data directory and create a consistent SQLite backup. Windows, macOS, and Linux installers are configured; release installers still need platform signing before distribution.
Related Repositories
| Repository | Description |
|---|---|
| rechly_web | Next.js web application (this repo) |
| rechly_desktop | 100% offline desktop application for Windows and macOS |
Current Gaps
- Appwrite infrastructure is documented but not auto-provisioned.
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only).
