Commit Graph
85 Commits
Author SHA1 Message Date
Z User 7f7f364183 93dd2eec-4a55-4753-8474-c1bbde1564e9 2026-10-27 18:52:56 +00:00
Z User 07147a758c feat: DATEV Export (EXTF v5.0) + iCal Fristen feed + UI buttons
DATEV Export:
- Real DATEV EXTF Buchungsstapel format (v700, semicolon-separated)
- Header line with metadata (consultant, client, year, currency)
- Data rows: Soll, Haben, Betrag, Belegdatum, Text, Belegnr, USt%
- Also supports simple CSV format
- Audit-logged
- Download button in SKR04/Buchführung tab

iCal Fristen Feed:
- Real .ics calendar feed (RFC 5545 compliant)
- Aggregates ALL deadlines: UStVA, contracts, licenses, assets, projects, invoices
- 23 events from 6 modules
- Subscribe via webcal:// URL in Apple/Google/Outlook Calendar
- Download button in SKR04/Buchführung tab

0 TypeScript errors, ESLint clean
2026-10-27 18:51:55 +00:00
Z User c184513b2a cc9d365d-6d71-4dbc-b48a-6bea87eb9854 2026-10-27 18:14:17 +00:00
Z User 6cbf0b2879 feat: Full company accounting — SKR04, doppelte Buchführung, GoBD Festschreibung
Haben-cloned features for complete company accounting:

SKR04 Kontenrahmen (21 Konten):
- Bestandskonten (Aktiv/Passiv): Bank, Kasse, EDV-Anlagen, Verbindlichkeiten
- Erlöskonten: Erlöse 19% USt, Fremdleistungen
- Aufwandskonten: Bezogene Leistungen, Bürobedarf, EDV-Kosten, Reisekosten, Löhne
- Steuerkonten: USt 19%/7%, abziehbare Vorsteuer

Doppelte Buchführung (Buchungssatz):
- Soll an Haben booking system
- Journal with lückenlose Nummerierung (BUC-2026-XXXX)
- Saldenliste (account balances per Konto)
- GoBD Festschreibung (immutable via SHA-256 hash)
- Reverse Charge and §19 UStG (Kleinunternehmer) flags

EÜR (Einnahmen-Überschuss-Rechnung):
- Anlage EÜR with AVEÜR line numbers
- § 4 Abs. 3 EStG computation
- Gewinn: €14.506 (2026)

Jahresabschluss (GoBD):
- Immutable year-end archive with SHA-256 hash chain
- Links to previous year (2025 → 2026)
- Festschreibung of all bookings in the year
- Aufbewahrungsfrist: 8 Jahre (GoBD) / 10 Jahre (§ 147 AO)

Jahreserklärungen:
- USt-Erklärung (yearly, more lines than monthly UStVA)
- Anlage EÜR, Einkommensteuer, Gewerbesteuer
- ELSTER submission tracking

Seed: 21 Konten, 7 Buchungssätze, 9 EÜR entries, 2 Jahreserklärungen, 1 Jahresarchiv
2026-10-27 18:13:04 +00:00
Z User 0d0fa6b5e1 bbb245ef-c23d-4d22-87ba-d5366d9def16 2026-10-27 17:41:53 +00:00
Z User 1573931c0f feat: Haben-clone + client portal privacy fix
Client Portal privacy (şirket sırrı):
- Removed PRD references from client-facing text
- Removed 'Projekt-isolierter Zugriff' technical term
- Changed to 'Sichere Verbindung' / 'Sicher geschützt'
- Onboarding overlay only shows to agency users (not portal)

Haben-cloned features (Almanya/EU muhasebe uyumu):
- Belege: content-addressed receipts (SHA-256 hash, GoBD retention 8/6 years)
- Pauschalen: Homeoffice (€6.92/day), Kilometer (€0.30/km), Verpflegung (€14/€24/€28)
  - EStG § 4 Abs. 5, § 9 Abs. 1 compliant rates (2026)
- Anlagen & AfA: Anlagenverzeichnis with linear depreciation
  - GWG (≤€800 Sofortabschreibung, § 6 Abs. 2 EStG)
  - Sammelposten (€251-€1000, § 6 Abs. 2a EStG, 5 years)
  - Annual AfA computation + accumulated AfA + book value
