Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Business modules

Module

Intranet module (intranet)

Module page for intranet, the company-to-employee hub with posts, events, leave, requests, official deliveries, notifications, directory, and recognition.

The intranet module in src/cluster_erp/modules/intranet/ is the communication hub between a company and its employees. It covers posts and policies with mandatory-read acknowledgement, company events, leave and request self-service, official document delivery with a signed receipt, an in-app notification inbox, an employee directory, recognition, quick links, and emergency alerts (src/cluster_erp/modules/intranet/module.py:1-11). This page is the overview; each sub-topic has its own page.

At a glance

Item Value Source
Package src/cluster_erp/modules/intranet/ folder
Module class Module src/cluster_erp/modules/intranet/module.py:30
name / version intranet / 0.1.0 src/cluster_erp/modules/intranet/module.py:35-41
API prefix /api/v1/intranet src/cluster_erp/modules/intranet/module.py:172
Sub-modules 10: content, feed, events, leave, requests, delivery, directory, notifications, engagement, my_documents; plus access.py, context.py, notify.py, privacy_handlers.py, retention_handlers.py, validation.py folder listing
Tables 30, all in one models.py __tablename__ in src/cluster_erp/modules/intranet/models.py
Entities in metadata 17 keys in entities src/cluster_erp/modules/intranet/module.py:539-557
Routes 117 route decorators in the package grep for @...router.get/post/put/patch/delete
Actions 23 ActionMeta( occurrences; events/metadata.py builds its actions through one helper grep "ActionMeta(" in the package
Migrations 8 files files in migrations/versions/ whose text contains one of the 30 table names
Contracts consumes 6, produces 18 see the section "Events and queries"
Web app presence Catalogue app intranet; custom widgets feed, home, events, me, and admin from a gated bundle src/cluster_erp/modules/app_store/catalog.json (entry intranet), gated_apps/intranet/app.js:1407
Desktop presence generic widgets only src/cluster_erp/desktop/modules/ has no intranet folder

What the module does

  • Publishes posts, pages, policies, and alerts in spaces, with review, approval, versioned publication, and acknowledgement of mandatory reads (src/cluster_erp/modules/intranet/content/services.py:1-12). See content and feed.
  • Merges posts, events, and recognition into one timeline (src/cluster_erp/modules/intranet/feed/services.py:1-5).
  • Runs company events with invitations, RSVPs, capacity, and a change log (src/cluster_erp/modules/intranet/events/lifecycle.py:1-21). See events.
  • Handles leave types, balances, and leave requests with approval (src/cluster_erp/modules/intranet/leave/services.py:1-7). See leave.
  • Handles configurable employee requests such as advances and equipment (src/cluster_erp/modules/intranet/requests/services.py:1-2). See requests.
  • Delivers official documents to employees with a receipt (src/cluster_erp/modules/intranet/delivery/services.py:1-4). See notifications and delivery.
  • Shows a live directory and org chart read from the employee and party records (src/cluster_erp/modules/intranet/directory/services.py:1-8). See directory.
  • Keeps recognition, quick links, and emergency alerts (src/cluster_erp/modules/intranet/engagement/services.py:1-6). See engagement.
  • Lists the documents attached to the employee's own party card (src/cluster_erp/modules/intranet/my_documents/services.py:10-15). See my documents.

Sub-modules

Sub-module Purpose Routers Page
content Spaces, posts, segments, access grants, settings, comments /spaces, /content, /acl, /segments, /settings, /comments Content and feed
feed One timeline over posts, events, and recognition /feed Content and feed
events Company events and media /events, /media Events
leave Leave types, balances, requests /leave-types, /leave-balances, /leave-requests Leave
requests Request types and requests /request-types, /requests Requests
delivery Official document delivery /deliveries Notifications and delivery
notifications The in-app inbox /notifications Notifications and delivery
directory Live employee directory /directory Directory
engagement Recognition, quick links, emergency alerts /kudos, /quick-links, /alerts Engagement
my_documents The employee's own documents /my-documents My documents

All 21 routers are included in one module router with the prefix /api/v1/intranet (src/cluster_erp/modules/intranet/module.py:133-197). Access, audience, and retention rules are on access, audience, and retention.

Data model

All 30 tables are declared in src/cluster_erp/modules/intranet/models.py. Each sub-module page lists its fields. The model docstring states the binding decisions: access grants and audience segments are separate axes, content is a state machine, acknowledgement is an audit record kept apart from analytics, analytics is aggregate-only with a minimum group size, and employee data is never stored here (src/cluster_erp/modules/intranet/models.py:6-33). The closed vocabularies for statuses, channels, and categories are tuples at the top of the file (src/cluster_erp/modules/intranet/models.py:64-147). Leave day counts are Numeric so that half days are exact (src/cluster_erp/modules/intranet/models.py:734-771).

Screens and metadata

get_metadata declares a sidebar group Intranet (Turkish İntranet) (src/cluster_erp/modules/intranet/module.py:398-537). Five sections form the experience: Feed, Events, People, Me, and Manage. Feed, Events, Me, and Manage are custom widgets; People is a list over intranet_employee_projection. Manage needs intranet_settings.update (src/cluster_erp/modules/intranet/module.py:405-442). Ten more sections carry hidden_from_bar=True and remain reachable from search and deep links: Posts, Event records, Leave, Requests, My Documents, Official Deliveries, Notifications, Recognition, Emergency alerts, and Settings (src/cluster_erp/modules/intranet/module.py:443-536). The settings view has six tabs: spaces, segments, leave types, request types, quick links, and intranet settings (src/cluster_erp/modules/intranet/module.py:521-536). The web bundle maps the custom widget keys to its renderers (gated_apps/intranet/app.js:1407); see gated app bundles.

Status and actions

Each sub-module page lists its statuses and actions. All lifecycles move through action routes; the update paths do not change the status (src/cluster_erp/modules/intranet/content/services.py:794-806). Decision actions need an elevated permission on top of .update: intranet_content.publish for editorial actions, intranet_leave_request.approve and intranet_request.approve for approvals (src/cluster_erp/modules/intranet/content/routes.py:255-257, src/cluster_erp/modules/intranet/leave/routes.py:274-276, src/cluster_erp/modules/intranet/requests/routes.py:197-199).

Business rules

  • A personal record (leave, request, delivery) may name only a party that is an active employee (src/cluster_erp/modules/intranet/access.py:124-144).
  • The acting person is resolved from the signed-in user's employee link through GetPartyForEmployee; a login without an employee link has no party (src/cluster_erp/modules/intranet/context.py:20-30).
  • Business keys come from house sequences, for example intranet_official_delivery (src/cluster_erp/modules/intranet/delivery/services.py:137).
  • A blank string in a form payload counts as no value (src/cluster_erp/modules/intranet/validation.py:1-25).

Events and queries

The module consumes 6 contracts and produces 18, counted as on the fleet module page with multi-line calls included. The full list is on the contracts reference.

Direction Contract class Handler or emitter Source
subscribes IntranetNotify _handle_notify src/cluster_erp/modules/intranet/module.py:199-203, src/cluster_erp/modules/intranet/module.py:305-345
answers query GetUpcomingIntranetEvents _handle_upcoming_events src/cluster_erp/modules/intranet/module.py:205-206, src/cluster_erp/modules/intranet/module.py:291-303
subscribes CollectSubjectData, AnonymiseSubject privacy_handlers.py src/cluster_erp/modules/intranet/module.py:207-223
subscribes RetentionSweep sweep_retention src/cluster_erp/modules/intranet/module.py:224-229
subscribes DescribeFieldConsumers _describe_field_consumers src/cluster_erp/modules/intranet/module.py:230-236, src/cluster_erp/modules/intranet/module.py:238-289
emits IntranetPostPublished content publish route src/cluster_erp/modules/intranet/content/routes.py:266-283
emits IntranetEventPublished, IntranetEventUpdated, IntranetEventCancelled EventService src/cluster_erp/modules/intranet/events/services.py:432, src/cluster_erp/modules/intranet/events/services.py:498, src/cluster_erp/modules/intranet/events/services.py:591
queries GetPartyForEmployee, GetTeamPartyIds, ListDirectoryEmployees, SearchParties, GetProjectMemberPartyIds access, directory, segments src/cluster_erp/modules/intranet/context.py:25-27, src/cluster_erp/modules/intranet/access.py:181-186, src/cluster_erp/modules/intranet/directory/services.py:57-90, src/cluster_erp/modules/intranet/content/services.py:494-502
queries GetApprovalChainForAction, SubmitForApproval leave and requests src/cluster_erp/modules/intranet/leave/services.py:740-772, src/cluster_erp/modules/intranet/requests/services.py:289-309
queries GetCompanyDefaultTimezone, GetOwnerWorkingDays, GetPartyById leave day counting and gender check src/cluster_erp/modules/intranet/leave/services.py:290-306, src/cluster_erp/modules/intranet/leave/services.py:453
emits ResolveEntityEmails, SendTransactionalEmail fan_out_email src/cluster_erp/modules/intranet/notify.py:20-65
queries GetDocumentsForEntity, ResolveDocumentVersionFile my documents, delivery download src/cluster_erp/modules/intranet/my_documents/services.py:17-28, src/cluster_erp/modules/intranet/delivery/routes.py:143-150

Permissions

Permission key family Used by Source
intranet_content.read, .create, .update, .delete, .publish, .read_all content, comments, access grants, feed, media src/cluster_erp/modules/intranet/content/routes.py:116-546, src/cluster_erp/modules/intranet/feed/routes.py:34
intranet_space.*, intranet_segment.*, intranet_settings.* spaces, segments, settings src/cluster_erp/modules/intranet/content/routes.py:47-679
intranet_event.* events src/cluster_erp/modules/intranet/events/routes.py:57-298
intranet_leave_type.*, intranet_leave_balance.*, intranet_leave_request.* including .approve and .read_all leave src/cluster_erp/modules/intranet/leave/routes.py:40-286
intranet_request_type.*, intranet_request.* including .approve and .read_all requests src/cluster_erp/modules/intranet/requests/routes.py:34-209
intranet_official_delivery.* including .read_all deliveries src/cluster_erp/modules/intranet/delivery/routes.py:50-245
intranet_notification.read, .update inbox src/cluster_erp/modules/intranet/notifications/routes.py:31-193
intranet_employee_projection.read directory src/cluster_erp/modules/intranet/directory/routes.py:22-75
intranet_kudos.*, intranet_quick_link.*, intranet_alert.* engagement src/cluster_erp/modules/intranet/engagement/routes.py:35-242

The row-level tiers built on these keys are on access, audience, and retention.

Privacy, retention, and history

privacy_handlers.py answers data-subject requests for twelve intranet record classes, from comments to official deliveries. Anonymisation follows the operator's decision on employment records (src/cluster_erp/modules/intranet/privacy_handlers.py:1-11); see privacy and data-subject requests. retention_handlers.py deletes analytics events past the tenant's window on each retention sweep (src/cluster_erp/modules/intranet/retention_handlers.py:1-55). Other deletes set deleted_at, for example on posts (src/cluster_erp/modules/intranet/content/routes.py:287-301). Changes are captured by change history.

Analytics facts

This module has no analytics_facts.py. Read analytics of a post live inside the module with a minimum group size; see access, audience, and retention.

Settings and reference data

  • One settings row per tenant database holds the minimum group size (default 5), the review interval, the analytics retention window (default 730 days), the emergency banner, the home layout, and the welcome message (src/cluster_erp/modules/intranet/models.py:155-200). The row is created on start (src/cluster_erp/modules/intranet/module.py:55-64).
  • Leave types and request types are seeded on start when their codes are missing; the organisation extends both lists (src/cluster_erp/modules/intranet/module.py:66-131, src/cluster_erp/modules/intranet/leave/seeds.py:1-12, src/cluster_erp/modules/intranet/requests/seeds.py:8-36).
  • The module tells the tenant field screen that the party field manager_party_id is a soft dependency, and gender a hard one while a gender-restricted leave type exists (src/cluster_erp/modules/intranet/module.py:238-289). See tenant fields.

Tests

Found by name (web-client/_e2e_intranet*.mjs) and by a grep for intranet in tests/*.py.

Kind File Covers
e2e web-client/_e2e_intranet.mjs, web-client/_e2e_intranet_services.mjs the module end to end
e2e web-client/_e2e_intranet_acl.mjs, web-client/_e2e_intranet_authz.mjs, web-client/_e2e_intranet_confidential.mjs, web-client/_e2e_intranet_isolation.mjs access grants, permissions, confidential deliveries, isolation
e2e web-client/_e2e_intranet_audience.mjs the audience builder
e2e web-client/_e2e_intranet_feed_ui.mjs, web-client/_e2e_intranet_compose_ui.mjs, web-client/_e2e_intranet_home.mjs feed, composer, home
e2e web-client/_e2e_intranet_events_lifecycle.mjs events
e2e web-client/_e2e_intranet_leave_rules.mjs, web-client/_e2e_intranet_selfservice.mjs leave and self-service
e2e web-client/_e2e_intranet_mydocs.mjs, web-client/_e2e_intranet_notif_i18n.mjs my documents, localised notifications
pytest tests/test_intranet_event_lifecycle.py, tests/test_intranet_request_type_seeds.py, tests/test_leave_day_math.py event rules, request seeds, leave day counting
pytest tests/test_data_map_package1.py, tests/test_sensitive_fields_policy.py, tests/test_system_mail.py, tests/test_tenant_fields.py, tests/test_demo_data_live.py files that mention intranet

Discrepancies

Terms introduced

Term Code identifier Definition Turkish term Source
space IntranetSpace A container that groups intranet content and can carry access grants. Alan src/cluster_erp/modules/intranet/models.py:202
official delivery IntranetOfficialDelivery A formal hand-over of a document to an employee with a receipt. Tebligat src/cluster_erp/modules/intranet/models.py:936
segment IntranetSegment A rule-based audience of employees used to target content and events. Hedef kitle src/cluster_erp/modules/intranet/models.py:410

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13