MiCyte

← The wiki

44 — Project documents

BuiltRendered from 44-project-documents.md in the public repository. Edits belong there.

A project is a datum document on the instance's tree, built from four row archetypes; a website reads it through its own resolver.

The number of rows varies from project to project; the shape of each row does not. A project with forty photographs and one with three use the same four archetypes.

The four archetypes

Declared in scripts/mint_archetype_sandbox.py, members of the project class (scripts/mint_class_library.py), read by micyte/core/datum_ops/project_document.py.

ArchetypeCells, in orderOne row per
project_profile (header)msn_id owner · site_msn site · lcl_id kind · title name · utc opened (optional) · status_ref standing (optional) · hyphae_ref owner's profile (optional)Document
project_textlcl_id role · nominal order (then line order, for a paragraph of more than one line) · title textParagraph line or fact line
project_artifactlcl_id slot · lcl_id role · nominal order · title caption (optional)Picture placement
project_factnominal value · lcl_id kind · title word (optional)Detail
  • The header is the project_profile archetype that projects documents already use; its two optional cells are last, so older rows still match.
  • Roles and kinds are nodes under the instance's classes branch (feature, gallery, tour, plan, hidden; summary, story, fact; beds, baths, square_feet, and others), seeded by the convention (43). An instance can add more without a new archetype.
  • Cell order distinguishes the archetypes from each other and from class_record and job_service. ArchetypeRegistry.ambiguities() is empty with all four defined, and a test keeps it empty.
  • A title babelette holds 64 characters, so a longer paragraph is stored as several project_text rows, one per line; micyte.tools.note_books.wrap_lines splits it and the reader joins it.

Reading

read_project(document, registry=, namespace=, labels=) returns a ProjectView with fixed keys:

KeyContent
title, kind, owner, site, opened, status, owner_profile, header_addressFrom the header
texts{role: [{order, text}]}
artifacts{role: [{slot, order, caption}]}
facts{kind: {value, word}}
extras{archetype: [{address, fields}]} for rows of any other archetype the registry covers
unmatchedAddresses of rows no archetype covers

No row is dropped. A site that needs a shape the four cannot express defines a derived archetype in the library as a member of the project class; the reader returns its rows under extras, and only that site's resolver needs to read them.

Profiles: a business and its people

A profile (a trade's page on a public channel) is a project document whose header is a workmen_profile, a derived archetype of the kind_trade_profile class read by micyte/core/datum_ops/trade_profile.py. Only a legal entity claims one: a sole proprietorship or a company, which always has at least a principal. The people who work for it are personnel_profile documents filed under it.

ArchetypeCells, in order
workmen_profile (a business's profile)msn_id the registrar entry it is about (required) · lcl_id node · title (only when the registrar holds no name) · service_area_msn places served (a run) · residential · commercial · insured · connected (required) · industry_type · logo · sole_proprietor (required) · registered_entity · subcontractor_msn (a run)
personnel_profile (one of its people)lcl_id the person's node · ruiqi_id the name, first then last (a run) · principal yes or no (required) · logo their picture · service_type the kinds of work they do (a run of nodes under job)
  • The registrar holds the entity (operator, 2026-11-28). The name, email, phone and website are the registrar's (a business's phone on its legal_entity row, its email and website on its card), and a profile page and the channel read them by the profile's msn_id (directory.entity_facts). A profile is created about an entry the registrar holds; one it does not hold is entered first (registrar_entity_runtime.register_entity), at its street address, or at its town's seat house when the address is not known. An entry the registrar holds as a natural person is refused (local_domain.HEADED_SUBJECT_KINDS).
  • A person has no msn. A person is an object of the business's node in the sandbox's own tree: their node is a child of the business's (objects › profiles › <business> › <person>), the one place a document's node may hold another document's node beneath it (local_domain.MEMBER_KINDS). So a person is never listed by the registrar, and a person's name lives only in the sandbox that keeps them. A person's bio is the document's text rows, about the person's own node.
  • One principal. The first person added is the principal. Making another the principal unmakes the one before in the same write, and the only principal cannot be unmade. principal is required so a person's header is never also read as the registrar's natural_entity_profile (both name a person).
  • sole_proprietor is written yes or no on every header, and connected on every header. connected tells a profile from a registrar card, which also names an msn.
  • industry_type names a node under the tree's industry_type class (the general trade); the kinds of work stay under job. logo names an image slot.
  • How a profile is drawn (trade_profile.figure): as a building when registered_entity is on and sole_proprietor is off; otherwise as a person. A logo takes the figure's place on the profile's picture. The profile's node wears the matching folder mark (natural entity profile or legal entity profile), unless it wears a glyph somebody chose.
  • What a channel shows of a person. A channel serves a reader with no contract a person's role and the kinds of work they do, and masks who they are: the name is masked characters, and the picture and bio are left out (channels.declared.addressed_person). The photograph route serves a person's picture only when the card it is on shows it.
  • Headers written before 2026-11-29 were natural_entity (a person's) or legal_entity (a business's, with personnel_msn, a run of msns). The host re-points them as workmen_profile once; a store holds no person's header after that.

Pictures

A project_artifact names an artifact slot: a node under the tree's artifacts › image (or video) kind whose art. document holds the bytes, filed with file_artifact.

Export

site_hosting project.export writes the project's view as JSON beside the site's assets (<date>.datum-project.<slug>.json), copies any picture the site's image pool lacks (matched by SHA-256 of the bytes), and derives the site profile the pages are generated from (feature image, order, hidden pictures, captions, name, descriptions). Profile fields the document does not hold are left unchanged. The host implements it in project_export_runtime.py and utilities_extensions/site_profiles.py.

After a profile has been exported, a profile.edit on it is applied to the document and the document is exported again (project_edit_runtime.py). An upload through the page files the picture in the datum store and in the document's gallery in the same step.