- Kassenbuch: cash book (§ 146 AO, § 22 UStG)
  - Immutable (GoBD), running balance, audit-logged
  - Gapless numbering (KAS-2026-XXXX)

Seed data: 5 Belege, 7 Pauschalen, 5 Anlagen, 5 Kassenbuch entries
TypeScript: 0 errors | ESLint: clean
2026-10-27 17:40:47 +00:00
Z User 3cb7532417 d7b304d4-c8e0-431e-b1b1-fcc645d323e1 2026-10-27 17:15:56 +00:00
Z User 49377bb2de feat: CSV Import for CRM (PRD §6.1: CSV import/export with mapping)
- Real RFC 4180 CSV parser (handles quoted fields, escaped quotes, newlines)
- 3-step import dialog: upload → map columns → result
- Column auto-detection (name/firma/company)
- Duplicate detection (name + website)
- Creates companies + optional persons
- Import audit-logged
- Result summary: created, skipped, errors
2026-10-27 17:15:00 +00:00
Z User 25451d77eb f2b43822-37b9-490c-b8bb-0888d61227a3 2026-10-27 16:53:07 +00:00
Z User 597bfbc3d8 feat: Recurring invoices + license suspend on dunning level 3 (PRD §6.4/§6.6)
- Recurring API: list contracts needing invoicing + run endpoint
- Auto-generate draft invoices for Wartung/SLA + Dienstvertrag contracts
- Automatic license suspension at dunning level 3 (PRD §6.4)
- Recurring billable expenses tracking
- MRR/ARR computation from contracts + expenses
- Prisma: added Contract.company + Expense.company relations
- Scheduler info (pg-boss monthly cron in production)
2026-10-27 16:51:58 +00:00
Z User c8b4be55f3 e558113a-99ae-4e5a-9db1-dcd3475a4e04 2026-10-27 16:28:08 +00:00
Z User 6c42c6525a feat: Data Management (DSGVO Art. 15/20/30 — export, inventory, retention)
- Data Management API: inventory (Art. 30 Verarbeitungsverzeichnis) + export
- JSON export with SHA-256 checksum (GoBD Jahresarchiv)
- CSV export (DATEV/Excel-compatible)
- Export history (audit-logged)
- Retention periods (8/6 years per GoBD)
- Art. 17 erasure notice (pseudonymization, legal precedence)
- 159 records across 10 categories with legal basis per category
2026-10-27 16:27:42 +00:00
Z User 1dd2563172 Merge branch 'main' of https://github.com/cetinmustafa83/aos
# Conflicts:
#	.env
#	.gitignore
#	Caddyfile
#	bun.lock
#	components.json
#	db/custom.db
#	eslint.config.mjs
#	next.config.ts
#	package.json
#	postcss.config.mjs
#	prisma/schema.prisma
#	public/logo.svg
#	public/manifest.json
#	public/robots.txt
#	src/app/api/aos/accounting/bank/[id]/match/route.ts
#	src/app/api/aos/accounting/bank/import/route.ts
#	src/app/api/aos/accounting/route.ts
#	src/app/api/aos/accounting/vat/[id]/submit/route.ts
#	src/app/api/aos/api-tokens/[id]/revoke/route.ts
#	src/app/api/aos/api-tokens/route.ts
#	src/app/api/aos/audit/route.ts
#	src/app/api/aos/calendar/route.ts
#	src/app/api/aos/contracts/[id]/sign/route.ts
#	src/app/api/aos/contracts/route.ts
#	src/app/api/aos/crm/companies/[id]/route.ts
#	src/app/api/aos/crm/deals/route.ts
#	src/app/api/aos/crm/route.ts
#	src/app/api/aos/dashboard/route.ts
#	src/app/api/aos/estimates/[id]/accept/route.ts
#	src/app/api/aos/estimates/[id]/convert/route.ts
#	src/app/api/aos/estimates/route.ts
#	src/app/api/aos/expenses/[id]/convert/route.ts
#	src/app/api/aos/expenses/route.ts
#	src/app/api/aos/finance/[id]/finalize/route.ts
#	src/app/api/aos/finance/route.ts
#	src/app/api/aos/kb/generate/route.ts
#	src/app/api/aos/kb/route.ts
#	src/app/api/aos/leads/[id]/route.ts
#	src/app/api/aos/leads/convert/route.ts
#	src/app/api/aos/leads/explain/route.ts
#	src/app/api/aos/leads/route.ts
#	src/app/api/aos/licenses/route.ts
#	src/app/api/aos/modules/route.ts
#	src/app/api/aos/notifications/route.ts
#	src/app/api/aos/portal/approvals/[id]/decide/route.ts
#	src/app/api/aos/portal/companies/[id]/notifications/route.ts
#	src/app/api/aos/portal/companies/[id]/route.ts
#	src/app/api/aos/portal/companies/route.ts
#	src/app/api/aos/projects/[id]/tasks/route.ts
#	src/app/api/aos/projects/[id]/time/route.ts
#	src/app/api/aos/projects/route.ts
#	src/app/api/aos/reporting/route.ts
#	src/app/api/aos/search/route.ts
#	src/app/api/aos/seed/route.ts
#	src/app/api/aos/settings/route.ts
#	src/app/api/aos/setup/test-mail/route.ts
#	src/app/api/aos/tasks/[id]/comments/route.ts
#	src/app/api/aos/tickets/[id]/reply/route.ts
#	src/app/api/aos/tickets/[id]/summarize/route.ts
#	src/app/api/aos/tickets/route.ts
#	src/app/api/aos/timesheet/route.ts
#	src/app/api/aos/webhooks/route.ts
#	src/app/api/mcp/route.ts
#	src/app/api/route.ts
#	src/app/api/v1/companies/route.ts
#	src/app/api/v1/invoices/route.ts
#	src/app/api/v1/licenses/route.ts
#	src/app/api/v1/openapi/route.ts
#	src/app/globals.css
#	src/app/layout.tsx
#	src/app/page.tsx
#	src/components/aos/app-shell.tsx
#	src/components/aos/command-menu.tsx
#	src/components/aos/company-drawer.tsx
#	src/components/aos/create-deal-dialog.tsx
#	src/components/aos/footer.tsx
#	src/components/aos/invoice-dialog.tsx
#	src/components/aos/locale-switcher.tsx
#	src/components/aos/mobile-bottom-nav.tsx
#	src/components/aos/notifications-bell.tsx
#	src/components/aos/onboarding-checklist.tsx
#	src/components/aos/onboarding-overlay.tsx
#	src/components/aos/portal-shell.tsx
#	src/components/aos/primitives.tsx
#	src/components/aos/sidebar-nav.tsx
#	src/components/aos/top-bar.tsx
#	src/components/aos/views/accounting.tsx
#	src/components/aos/views/api.tsx
#	src/components/aos/views/audit.tsx
#	src/components/aos/views/calendar.tsx
#	src/components/aos/views/contracts.tsx
#	src/components/aos/views/crm.tsx
#	src/components/aos/views/dashboard.tsx
#	src/components/aos/views/estimates.tsx
#	src/components/aos/views/expenses.tsx
#	src/components/aos/views/finance.tsx
#	src/components/aos/views/global-settings.tsx
#	src/components/aos/views/kb.tsx
#	src/components/aos/views/leads.tsx
#	src/components/aos/views/licenses.tsx
#	src/components/aos/views/projects.tsx
#	src/components/aos/views/reporting.tsx
#	src/components/aos/views/settings.tsx
#	src/components/aos/views/setup-wizard.tsx
#	src/components/aos/views/support.tsx
#	src/components/aos/views/timesheet.tsx
#	src/components/theme-provider.tsx
#	src/components/theme-toggle.tsx
#	src/components/ui/accordion.tsx
#	src/components/ui/alert-dialog.tsx
#	src/components/ui/alert.tsx
#	src/components/ui/aspect-ratio.tsx
#	src/components/ui/avatar.tsx
#	src/components/ui/badge.tsx
#	src/components/ui/breadcrumb.tsx
#	src/components/ui/button.tsx
#	src/components/ui/calendar.tsx
#	src/components/ui/card.tsx
#	src/components/ui/carousel.tsx
#	src/components/ui/chart.tsx
#	src/components/ui/checkbox.tsx
#	src/components/ui/collapsible.tsx
#	src/components/ui/command.tsx
#	src/components/ui/context-menu.tsx
#	src/components/ui/dialog.tsx
#	src/components/ui/drawer.tsx
#	src/components/ui/dropdown-menu.tsx
#	src/components/ui/form.tsx
#	src/components/ui/hover-card.tsx
#	src/components/ui/input-otp.tsx
#	src/components/ui/input.tsx
#	src/components/ui/label.tsx
#	src/components/ui/menubar.tsx
#	src/components/ui/navigation-menu.tsx
#	src/components/ui/pagination.tsx
#	src/components/ui/popover.tsx
#	src/components/ui/progress.tsx
#	src/components/ui/radio-group.tsx
#	src/components/ui/resizable.tsx
#	src/components/ui/scroll-area.tsx
#	src/components/ui/select.tsx
#	src/components/ui/separator.tsx
#	src/components/ui/sheet.tsx
#	src/components/ui/sidebar.tsx
#	src/components/ui/skeleton.tsx
#	src/components/ui/slider.tsx
#	src/components/ui/sonner.tsx
#	src/components/ui/switch.tsx
#	src/components/ui/table.tsx
#	src/components/ui/tabs.tsx
#	src/components/ui/textarea.tsx
#	src/components/ui/toast.tsx
#	src/components/ui/toaster.tsx
#	src/components/ui/toggle-group.tsx
#	src/components/ui/toggle.tsx
#	src/components/ui/tooltip.tsx
#	src/hooks/use-fetch.ts
#	src/hooks/use-i18n.ts
#	src/hooks/use-mobile.ts
#	src/hooks/use-toast.ts
#	src/lib/api-auth.ts
#	src/lib/db.ts
#	src/lib/format.ts
#	src/lib/i18n.ts
#	src/lib/seed.ts
#	src/lib/utils.ts
#	src/lib/webhook.ts
#	src/store/aos.ts
#	tailwind.config.ts
#	tsconfig.json
2026-10-27 12:24:25 +00:00
Z User fa8dd46571 refactor: professional code quality audit
- Fix all TypeScript compilation errors (0 errors in src/)
- Add try/catch error handling to ALL API routes (38 handlers)
- Fix empty catch blocks (api-auth.ts now logs warnings)
- Add aria-labels to all icon-only buttons (WCAG 2.1 AA)
- Fix Prisma type mismatches (OR filter, Person.companyId, Estimate.projectId, Ticket.createdAt)
- Fix webhook PATCH route (moved to [id]/route.ts)
- Fix mobile-bottom-nav type safety
- Fix KB route where-clause type
- Fix test-mail banner null vs undefined
- Fix task comment fetch: add cancellation + error toast
- ESLint: 0 errors, 0 warnings
- 175 files, 24.741 lines of code
2026-10-27 12:23:32 +00:00
Z User 969202764a Initial commit 2026-10-27 06:25:53 +00:00
Z User 799d7317a8 chore: ensure .env.local is gitignored 2026-10-27 01:06:48 +00:00
Z User ced089c1fb AOS — Agency Operating System (complete build)
20+ module self-hosted agency platform per PRD v1.0:

