Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,45 @@ NEXT_PRIVATE_LOGGER_FILE_PATH=

# [[PLAIN SUPPORT]]
NEXT_PRIVATE_PLAIN_API_KEY=

# [[DISCOVERY — „Dokumente finden"]]
# Wählt das Discovery-Reader-Backend für die Funktion „Dokumente finden".
# Optionen:
# "db" (Default) – liest aus der DiscoveryDocument-Tabelle (Source-Sync und
# manueller Intake-Upload schreiben dort hinein).
# "paperless" – externer Indexdienst per REST-API.
# "null" – Stub, leere Listen.
NEXT_PRIVATE_DISCOVERY_TRANSPORT="db"

# Pflicht, wenn TRANSPORT="paperless":
NEXT_PRIVATE_DISCOVERY_PAPERLESS_URL=""
NEXT_PRIVATE_DISCOVERY_PAPERLESS_TOKEN=""

# [[SOURCES — IMAP-Sync]]
# Eigener Schlüssel zur Verschlüsselung der IMAP-Credentials. Mind. 32 Zeichen.
# Falls leer, wird NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY als Fallback genutzt —
# eigener Schlüssel ist aber dringend empfohlen, damit IMAP-Credentials
# unabhängig vom Rest rotiert werden können.
NEXT_PRIVATE_IMAP_CREDENTIAL_KEY=""

# Custom-Hosts erlauben? Wenn "true", können Nutzer eigene IMAP-Server eintragen.
# Default-Mainstream-Hosts (Gmail, Outlook, Fastmail, T-Online, GMX, Web.de,
# Mailbox.org, Posteo, iCloud, Yahoo) sind immer erlaubt. Custom-Hosts werden
# per DNS gegen private und reservierte IP-Bereiche geprüft.
NEXT_PRIVATE_IMAP_ALLOW_CUSTOM_HOSTS="false"

# Optional: zusätzliche Hostnames zur Allowlist (komma-getrennt). Werden auch
# bei `NEXT_PRIVATE_IMAP_ALLOW_CUSTOM_HOSTS=false` akzeptiert.
NEXT_PRIVATE_IMAP_HOST_ALLOWLIST=""

# Filesystem-Pfad für das Discovery-Archiv (Mail.eml + Body + Anhänge +
# metadata.json + sha256). Pro Mail wird ein Ordner
# <archive>/<sourceId>/<yyyy>/<mm>/<messageIdHash>/ angelegt. Read-only nach
# dem Schreiben (chmod 0440 / 0550), GoBD-Beweisfähigkeit via sha256-Hashes
# pro Datei. In der Compose-Variante ist /var/lib/nexasign/sources im
# Container, gemounted vom Host-Pfad ARCHIVE_HOST_PATH.
NEXT_PRIVATE_DISCOVERY_ARCHIVE_PATH="/var/lib/nexasign/sources"

# Host-Pfad für den Volume-Mount (nur in docker-compose nötig). Hier landet
# dein per FTP/SCP erreichbares Archiv.
# ARCHIVE_HOST_PATH="/var/lib/nexasign-archive"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ Emilian Buza.jpg
img/26864.jpg
packages/assets/images/emilian.webp

