Employee Portal — as-built documentationArchitecture · security · integrations · inventories generated from the source · runbook · generated

How the TJFACT Employee Portal is built — as deployed.

The handoff record for whoever runs the portal after Paint Your Heaven: what the pieces are, where they live, how access is decided, what talks to what, and the exact commands to keep it healthy. The inventories on the Modules, Roles, Lists, Routes, Configuration and Pages tabs are generated from the deployed source (not typed), so they cannot drift from the running build. No credentials, personal data or controlled information appear here.

Architecture

One host, three moving parts: a reverse proxy, a static page, and a Python service that owns state and every integration.

Browser

/prototype — the portal, one self-contained HTML file (all CSS and JS inline); renders what the session’s modules allow
/delivered · /guides · /asbuilt — handoff pages, gated by the same sign-in
Careers — the public job board (open module)
Microsoft sign-in redirect → /gov/auth/login → back to the page you asked for

Host (Caddy → service)

Caddy terminates TLS and serves the static files from /opt/hbf/caddy/site/tjfact/; /x → x.html
/gov/* is proxied to the Python service on 127.0.0.1:8791 (/gov stripped)
Service: /opt/hbf/tjfact/tjfact-config.py, systemd unit tjfact-config, standard library only — no framework, no database server
State: /opt/hbf/tjfact/ — configuration + 60 revisions of history, lists with per-row history, HR files, sessions key, admin token, audit log

Systems the service talks to

Microsoft Entra / Graph — sign-in, groups → roles, OneDrive & SharePoint files, mail from department mailboxes, Teams digest, directory import
UKG Pro — web services + REST: workforce, jobs, org levels → directory fill; probe & coverage
Deltek Costpoint — read-only bridge through Costpoint web services since 27 Oct: AR, AP, cash per GL account, project funding and billed to date, and (28 Oct) GL actuals by account and organization for the department budgets, hours by employee and project for the PMO and leave taken per leave period (timesheets and leave requests built, waiting on Costpoint set-up), each on its own clock; Finance switches each figure between Costpoint and its OneDrive report (28 Oct); every figure names its Costpoint - production, Deltek’s WIC copy or a test copy - and the date of its newest entry
SAM.gov · USAspending — opportunity feed, recompete radar (server key, shared cache)
AI vendor for Dash — OpenAI (GPT-6 Astra at maximum reasoning effort, pro mode for work; fallback GPT-6.1 Sol, then GPT-5.6 Sol) or Anthropic (Claude Fable 5.1, effort max), server-side key, rate-limited, CUI-flagged; answers run as polled jobs, and Dash is given the person's own task list

Everything the browser needs comes from the same origin. The page never holds a secret: keys and passwords live in the service’s configuration as write-only fields, the browser learns only that one is set.

Security posture

How access is decided, and what stops a mistake becoming an incident
IdentityMicrosoft Entra sign-in (OAuth code flow, signed state). Sessions are HMAC-signed cookies (tjs, HttpOnly, SameSite=Lax, Secure), 12 hours. Terminated in the HR directory = refused outright.
AuthorisationRoles carry modules (73, in 10 groups). Every list read/add/write, every config row and every route is gated server-side by module; the page only hides what the server would refuse anyway. Employee-facing intake lists accept adds from anyone signed in; only the owning module reads the queue.
AdministrationSuper admin is a locked role; roles and people are edited on the Admin dashboard with a change log. A separate admin token (file on the host, never in the page) is required for direct deploys and unlocks everything for operations; rotating it is a runbook step. A deploy can also be staged with no token: the staged file changes nothing until IT approves it on Admin → Deploys waiting for you (only IT sees that card). An update staged before newer work went live, replaced by a newer staged update, or waiting more than 24 hours is marked out of date and cannot be approved; every applied change is logged.
Department heads28 Oct: each department (the module groups Finance, HR, Payroll, PMO, Deployment Ops, Business Development, Proposals, Security, MPP CRM) has heads the super admins name. A head gives anyone in the directory (an employee or a current guest) the department’s roles, or single parts of it granted by name beside their roles, and takes them away - never another department, a super admin, a super-admin-only module or Administration, and only through /gov/access. An Access Request is read by who asked, who it is for, the department’s heads and the super admins, and is decided only there: an approval grants at once. Every change is in the permission log and the audit trail, with the request number.
SecretsConfiguration fields that look like credentials are moved to the secret store even if submitted as public; they are never returned to a browser. Probe output is scrubbed of key material before it is sent.
WritesSame-site check on browser writes; per-IP rate limits (saves, probes, AI, deploys); size caps per body, per row (16 KB) and per list (1,500 rows); every configuration save snapshots the previous revision and appends an audit line (who, row, fields).
Controlled informationBy TJFACT’s 18 Sep decision, CUI/CMMC material never enters the portal. Documents are scanned for markings on read and held; two Deployment Ops boards stay out, and a Deployment Ops write or Monday import carrying a marking is refused and journalled; Dash flags controlled markings; the Admin → CUI compliance path page records the position.
People records27 Oct: employee tracking, employee leave and candidate feedback, scorecards and documents are route-only lists - the generic list API refuses them, reads included - and each route decides record by record: HR every record, a PM their own people (UKG’s supervisor line, or the PM named on the record), the hiring PM their own candidates. Leave keeps only the category (Medical, Military, Family, Personal) and the dates; the category never goes in e-mail. Birthdays keep the month and day - the year is dropped when UKG’s feed is read. Pay stays with payroll.
Deploy safetyOnly allow-listed targets; content must hash to the declared sha256; Python must compile; previous version kept; one-call rollback. Training media uploads in verified parts. A staged deploy is checked when it is staged and again when IT approves it (hash, and compile for the service); at most 20 wait at once and staging is rate-limited. A staged bundle of website files (27 Oct) is checked file by file - flat, allow-listed names, each under 6 MB - and refused at approval if any of its files changed on the server after it was staged. Help videos (29 Oct) stage the same way through /deploy/stage-part: in parts of at most 7 MB, each file checked against its sha256 and its type (MP4, JPEG, WebVTT, the help-videos.json manifest), allow-listed names, at most 80 MB a file; IT approves them on the same card and they are written atomically into the training folder with the previous file kept.
MPP CRM28 Oct: every CRM route checks the signed-in person’s role on the base (owner, creator, editor, commenter, read-only; table and field permissions; locked views) on every request, and a base nobody shared with you answers 404. Partner accounts (the protégé’s people, B2B guests of TJFACT’s tenant listed on a partner organization with an end date) hold exactly one module, and a gate right after the block gate answers 403 to every non-CRM route. Text and files are CUI-scanned on the way in and refused when marked; deletes go to the base’s trash; form, shared-view and webhook links are capability links masked in the access log; personal access tokens are stored hashed; public (signed-out) links stay off unless a super admin allows them.
MPP Program Hub28 Oct (r44): the weekly-sync base (action items, WBS lines, events, meeting log) is shared exactly as the MPP CRM base - the PMO program module edits it, super admins own it, partners only if an owner shares it with their organization. Its pages (agenda, boards, stats, WBS schedule, events) read what the base already sent the browser and write only through the CRM’s record path: permissions, the CUI guard, history, undo and the trash apply to every change. Program Day 1 (base settings) is for owners.
MPP CRM add-ons28 Oct (r41): a base fed from portal lists opens only for people who can read every feeding list on the portal (a guard inside the CRM’s own role check, so every route, the home, the REST API and Dash agree), never for a partner, and cannot be shared with a partner organization; copies into the MPP CRM are made only of records someone ticked, after a confirmation that names what the protégé will see. E-mail logging reads the shared mailbox only, logs only mail Exchange authenticated as sent from inside TJFACT (a forged “from” never logs), sends protégé-visible bases only mail tagged #mpp, and stores nothing CUI-marked. SAM.gov look-ups use BD’s key server-side (never in a response, file or log) and its allowance; USASpending needs no key; both are fixed hosts.
CostpointThe bridge has no write path: REST reads are GETs, and Costpoint’s own web services can be called only for the export and schema reads (the import, process and report operations are not callable); HTTPS only; per-read errors are named; credentials never leave the server; a refused sign-in stops the connection test, so testing cannot lock the account.

Integrations

What each connection does, how it authenticates, and where it is configured
SystemUsed forConfigured on
Microsoft Entra IDSign-in; Portal-* groups → roles; app-only Graph token for the serverChecklist → Microsoft 365 → Entra row (admin-only)
Microsoft GraphOneDrive/SharePoint reads (documents, Finance report exports, budgets, the Costpoint training guides folder read through its sharing link and streamed to each reader), department mailboxes (offers, invites, reminders), Teams digest, directory importEntra row + M365 rows (sites, mail, Teams)
UKG ProWorkforce, jobs and org-level tables → directory fill; coverage probe; onboarding deep linksChecklist → External systems → UKG
Deltek CostpointCash / AR / AP / funding / timesheets — report route (OneDrive exports) now; a read-only API route when an account is saved — Costpoint’s REST reads, or its own web services (Integration Console export methods, signed in as user__system: TJFACT’s WIC environment, then TEST)Checklist → External systems → Costpoint (admin-only)
MPP CRMThe portal’s own Airtable-style workspace (no outside vendor): bases, tables, every field type, eight view types, interfaces, automations (company mail and the Teams webhook), extensions, import/export, comments and history, Dash, and an Airtable-shaped REST API for personal access tokens. Data lives in the state folder (crm/: an index, one file per base plus its log, attachments, snapshots)CRM home → Administration (partner organizations, tokens, public links); each base → Share
SAM.gov entity API · USASpendingThe MPP CRM looks organizations up in SAM.gov’s Entity Management API (v3, BD’s SAM.gov key, its daily allowance shared with the opportunity feed - automatic look-ups at most a twentieth of it, never the last tenth) and their contract awards of the last five fiscal years in USASpending (no key). Answers cached 30 days in crm/x-gov-cache.jsonAn organization → Look up in SAM.gov; table menu → Enrich every organization
Portal mailbox → MPP CRME-mail logging reads the mailbox the eBuy and GovWin importers read (Microsoft Graph, the app registration’s mail permission), every 5 minutes, since the last look; it never moves or marks a messageCRM home → Log e-mail to the CRM; Administration shows its health
SAM.govOpportunity feed and notice search for TJFACT’s NAICS codes; shared server cacheChecklist → BD → SAM.gov key
USAspendingRecompete radar (expiring awards, incumbents); no keyChecklist → BD → Recompete
AI vendor (Dash)Chat, extraction, analysis notes. OpenAI GPT-6 Astra on the Responses API at reasoning effort max (pro mode for Dash's work; the vendor refusing a mode, an effort or a model steps down, never stops), with GPT-6.1 Sol / GPT-5.6 Sol fallback, or Anthropic Claude Fable 5.1 at effort max; no completion cap; store off; retries; live status probe that lists the models the key can use. Since 29 Oct each question also carries the page the person is on and, for people with the MPP CRM, a digest of the bases they have a role on (the Program Hub’s open items, WBS lines, events and latest notes; the MPP CRM’s latest opportunities) - read through the CRM’s own permissions, every line CUI-scanned, capped, and nothing for partner usersChecklist → Dash row (admin-only)
GovWin IQBuilt for either decision on the subscription, and the two halves are independent. Without GovWin the BD Suite covers the same market research in house from live public data (SAM.gov, USASpending, FPDS) with no seat licences. With GovWin it is worked inside the intranet, with no outward links: every tracked opportunity has a full record on the BD page (all mapped fields plus the export's unmapped columns, editable, stored on the capture pipeline row and keyed on the GovWin #), filled by importing a GovWin xlsx/CSV export. The Web Services API (paid add-on) refreshes the tracked list every ten minutes and adds each opportunity's contacts and documents; read-only towards GovWin by Deltek's designChecklist → External systems → GovWin

Prepared by Paint Your Heaven LLC for TJFACT LLC. Inventories generated from the deployed source at . Nothing here carries credentials, personal data or controlled information.