Modules:
- Dashboard (KPIs, pipeline funnel, audit log, onboarding checklist)
- CRM (kanban pipeline, companies, persons, DSGVO consent, company drawer)
- Leads Finder (evidence-based audits, AI explanation via z-ai-web-dev-sdk)
- Angebote/Estimates (quotes → accept → project → invoice)
- Projekte (tasks, time tracking, budgets, task detail drawer with comments)
- Zeiterfassung (weekly timesheet grid, PM lock, GoBD-compliant)
- Support (tickets, AI summarize + reply suggestions, SLA timers)
- Lizenzen (issued licenses, Ed25519 tokens, activation tracking, renewal register)
- Verträge (Werkvertrag, AVV Art.28 DSGVO, NDA, SLA, e-signature with real IP)
- Ausgaben (billable expenses, recurring, DATEV export, convert to invoice)
- Finanzen (invoices, E-Rechnung ZUGFeRD/XRechnung, gapless numbering)
- Buchhaltung (USt-Voranmeldung Kennzahlen 81/86/66/83/37, EÜR, CAMT.053 parser, ELSTER XML)
- Audit-Protokoll (GoBD hash-chain, before/after diffs)
- Wissensdatenbank (versioned articles, AI article drafting)
- API & Webhooks (scoped tokens SHA-256 hashed, HMAC-SHA256 webhooks, OpenAPI 3.0)
- MCP Server (8 JSON-RPC tools for Claude/ZeroClaw agents)
- Einstellungen (typed settings, i18n DE/EN/TR)
- Erweiterungen (module toggles, compliance checklist)
- Setup-Wizard (7-step guided installer)
- Fristen (unified deadline calendar across all modules)
- Reporting (pipeline, utilization, MRR/ARR, activity dashboards)