# Logo-Backups (Originale liegen nur lokal als Wiederherstellungs-Punkt)
img/*.original.png

# Generierte Logo-Artefakte (Zwischenstände bei Logo-Generierung)
tmp-logo/

Expand All @@ -98,6 +101,8 @@ tmp-logo/
# Diese Dateien gehören in ein privates NexaStack-Infra-Repo, nicht hierher.
# Falls sie versehentlich lokal landen, blockiert .gitignore das Tracking.
archive/
!packages/lib/server-only/sources/archive/
!packages/lib/server-only/sources/archive/**
demo/
Demo/
DEMO.nexasign.md
Expand Down
6 changes: 3 additions & 3 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# NexaSign Architecture
# NexaFile Architecture

This document provides a high-level overview of the NexaSign codebase to help humans and agents understand how the application is structured.
This document provides a high-level overview of the NexaFile codebase to help humans and agents understand how the application is structured.

## Overview

NexaSign is an open-source document signing platform built as a **monorepo** using npm workspaces and Turborepo. The application enables users to create, send, and sign documents electronically.
NexaFile is an open-source document lifecycle platform built as a **monorepo** using npm workspaces and Turborepo. The application enables users to find, create, send, sign, and archive documents.

```
┌─────────────────────────────────────────────────────────────────────────────┐
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<!-- © 2026 NexaStack, NexaSign contributors -->

# Contributing to NexaSign
# Contributing to NexaFile

Danke für Ihr Interesse an NexaSign. Beiträge (Bugfixes, Features, Docs,
Danke für Ihr Interesse an NexaFile. Beiträge (Bugfixes, Features, Docs,
Übersetzungen) sind willkommen.

## Quick links
Expand Down Expand Up @@ -36,6 +36,6 @@ Erforderlich: Node.js ≥ 22, Docker, npm 10+.

## Lizenz der Beiträge

Mit Ihrem Beitrag zu NexaSign erklären Sie sich einverstanden, dass Ihr Code
Mit Ihrem Beitrag zu NexaFile erklären Sie sich einverstanden, dass Ihr Code
unter **AGPL-3.0-or-later** lizenziert wird — derselben Lizenz wie der Rest
des Projekts. Kein separates CLA erforderlich. Siehe [LICENSE](LICENSE).
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<!-- © 2026 NexaStack, NexaSign contributors -->

# NexaSign
# NexaFile

**Die deutsche, selbstgehostete Alternative zu DocuSign.**
**Die deutsche, selbstgehostete Dokumentenplattform für Finden, Signieren und Archivieren.**

NexaSign signiert elektronische Dokumente rechtskonform nach eIDAS — komplett
in Ihrer eigenen Infrastruktur. Keine Daten in US-Clouds, kein Abo-Zwang,
keine Drittanbieter-Server im Signatur-Pfad.
NexaFile findet, signiert und archiviert elektronische Dokumente in Ihrer eigenen
Infrastruktur. Keine Daten in US-Clouds, kein Abo-Zwang, keine Drittanbieter-Server
im Signatur- oder Archiv-Pfad.

Gepflegt von [NexaStack](https://nexastack.co/) als Open-Source-Projekt unter
AGPL-3.0-or-later.

---

## 🔎 NexaSign live ausprobieren, bevor Sie selbst hosten
## 🔎 NexaFile live ausprobieren, bevor Sie selbst hosten

**→ [nexasign-demo.nexastack.co](https://nexasign-demo.nexastack.co)**

Expand All @@ -28,7 +28,14 @@ ersten Eindruck zu bekommen, bevor Sie den eigenen Stack aufsetzen.

---

## Was NexaSign kann
## Was NexaFile kann

**Dokumente finden und übernehmen:**

- IMAP-Quellen gezielt für frei wählbare Datumsbereiche synchronisieren
- E-Mails, Anhänge, Body-Dateien und Metadaten lokal archivieren
- Gefundene Belege prüfen, akzeptieren und mit Retention-Start versehen
- Auditierbare Discovery-Logs und Exportfähigkeit für Betriebsprüfungen

**E-Signatur, rechtskonform und self-hosted:**

Expand Down Expand Up @@ -61,7 +68,7 @@ ersten Eindruck zu bekommen, bevor Sie den eigenen Stack aufsetzen.

## Hinweis zur Schriftform

NexaSign erzeugt **einfache und fortgeschrittene elektronische Signaturen (EES/AES)**.
NexaFile erzeugt **einfache und fortgeschrittene elektronische Signaturen (EES/AES)**.
Das reicht für die allermeisten Verträge im deutschen Geschäftsalltag
(AGB-Zustimmungen, NDAs, Freelance-Verträge, Dienstleistungen, Angebote), da
diese nach § 125 BGB formfrei sind.
Expand All @@ -70,13 +77,13 @@ Für Verträge mit gesetzlicher **Schriftform-Pflicht** (z. B. Mietverträge
> 1 Jahr, bestimmte Kündigungen, Arbeitszeugnisse) wird eine **qualifizierte
elektronische Signatur (QES)** nach eIDAS Art. 25 benötigt. Diese erfordert
einen akkreditierten Vertrauensdiensteanbieter (z. B. D-Trust / Bundesdruckerei)
und ist in NexaSign aktuell **nicht** integriert.
und ist in NexaFile aktuell **nicht** integriert.

---

## Hinweis zu GoBD und Aufbewahrung

NexaSign liefert **GoBD-Tooling** (WORM-Strict-Mode, 10-Jahres-Retention nach
NexaFile liefert **GoBD-Tooling** (WORM-Strict-Mode, 10-Jahres-Retention nach
§ 147 AO / § 257 HGB, Z2/Z3-Export-CLI mit SHA-256-Manifest). Das ist die
technische Basis für eine GoBD-orientierte Aufbewahrung — **nicht** der
fertige GoBD-Nachweis.
Expand All @@ -92,7 +99,7 @@ abgestimmt. Eine Vorlage für die Verfahrensdokumentation liegt unter

## Installation (Self-Hosting)

NexaSign besteht aus zwei Teilen:
NexaFile besteht aus zwei Teilen:

1. **E-Signatur-App** — Docker, Port 3060 (Pflicht)
2. **Vorlagen-Tools** (`/vorlagen/*`, AV-Vertrag, X-Rechnung, GoBD) — PHP auf Host, **optional**
Expand Down Expand Up @@ -199,11 +206,12 @@ Details in [CONTRIBUTING.md](CONTRIBUTING.md).
- **Haftung:** Die Software wird **ohne jede Gewährleistung** bereitgestellt
(§§ 15/16 AGPL-3.0). Bei unentgeltlicher Überlassung gilt zusätzlich § 521
BGB analog — Haftung nur bei Vorsatz und grober Fahrlässigkeit.
- **Keine Rechtsberatung:** Die Ausgabe einer Signatur durch NexaSign ersetzt
- **Keine Rechtsberatung:** Die Ausgabe einer Signatur durch NexaFile ersetzt
**keine juristische Prüfung** der unterzeichneten Dokumente.
- **Betrieb als Service:** AGPL-3.0 verlangt, dass alle Nutzer des Services
Zugang zum Quellcode haben. Der gesamte NexaSign-Source liegt öffentlich
in diesem Repo.
Zugang zum Quellcode haben. Der gesamte NexaFile-Source liegt öffentlich
in diesem Repo. Technische Paket-, Docker- und Datenbanknamen verwenden in V1
aus Kompatibilitätsgründen teilweise weiterhin `nexasign`.

## Sicherheit

Expand Down
71 changes: 71 additions & 0 deletions RELEASE-V1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# NexaFile V1 Release Plan

This file defines the practical V1 scope for NexaFile. Package names,
Docker service names, database names, and CLI filenames may stay `nexasign`
for V1 to avoid risky infrastructure churn. User-facing product copy should
move to `NexaFile`.

## V1 Product Scope

NexaFile V1 is a self-hosted document lifecycle for German small and midsize
businesses:

1. Create documents: contract templates, AV-Vertrag, X-Rechnung/ZUGFeRD tools.
2. Find documents: IMAP sources, explicit date-range sync, invoice/document
detection, server-side mail and attachment archive.
3. Sign documents: the existing signing workflow, recipients, fields, audit log,
signed PDF sealing.
4. Archive documents: GoBD-oriented retention start, WORM guards, SHA-256 based
export package, retention reporting.

## Explicitly Not V1

- Qualified electronic signatures (QES).
- Background auto-sync every few minutes.
- Cloud sources beyond IMAP.
- Full-text document search across all archived bytes.
- Formal GoBD certification or legal/tax advice.
- Renaming all internal package names, DB containers, service names, and CLI
filenames from `nexasign` to `nexafile`.

## Release-Critical Checks

- Fresh install from `docker/nexasign/compose.yml` on a clean host.
- Prisma migrations deploy cleanly, including Discovery retention backfill.
- Signing happy path completes and produces sealed PDFs.
- IMAP source can be created with allowed host, explicit SyncRun can import a
PDF invoice, and duplicate SyncRuns do not duplicate `DiscoveryDocument`s.
- `Dokumente finden` can accept, archive, ignore, create a signing document,
download artifacts, and export selected documents as ZIP.
- GoBD export includes completed Envelopes, accepted DiscoveryDocuments,
Discovery audit logs, mail artifacts, document PDFs, and `manifest.sha256`.
- Retention check reports both completed Envelopes and accepted
DiscoveryDocuments without deleting anything.
- Security checks cover IMAP host validation, path traversal prevention for
artifacts and ZIP export, ZIP size limits, team/user isolation, and HTML mail
display restrictions.

## Rebranding Policy

Use `NexaFile` in visible product UI, README/installation copy, metadata,
OpenGraph titles, email copy, and docs. Keep `NexaSign` where it is part of
compatibility-sensitive identifiers for V1:

- npm package names such as `@nexasign/*`
- Docker compose project/container/volume names
- database names and migration history
- existing CLI filenames and systemd unit filenames
- legacy attribution to the NexaSign fork history

## V1 Release Sequence

1. Finish and review current Discovery/GoBD local changes.
2. Apply and test the Discovery retention backfill migration.
3. Complete user-facing NexaFile copy pass.
4. Add focused Discovery/GoBD checks to the release gate.
5. Run the release gate and fresh-install smoke test.
6. Deploy demo, manually verify the four-step navigation and core workflows.
7. Tag `v1.0.0-rc.1`.
8. Fix release-candidate findings.
9. Tag `v1.0.0`.

Loading
Loading