Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
4.5 KiB
4.5 KiB
Progress
Completed work only. Future → roadmap.md. Next milestone → next-steps.md.
Phase 1 — Core Platform ✅
Infrastructure & structure
- Full project structure with mandatory
backend//frontend/separation - Shared library
backend/shared-lib - Architecture section: Frontend & Backend Separation
Core service
- Config, database, cache, logging, base security
- Models, APIs, Entitlement, Celery, Outbox
- Tests and documentation
Frontend
- Independent Next.js, API client, white-label theme baseline
Phase 2 — Identity & Access + SSO ✅
shared/auth/jwt.py,shared/auth/roles.py, Identity events inshared/events.py- Identity service +
identity_access_db - Keycloak realm/clients/theme import
- Core API protection (
AUTH_REQUIRED, role deps) - Frontend SSO flow (
/login,/auth/callback,/dashboard) - Compose services Identity + Frontend; Postgres init for identity DB
Phase 3 — OTP Login + Tenant Management ✅
- Core
users+ OTP request/verify + Payamak - Local JWT (HS256) for OTP users
- Admin tenant CRUD + owner filtering
- Frontend admin OTP/tenant UI (later aligned to central SSO)
test_otp_auth.py
Phase 4 — Tenant Onboarding & Workspace Activation ✅
Brief alias: sometimes called “Phase 3” externally — see phase-numbering decision.
- Core
tenant_memberships, tenant lifecycle, branding columns, domain primary/verification fields users.current_tenant_id, FREE/STARTER plan seed, onboarding APIsUserService/MembershipService/OnboardingService/TenantContextService- Frontend onboarding wizard, tenant dashboard, tenant switcher
test_onboarding.py+ regression suite- JIT Core user from Keycloak JWT (
UserService.resolve_current) - Automatic tenant subdomain SSL (Celery → SSH →
provision_ssl.py) - Reverse proxy (Nginx) + base TLS + tenant SSL automation
Intentionally incomplete after Phase 4 (tracked in roadmap, not claimed done)
Payment gateway · real DNS/TXT custom-domain verify · legacy POST /admin/tenants auto membership/plan · first business module
Phase D — Documentation Architecture Consolidation ✅
- Target
docs/tree (architecture, adr, development, reference, deployment, templates, phases, decisions) - Moved canonical docs with git history where possible
- Deprecated stubs for old paths
- ADR system initialized (ADR-001 … ADR-010)
- Project principles, coding standards, testing/branching/release strategies
- Module registry + provider registry + glossary
- Deployment runbooks (production, SSL, monitoring, backup, restore, DR)
- Roadmap / next-steps separation from progress
- Phase area docs for Accounting, CRM, Restaurant, Marketplace, Automation, AI, Future
- Cross-links updated in root and package READMEs
Phase 5.1–5.11 — Accounting Module ✅
- Phases 5.1–5.6: Foundation through Sales Integration (see prior entry)
- Phase 5.7: Purchase & Inventory accounting, InventoryValuationEngine
- Phase 5.8: Fixed Assets, DepreciationEngine, asset lifecycle
- Phase 5.9: HCM/Payroll, PayrollEngine, payroll accounting
- Phase 5.10: Financial Reporting Engine, dashboards, export framework
- Phase 5.11: Compliance, Audit Framework, Governance, SoD
- Alembic migration
0002_phases_57_511 - 21 tests passing
Accounting Enterprise Frontend (in SuperApp) ✅ baseline
- Design system tokens (light/dark) + DS components (
components/ds) - TanStack Query providers, Sonner toasts, ColorMode
- Typed
accounting-apiclient (JWT +X-Tenant-ID, no mocks) - Accounting shell + routes: dashboard, COA, fiscal, currencies, cost centers, projects, ledger, setup, suppliers
- Vouchers list/create/detail with validate/post/reverse/cancel + draft edit (ADR-010)
- Foundation masters: edit/archive drawers, fiscal year/period actions, COA template import wizard
- Setup checklist + completion scoreboard on dashboard
- Treasury, customers, assets, payroll, reports, audit, settings pages (real APIs)
- Catalog tile available →
/accounting - Frontend docs under
docs/frontend/
Remaining: Phase 5.12 AI UI blocked on AI provider; optional richer PDF export file delivery.