Client Portal (project-scoped):
- Welcome banner, notifications bell, approvals with IP evidence
- Invoices, tickets, licenses views

Platform:
- PWA installable (manifest.json, mobile bottom nav)
- Dark mode verified across all views
- i18n DE/EN/TR with instant switching
- Onboarding tour (8 steps) + dashboard checklist
- 3 AI flows (leads explanation, ticket summarize/reply, KB drafting)
- Real integrations (TCP mail test, CAMT.053 parser, ELSTER XML, HMAC webhooks)
- No mocks — all real behavior

Tech: Next.js 16, TypeScript, Prisma (SQLite), shadcn/ui, monochrome design
2026-10-27 01:03:27 +00:00
Z User c71c7e3094 63ef43ec-90ce-4fcf-82b4-abff91b2280a 2026-10-27 01:02:02 +00:00
Z User 8fa25577c0 79ecf134-0188-4613-b691-50e43114247e 2026-10-27 00:54:10 +00:00
Z User 9b5477020c 30f7b0f9-9de3-4087-a91e-c351421922db 2026-10-27 00:35:50 +00:00
Z User 09ca75d36e 0ca22831-efa9-41b6-87bd-e5ee6c344547 2026-10-27 00:00:06 +00:00
Z User 468e7ad123 4146cf4f-64d9-48ee-a4ec-195ac8b92e10 2026-10-26 23:55:58 +00:00
Z User 37cb23d245 115e52dd-042f-444c-9ed4-9bfde9257c45 2026-10-26 23:40:17 +00:00
Z User 7640b78975 7a3ceb05-d8a7-4da8-bc71-27e5e31df3de 2026-10-26 23:23:47 +00:00
Z User e16d7a748a f30e7158-97a8-4eaa-b0e8-a28e8a54a3fe 2026-10-26 23:08:38 +00:00
Z User 9feb124da6 cfbb20c1-e953-4788-abed-5c8308f329ee 2026-10-26 19:36:03 +00:00
Z User be34f88822 f325299d-c1a0-4376-98ae-ddb747d23da5 2026-10-26 17:00:08 +00:00
Z User 9c58e29472 c2a5e509-7a51-4eb1-8d84-a68d55cde77a 2026-10-26 16:24:56 +00:00
Z User 85c4006803 102a8603-26df-462f-a56d-01cee292f6f6 2026-10-26 16:00:34 +00:00
Z User 40805e16cd bb983cb7-102d-4a43-baad-e3307280755d 2026-10-26 15:45:18 +00:00
Z User 34bd721ab1 5b01aa3d-f0b2-4a70-9e57-f4fd90682497 2026-10-26 15:33:24 +00:00
Z User d4c3b0f5ca 1bc42b25-8a92-4b1e-9e45-a4dba3d1ac57 2026-10-26 14:41:13 +00:00
Z User 5855f699f3 e70ae79d-5898-4c55-8ceb-d2c701ce08b4 2026-10-26 14:18:39 +00:00
Z User d226dabba3 b6167bcb-7363-4695-9481-addd81de4367 2026-10-26 13:40:52 +00:00
Z User fdc3b82d10 Initial commit 2026-10-26 12:34:42 +00:00