KoproGo Project Structureï
Last updated: 2026-02-19
This document provides an overview of the KoproGo project structure, updated to reflect the actual codebase state.
Root Structureï
.
âââ CHANGELOG.md
âââ CLAUDE.md
âââ LICENSE
âââ Makefile
âââ README.md
âââ argocd
â âââ README.md
â âââ application.yaml
â âââ argocd-helper.sh
â âââ docker-compose.argocd.yml
âââ backend
â âââ Cargo.lock
â âââ Cargo.toml
â âââ DATABASE_CONSTRAINTS.md
â âââ Dockerfile
â âââ Dockerfile.dev
â âââ Dockerfile.production
â âââ audit.toml
â âââ benches
â âââ docs
â âââ migrations
â âââ src
â âââ tests
â âââ uploads
âââ deploy
â âââ production
â âââ staging
âââ docker-compose.yml
âââ docs
â âââ PROJECT_STRUCTURE.rst (this file)
â âââ ROADMAP_PAR_CAPACITES.rst
â âââ WBS_2026_02_18.rst
â âââ conf.py
â âââ index.rst
â âââ ...
âââ frontend
â âââ src
âââ infrastructure
âââ ansible
Backend Structure (Hexagonal Architecture)ï
Domain Layerï
The core business logic with no external dependencies.
backend/src/domain
âââ entities
â âââ account.rs
â âââ achievement.rs
â âââ board_decision.rs
â âââ board_member.rs
â âââ budget.rs
â âââ building.rs
â âââ call_for_funds.rs
â âââ challenge.rs
â âââ charge_distribution.rs
â âââ convocation.rs
â âââ convocation_recipient.rs
â âââ document.rs
â âââ energy_bill_upload.rs
â âââ energy_campaign.rs
â âââ etat_date.rs
â âââ expense.rs
â âââ gdpr_export.rs
â âââ gdpr_objection.rs
â âââ gdpr_rectification.rs
â âââ gdpr_restriction.rs
â âââ invoice_line_item.rs
â âââ iot_reading.rs
â âââ journal_entry.rs
â âââ linky_device.rs
â âââ local_exchange.rs
â âââ meeting.rs
â âââ mod.rs
â âââ notice.rs
â âââ notification.rs
â âââ organization.rs
â âââ owner.rs
â âââ owner_contribution.rs
â âââ owner_credit_balance.rs
â âââ payment.rs
â âââ payment_method.rs
â âââ payment_reminder.rs
â âââ poll.rs
â âââ poll_vote.rs
â âââ quote.rs
â âââ refresh_token.rs
â âââ resolution.rs
â âââ resource_booking.rs
â âââ shared_object.rs
â âââ skill.rs
â âââ technical_inspection.rs
â âââ ticket.rs
â âââ two_factor_secret.rs
â âââ unit.rs
â âââ unit_owner.rs
â âââ user.rs
â âââ user_role_assignment.rs
â âââ vote.rs
â âââ work_report.rs
âââ i18n.rs
âââ mod.rs
âââ services
âââ expense_calculator.rs
âââ mod.rs
âââ pcn_exporter.rs
âââ pcn_mapper.rs
Entities: 52+ entities (modules listed above) Services: 3 domain services
Domain Entity Highlightsï
account - Belgian PCMN chart of accounts (AR 12/07/2012),
AccountTypeachievement, user_achievement - Gamification achievements, 8 categories, 5 tiers
board_decision, board_member - Board governance,
DecisionStatus,BoardPositionbudget - Budget management,
BudgetStatusbuilding - Core aggregate (SEO slug, syndic public info)
call_for_funds - Owner contribution calls,
CallForFundsStatuschallenge, challenge_progress - Time-bound gamification challenges,
ChallengeTypecharge_distribution - Expense charge distribution across units
convocation, convocation_recipient - AG invitation system with legal deadline validation,
ConvocationType,AttendanceStatusdocument - File storage,
DocumentTypeenergy_bill_upload, energy_campaign - IoT/Linky energy management,
EnergyType,CampaignStatusetat_date - Belgian âĂ©tat des datesâ compliance document,
EtatDateStatusexpense - Charges with approval workflow (Draft â PendingApproval â Approved/Rejected)
gdpr_export, gdpr_objection, gdpr_rectification, gdpr_restriction - GDPR Articles 15â21 compliance
invoice_line_item - Multi-line invoices with Belgian VAT (6%, 12%, 21%)
iot_reading, linky_device - IoT energy meter readings,
MetricType,DeviceTypejournal_entry - Belgian double-entry bookkeeping
local_exchange, owner_credit_balance - SEL time-based exchange system,
ExchangeType,ParticipationLevelmeeting - General assemblies,
MeetingType,MeetingStatusnotice - Community notice board,
NoticeCategory,NoticeStatusnotification, notification_preference - Multi-channel notifications (Email/SMS/Push/InApp),
NotificationTypeorganization - Multi-tenancy root,
SubscriptionPlanowner, unit_owner - Co-owners and unit ownership relationships
owner_contribution - Owner financial contributions,
ContributionTypepayment, payment_method - Stripe + SEPA integration,
TransactionStatus,PaymentMethodTypepayment_reminder - Automated payment recovery (4 escalation levels),
ReminderLevelpoll, poll_vote - Board consultation polls,
PollType,PollStatusquote - Contractor quotes with Belgian legal compliance (3 mandatory for works >5000 EUR),
QuoteStatusrefresh_token - JWT refresh tokens
resolution, vote - Meeting voting system with Belgian majority types,
MajorityType,VoteChoiceresource_booking - Resource calendar booking,
BookingStatus,ResourceTypeshared_object - Object sharing library,
SharedObjectCategory,ObjectConditionskill - Skills directory,
SkillCategory,ExpertiseLeveltechnical_inspection - Technical inspection records,
InspectionType,InspectionStatusticket - Maintenance request management,
TicketPriority,TicketCategory,TicketStatustwo_factor_secret - Two-Factor Authentication (2FA) secrets
unit - Lots within buildings,
UnitTypeuser, user_role_assignment - Multi-role user system,
UserRolework_report - Contractor work reports,
WorkType,WarrantyType
Application Layerï
Use cases and port definitions (interfaces).
Use Cases: 43+ use cases Ports: 40+ repository ports DTOs: 40+ data transfer object modules
Use Case Modulesï
account_use_cases- Belgian PCMN accounting operationsauth_use_cases- Authentication, JWT, multi-role loginboard_dashboard_use_cases- Board governance dashboard aggregation (BoardDashboardUseCases)board_decision_use_cases- Board decision lifecycleboard_member_use_cases- Board member managementbudget_use_cases- Budget creation and trackingbuilding_use_cases- Building CRUD, slug generation, syndic infocall_for_funds_use_cases- Call for funds managementcharge_distribution_use_cases- Expense distribution across unitsconvocation_use_cases- AG convocation workflow with legal validationdashboard_use_cases- Multi-role dashboard aggregationdocument_use_cases- Document upload and managementenergy_bill_upload_use_cases- Energy bill upload and parsingenergy_campaign_use_cases- IoT/Linky energy campaign management (CampaignStats)etat_date_use_cases- Belgian Ă©tat des dates generationexpense_use_cases- Expense approval workflowfinancial_report_use_cases- Belgian balance sheet and income statementgamification_use_cases- Achievements, challenges, leaderboard (AchievementUseCases,ChallengeUseCases,GamificationStatsUseCases)gdpr_use_cases- GDPR Articles 15â21 (export, erasure, rectification, restriction, objection)iot_use_cases- IoT reading ingestion, Linky device management (IoTUseCases,LinkyUseCases)journal_entry_use_cases- Double-entry bookkeeping journal entrieslocal_exchange_use_cases- SEL exchange workflow with credit balance managementmeeting_use_cases- General assembly managementnotice_use_cases- Community notice board (NoticeStatistics)notification_use_cases- Multi-channel notification dispatch and preferencesowner_contribution_use_cases- Owner financial contribution trackingowner_use_cases- Owner CRUD and unit relationshipspayment_method_use_cases- Payment method management (Stripe/SEPA)payment_reminder_use_cases- Automated payment recovery escalationpayment_use_cases- Payment transaction lifecyclepcn_use_cases- Belgian PCN (Plan Comptable NormalisĂ©) exportpoll_use_cases- Board poll creation, voting, and resultsquote_use_cases- Contractor quote comparison with Belgian legal scoringresolution_use_cases- Meeting resolutions with majority calculation (VoteStatistics)resource_booking_use_cases- Resource calendar bookingshared_object_use_cases- Object sharing library managementskill_use_cases- Community skills directorytechnical_inspection_use_cases- Technical inspection recordsticket_use_cases- Maintenance ticket workflow (TicketStatistics)two_factor_use_cases- 2FA setup, verification, and disableunit_owner_use_cases- Unit ownership with Belgian percentage validationunit_use_cases- Unit (lot) managementwork_report_use_cases- Contractor work report management
Infrastructure Layerï
Adapters implementing the ports.
Repositories: 40+ PostgreSQL repository implementations Handlers: 51+ HTTP handler modules
HTTP Handler Modulesï
account_handlers- Belgian PCMN accounts + seed endpointadmin_gdpr_handlers- Admin GDPR audit log managementauth_handlers- Login, logout, token refresh, role switch, profileboard_decision_handlers- Board decision CRUD and lifecycleboard_member_handlers- Board member managementbudget_handlers- Budget CRUD and trackingbuilding_handlers- Building CRUD with syndic public infocall_for_funds_handlers- Call for funds managementcharge_distribution_handlers- Charge distribution per unitconvocation_handlers- AG convocation, scheduling, sending, trackingdashboard_handlers- Multi-role dashboard data endpointsdocument_handlers- Document upload, download, listingenergy_bill_upload_handlers- Energy bill upload (multipart)energy_campaign_handlers- IoT/Linky energy campaign managementetat_date_handlers- Belgian état des dates generationexpense_handlers- Expense CRUD with approval workflowfinancial_report_handlers- Belgian balance sheet and income statementfinancial_report_handlers_building- Per-building financial reportsgamification_handlers- Achievements, challenges, leaderboard (22 endpoints)gdpr_handlers- GDPR self-service (export, erasure, rectification, restriction, marketing opt-out)health- Health check endpointiot_handlers- IoT readings and Linky device managementjournal_entry_handlers- Double-entry bookkeeping journal entrieslocal_exchange_handlers- SEL exchange marketplace (17 endpoints)meeting_handlers- General assembly managementmetrics- Prometheus metrics endpointnotice_handlers- Community notice boardnotification_handlers- Notifications (my, unread, read, preferences)organization_handlers- Organization managementowner_contribution_handlers- Owner contribution managementowner_handlers- Owner CRUD and unit relationshipspayment_handlers- Payment transactions (Stripe + SEPA)payment_method_handlers- Payment method managementpayment_reminder_handlers- Automated payment recovery escalationpcn_handlers- Belgian PCN exportpoll_handlers- Board polls (voting, results, lifecycle)public_handlers- Public syndic info (no authentication required)quote_handlers- Contractor quotes with comparison scoringresolution_handlers- Meeting resolutions and votingresource_booking_handlers- Resource calendar bookingseed_handlers- Development data seedingshared_object_handlers- Object sharing libraryskill_handlers- Community skills directorystats_handlers- System-wide statisticstechnical_inspection_handlers- Technical inspection recordsticket_handlers- Maintenance ticket workflow (17 endpoints)two_factor_handlers- 2FA setup and verificationunit_handlers- Unit (lot) CRUDunit_owner_handlers- Unit ownership relationships and transferuser_handlers- User management (admin)work_report_handlers- Contractor work reports
New Capabilities Added Since Initial Releaseï
The following major capabilities have been added beyond the original MVP:
IoT / Linky Integration - Energy meter readings, Linky device management, energy campaign tracking (
iot_reading,linky_device,energy_campaign,energy_bill_upload)Two-Factor Authentication (2FA) - TOTP-based 2FA setup and verification (
two_factor_secret,two_factor_use_cases)Gamification & Achievements - 8 categories, 5 tiers, challenges, leaderboard (Issue #49 Phase 6)
SEL - Systeme dâEchange Local - Time-based local exchange trading system with credit balances, ratings, and leaderboard (Issue #49 Phase 1)
Community Notice Board - Building notice board with categories and lifecycle (Issue #49 Phase 2)
Skills Directory - Community skills exchange directory (Issue #49 Phase 3)
Object Sharing Library - Shared object management with loan workflow (Issue #49 Phase 4)
Resource Booking Calendar - Shared resource reservation system (Issue #49 Phase 5)
GDPR Compliance (Articles 15-21) - Full GDPR: right to access, erasure, rectification, restriction, and objection to marketing (Issue #90)
Belgian Accounting (PCMN) - Full Plan Comptable Minimum Normalise belge with ~90 pre-seeded accounts and financial reports (Issue #79)
Meeting Voting System - Resolutions with Simple/Absolute/Qualified majority types, tantiemes/milliemes, proxy votes (Issue #46)
Maintenance Ticket System - Maintenance request workflow with priorities, contractor assignment, and statistics (Issue #85)
Multi-Channel Notifications - Email, SMS, Push, and In-App notifications with user preferences (Issue #86)
Payment Integration - Stripe Payment Intents and SEPA Direct Debit with idempotency and refund support (Issue #84)
Convocation System - Automatic AG invitation system with Belgian legal deadline validation and email tracking (Issue #88)
Contractor Quotes Module - Belgian 3-quote mandatory requirement with automatic scoring algorithm (Issue #91)
Board Decision Polls - Quick owner consultations between general assemblies, 4 poll types (Issue #51)
Public Syndic Information - SEO-friendly public syndic contact page (no authentication), Belgian legal compliance (Issue #92)
Board Dashboard - Board member governance dashboard with decision and meeting aggregation
Belgian Budgets & Etat des Dates - Budget tracking and Belgian legal compliance documents
Payment Recovery Workflow - Automated 4-level escalation (Gentle to Formal to FinalNotice to LegalAction)
Journal Entries - Double-entry bookkeeping journal entries
Technical Inspections - Technical inspection record management
Work Reports - Contractor work report management
Call for Funds - Owner contribution call management
Charge Distribution - Expense charge distribution per unit
Frontend Structureï
Stack: Astro (SSG) + Svelte (interactive islands) + Tailwind CSS
frontend/src
âââ components
â âââ BoardDashboard.svelte
â âââ BoardMemberList.svelte
â âââ BuildingDetail.svelte
â âââ BuildingFinancialReports.svelte
â âââ BuildingList.svelte
â âââ BuildingSelector.svelte
â âââ CallForFundsForm.svelte
â âââ CallForFundsList.svelte
â âââ DecisionTracker.svelte
â âââ DocumentList.svelte
â âââ DocumentUploadModal.svelte
â âââ ExpenseDetail.svelte
â âââ ExpenseList.svelte
â âââ FinancialReports.svelte
â âââ GdprDataPanel.svelte
â âââ InvoiceForm.svelte
â âââ InvoiceList.svelte
â âââ InvoiceWorkflow.svelte
â âââ JournalEntryForm.svelte
â âââ LoginForm.svelte
â âââ McpChatbot.svelte
â âââ MeetingDetail.svelte
â âââ MeetingList.svelte
â âââ Navigation.svelte
â âââ OrganizationList.svelte
â âââ OwnerContributionForm.svelte
â âââ OwnerContributionList.svelte
â âââ OwnerList.svelte
â âââ OwnerUnits.svelte
â âââ PWAInstallPrompt.svelte
â âââ Pagination.svelte
â âââ PaymentReminderDetail.svelte
â âââ PaymentReminderList.svelte
â âââ ProfilePanel.svelte
â âââ RegisterForm.svelte
â âââ RouteGuard.svelte
â âââ SessionManager.svelte
â âââ SyncStatus.svelte
â âââ UnitList.svelte
â âââ UnitOwners.svelte
â âââ UserListAdmin.svelte
â âââ UserOwnerLinkManager.svelte
â âââ admin/
â âââ bookings/
â âââ budgets/
â âââ convocations/
â âââ dashboards/
â â âââ AccountantDashboard.svelte
â â âââ AdminDashboard.svelte
â â âââ OwnerDashboard.svelte
â â âââ SyndicDashboard.svelte
â âââ energy-campaigns/
â âââ etats-dates/
âââ layouts
â âââ Layout.astro
âââ lib
â âââ api.ts
â âââ config.ts
â âââ i18n.ts
â âââ sync.ts
â âââ types.ts
âââ locales
â âââ de.json
â âââ en.json
â âââ fr.json
â âââ nl.json
âââ pages
â âââ accountant/
â âââ admin/
â âââ board-dashboard.astro
â âââ bookings.astro
â âââ budget-detail.astro
â âââ budgets.astro
â âââ building-detail.astro
â âââ buildings/
â âââ call-for-funds.astro
â âââ convocation-detail.astro
â âââ convocations.astro
â âââ documents.astro
â âââ energy-campaigns.astro
â âââ etat-date-detail.astro
â âââ etats-dates.astro
â âââ exchange-detail.astro
â âââ exchanges.astro
â âââ expense-detail.astro
â âââ expenses.astro
â âââ gamification.astro
â âââ index.astro
â âââ inspections.astro
â âââ invoice-workflow.astro
â âââ journal-entries.astro
â âââ login.astro
â âââ mcp-chat.astro
â âââ meeting-detail.astro
â âââ meetings.astro
â âââ mentions-legales.astro
â âââ notice-detail.astro
â âââ notices.astro
â âââ notifications.astro
â âââ owner/
â âââ owner-contributions.astro
â âââ owners.astro
â âââ payment-reminder-detail.astro
â âââ payment-reminders.astro
â âââ polls/
â âââ polls.astro
â âââ profile.astro
â âââ quotes/
â âââ register.astro
â âââ reports.astro
â âââ settings.astro
â âââ sharing.astro
â âââ skills.astro
â âââ syndic/
â âââ ticket-detail.astro
â âââ tickets.astro
â âââ units.astro
â âââ work-reports.astro
âââ stores
â âââ auth.ts
âââ styles
âââ global.css
Tests Structureï
backend/tests
âââ bdd.rs
âââ common/
âââ e2e.rs
âââ e2e_auth.rs
âââ e2e_board.rs
âââ e2e_board_dashboard.rs
âââ e2e_budget.rs
âââ e2e_convocations.rs
âââ e2e_documents.rs
âââ e2e_etat_date.rs
âââ e2e_gdpr.rs
âââ e2e_gdpr_audit.rs
âââ e2e_http.rs
âââ e2e_local_exchange.rs
âââ e2e_meetings.rs
âââ e2e_notifications.rs
âââ e2e_payment_recovery.rs
âââ e2e_payments.rs
âââ e2e_quotes.rs
âââ e2e_resolutions.rs
âââ e2e_tickets.rs
âââ e2e_unit_owner.rs
âââ integration_unit_owner.rs
âââ storage_s3.rs
âââ features
âââ auth.feature
âââ building.feature
âââ documents.feature
âââ expenses_pagination.feature
âââ expenses_pcn.feature
âââ i18n.feature
âââ meetings.feature
âââ multitenancy.feature
âââ pagination_filtering.feature
âââ polls.feature
âââ ...
Documentation Structureï
docs
âââ PROJECT_STRUCTURE.rst (this file)
âââ ROADMAP_PAR_CAPACITES.rst
âââ WBS_2026_02_18.rst
âââ BELGIAN_ACCOUNTING_PCMN.rst
âââ INVOICE_WORKFLOW.rst
âââ PAYMENT_RECOVERY_WORKFLOW.rst
âââ MULTI_OWNER_SUPPORT.md
âââ MULTI_ROLE_SUPPORT.md
âââ GIT_HOOKS.rst
âââ conf.py
âââ index.rst
âââ requirements.txt
âââ _static/
âââ archive/
âââ github-export/
This document was last updated manually on 2026-02-19. Source of truth: ``backend/src/domain/entities/mod.rs``, ``backend/src/infrastructure/web/handlers/mod.rs``, ``backend/src/application/use_cases/mod.rs``