Frontend
Русский | English
A React and TypeScript SPA built with Vite and organized using FSD. Registration, email confirmation, sign-in, consent settings, the candidate profile and questionnaire, candidate assessment, company profiles, employer needs, and support cases use the API. A manual assessment request creates a support case and displays its current state; the screen does not present it as an assessment result. The result history and result page use the API. Candidate search and the employer's read of an anonymous card use the API; invitations remain a placeholder.
src/app/starts the application: the route tree (router/), the query client (providers/), global styles, and the route error page.src/pages/holds public pages, sign-in and registration, candidate profile and questionnaire, assessment results, company and employer needs pages, candidate search, support cases, technical status, and remaining placeholders.src/widgets/holds shells:public-shell,candidate-shell,employer-shell, the result history widgetassessment-history, the search result widgetmatch-list, and the technicalsystem-statuswidget.src/entities/holds entity models, includingneed(see Need entity) andcompany;src/features/holds user actions and forms.src/shared/ui/holds design tokens, fonts, logos, and primitives;src/shared/config/holds route paths;src/shared/api/holds the API client with generated endpoints, Zod schemas, and MSW mocks.codegen/orval.config.tsconfigures generation from the shared OpenAPI contract;codegen/mock-patterns.tsis the step after Orval that fixes MSW mocks of strings with apattern(see API client generation).scripts/checks FSD boundaries and Orval compatibility with the OpenAPI 3.2 fixture.e2e/holds Playwright specs andplaywright.config.tsconfigures them; they run only against a Compose stack.
From the repository root, make -C frontend dev starts development and make -C frontend check runs checks and builds the app. In Docker, Nginx serves the built files using configuration from deploy/nginx/.
Routes
| Group | Paths | Shell |
|---|---|---|
| Public | /, /login, /register, /verify-email, /support, /status |
PublicShell |
| Candidate | /candidate with onboarding, profile, questionnaire, assessment, results, results/:attemptId, invitations, privacy, support/cases, support/cases/new, support/cases/manual-assessment, and support/cases/:caseId |
CandidateShell |
| Employer | /employer redirects to /employer/company; /employer/company, /employer/needs, /employer/needs/new, /employer/needs/:needId, /employer/candidates, /employer/support/cases, /employer/support/cases/new, /employer/support/cases/:caseId |
EmployerShell |
Each group has its own not-found page. Paths are defined once in shared/config/paths.ts. The router uses React Router data APIs (createBrowserRouter): a route-level error boundary, loader redirects, and later lazy code splitting for cabinets. Loaders do not fetch data; server data belongs to TanStack Query. Cabinet boundaries read the current session and direct guests to sign-in. /support sends a signed-in user to the support area for their account or to sign-in. Need pages pass organization_id in the query string, but the client checks the current owner directory and the server authorizes every request.
/status is a service page: it checks /api/v1/healthz and is linked from the public footer only. It is not a product readiness indicator. In development mode the same page shows a gallery of states built from local fixtures (an error with retry, loading, empty, forbidden, saving, trust levels); production builds do not include it.
Server data
Generated Orval hooks call the shared same-origin apiRequest client, so the QueryClient has no default query function. Defaults in app/providers/query-client.ts:
- retries: up to two, only for no response (status 0) and 5xx except 501; 4xx and
invalid_responsefail at once; staleTimeof 30 s; window focus does not refetch, and screens that need fresh data opt in per query;- automatic mutation retries are disabled; company creation retries through an explicit action with the same body and
Idempotency-Key.
Candidate profile
entities/candidate holds the complete profile draft model and converts it to CandidateProfileUpdate. features/edit-profile owns the fields and saving, while pages/profile owns the page. Server data stays in React Query; contacts and drafts are not written to localStorage or sessionStorage.
The form preserves the provenance of untouched suggestions, displays overlapping employment periods, and requires explicit confirmation of parallel work. Confirmation is bound to the current indices and dates; reordering or changing periods requires another review. Confirmed categories are displayed separately and never enter the save body. A 412 version conflict preserves the draft and offers an explicit replacement with current data.
After saving, the form reloads the session and shows the account step returned by the server. Saving a profile does not complete the consent step; that transition is not implemented yet. Independent profile editing works without ML, a file, or FSP.
Candidate questionnaire
pages/questionnaire reads the specialization catalog and the current candidate's private answers through Orval. The draft stays in component state, saved answers stay in React Query, and reload restores the server record. The form offers one or two specializations, self-assessed grades, currently available task languages, stack, experience, and work formats. A specialization without a published bank is marked in development and can be saved without FSP.
A 412 conflict retains the draft and offers explicit reload or replacement against the latest read version. Session errors hide private answers; responses from a previous account cannot repopulate the cache. Onboarding links follow the step returned by the server. /candidate/questionnaire is the destination for the saved questionnaire step.
Candidate home
/candidate opens at every saved onboarding step and does not redirect: the pages/candidate-home page shows the saved account step (onboarding_step of the current session) and leads to the next action. The "Next step" block (widgets/candidate-next-step) and its selection logic (entities/candidate, buildCandidateJourney) use only server answers: the profile version (GET /me/profile; version 0 means the profile was never saved), the questionnaire (GET /me/questionnaire), and the assessment availability with the confirmed grade (GET /me/assessment-availability). The rules apply in order: a confirmed category leads to the result and visibility settings; an empty profile leads to the profile form; an empty questionnaire leads to the questionnaire; an active attempt leads to resuming it; otherwise the test is next. The saved step is shown only: the server advances it when the profile or the questionnaire is saved from the matching step, so a saved profile can sit behind the earlier "Consents" step, and the presence of saved data decides between the profile, the questionnaire, and the test. Linking an FSP ID and ML extraction are not needed on this path and are never shown as an error or a missing condition.
The declared level and the confirmed category are always shown apart, per specialization: the declared one comes from the questionnaire self_assessed_grade and is labeled as self-assessment, the confirmed one only from the availability confirmed_grade. The client does not derive a category from scores, thresholds, or the target grade. The page also shows the latest result (GET /me/assessment-results?limit=1, restated by assessmentResultSummary, with links to the breakdown and the history) and the profile visibility (GET /me/privacy: card open or closed with the reason, whether the category is shown, search status) with a link to /candidate/privacy.
Every block has loading, error with retry, forbidden (401 and 403 without retry), and empty states. The three reads that the next step depends on form one state: if any of them fails, an error with retry appears instead of a step guessed from partial data. The result and the visibility are independent, so their failure does not hide the next step. Query keys contain the account id, data does not outlive the screen (gcTime: 0) and is read again on every open and on returning to the tab, so a page refresh shows the current API state. Signing in again still opens the saved-step page (getOnboardingDestination), not the home.
Candidate assessment
/candidate/assessment reads availability and creates attempts through the API; /candidate/assessment/:attemptId resumes an attempt, submits answers, and finalizes it through server commands. Real assessment requires current C3 consent. demo_express is labeled as a demonstration and does not award a qualification score or confirmed category. The attempt screen displays the server result with the same component as the result page and links to it (see Candidate results). Only the server assigns a category; the client calculates neither scores nor grades.
Before a real attempt starts, the screen shows a dialog that lists the signals. The browser records tab or window switches, copy, paste and cut, and fullscreen exits; the server measures the answer time per item, a change of network address during the attempt, parallel sessions, and the match of answer digests with other candidates' answers. The dialog states that image, sound, and clipboard contents are not collected, that addresses and session tokens are not stored (only one-way keyed digests), and that browser events are stored only while the C3 consent is current. The attempt cannot start without confirmation: closing the dialog or pressing Escape starts nothing. The confirmation is stored on the server (/me/assessment-signal-notice) for the text version, so a reload or a new browser does not ask again; the same dialog opens when an older attempt that was created without the confirmation is resumed. It is a record of being informed, not a consent: C3 stays separate.
During a real attempt, features/assessment-signals collects the disclosed signals: focus loss with its duration, copy, paste and cut with a size only, and fullscreen exit. The listeners are passive, block nothing, and show nothing. Events go in batches (every 10 seconds, when the tab is hidden, or at 20 queued events), and each batch keeps one Idempotency-Key across retries. When the page is closed (pagehide) or the collector unmounts, what remains is sent in one last request with keepalive, so closing the tab does not lose the last seconds of events; the result of that request is not awaited and not retried. A network failure never affects answer submission: a failed batch is sent again with the same key and body after a growing pause and is dropped after the attempt limit. A server refusal (no C3, finished attempt) stops collection. The demonstration run collects no signals.
Clipboard contents and typed text are never read into a signal or sent. The paste size comes from the paste event: file sizes (File.size) plus the UTF-8 length of the plain-text item of clipboardData; the string lives in one local variable during the count and is not kept. The Clipboard API (navigator.clipboard) is not used. The copy and cut size is the selection length in UTF-16 code units taken from the field offsets without reading its value; when the active field has no numeric offsets the size is zero and the page selection is not read. It is an approximate size, not an exact byte count. The answer time per item is measured by the server and not sent by the client. Event timestamps are moved to server time: the client remembers the difference between the device clock and the Date header of API responses, because the server rejects a whole batch when a timestamp is more than five minutes from its own clock. Durations use the device clock and do not depend on that difference. Browser signals are easy to forge and false positives are possible, so they are only a hint for a review.
Candidate results
/candidate/results lists the completed real assessments of the current candidate (GET /me/assessment-results, 20 records per page; the cursor comes only from the server response and is never built on the client). /candidate/results/:attemptId opens one record by a direct URL. Both screens read data only for a confirmed candidate session: query keys include the account identifier and the session token, data does not outlive the screen (gcTime: 0) and is removed when the session changes or ends. A 401, 403, or 404 response shows an "unavailable" screen without data and does not reveal whether another candidate's result exists; the assessment cache is cleared only on 401, while a network or 5xx failure offers a retry and is not treated as lost access. A failed background refresh keeps the data that was already loaded and says so. Dates are shown in the browser time zone with its name. "Show more" moves the focus to the first new row and announces how many were loaded. Loading, empty history, and error states with retry exist. A failed attempt after a successful one, adaptive estimate values, retry dates, and missing-field cases are covered by unit contract fixtures because the stand cannot produce them; the e2e test checks the shape of the flow (a real result, the express run, ownership, sign-out; the interface has no sign-out control yet, so the session ends through the API). By contract, demonstration runs are not part of the history; their result opens from the attempt screen or by a direct URL and is always marked as a demonstration.
On the attempt screen only the phrase "Result received" is a live message; the record is ordinary content, and the focus moves to its heading. The shared AssessmentResultView component (entities/assessment) only restates the fields of the server response:
- the category comes from
category_decision, not from the target grade; the decision date, the method and its limitation, the "provisional" status foruncalibrated, the basic score, the method limitations, the practice, and the time (which does not affect the decision) are shown; - an adaptive result shows θ, SE, the 95% interval, P_G, and the strength with the values the server returned (decimal comma, two to three digits, no recalculation); when
uncertainty,strength, or the score isnull, the rows are omitted and no zeros are substituted, and an adaptive attempt without an estimate gets a note; fordemo_basicthe screen says that no percentile, ability estimate, or P_G is calculated; - a failed attempt shows the attempt result separately from the previous category, which stays in force; next steps come from
next_stepsin the server order under an "as of the decision" heading: the date comes fromavailable_at("Available from ..."),nullmeans the step was available immediately at the decision, and the checks page shows the current availability; - an offer to accept a lower grade (
accept_lower_grade) is plain text only: the category does not change without a separate candidate command, and the interface has no such command yet; - an express result is marked as a demonstration without a real grade, shows no category or estimate, and leads to the full assessment; a prepared full attempt appears as a separate history record, and the decision source is shown when the server reports one.
Privacy settings
pages/privacy (/candidate/privacy) shows separate visibility settings. No action enables another: consent, publication, search status, and hiding an organization are saved by their own requests, each with its own version and its own saving state.
- Consents (
features/consent-management): C1-C5 are granted and revoked separately, with the text and version shown before a grant. The block of each purpose has an anchor that the "Go to the C2 consent" button moves focus to. - Publication (
features/profile-visibility): step 1 shows whether C2 is active from the complete active consent history; an unknown or partly loaded state is not treated as consent, and saving stays unavailable. The step button only moves focus to the C2 block and grants nothing. The card state and fields are chosen next, and the publication is saved by a separate action (SetMyPublication,expected_versionin the body). A 412 conflict keeps the draft on screen and offers an explicit reload of the current settings; a failed save does not reset the draft. Revoking C2 closes the card, and a new C2 does not reopen it. - Closure explanation: from
closed_reasonthe screen says that future reads are closed at once, that a new C2 does not reopen the card by itself, and that a former company needs a new invitation and a new C4 to read contacts. The same words appear after revoking C2, hiding an organization, unhiding it, and republishing: an earlier contact access is not restored. Hiding does not change the C4 record in the consent ledger, so next to the C4 of a hidden company a note says that the record does not bring contact access back. - Search status (
SetMySearchStatus) is its own request and its own text. It does not change the publication and grants no consent. - Employer preview (
EmployerCardPreviewfromentities/candidate-view) is built only from theGET /me/privacy/previewresponse. The preview alias is separate from organization aliases. Confirmed categories and self-assessment are shown apart; each specialization has its own "Grade confirmed" or "Grade not confirmed" status (the Russian labels are "Грейд подтвержден" and "Грейд не подтвержден"), told apart by the shape of the mark and by text, not by color. A candidate without a confirmed grade sees the declared level (or "Level not specified") and the not-confirmed status for each specialization separately; a confirmed Backend is not carried over to a network specialization. The evidence block shows the skill, grade, confirmation level, year, basis, and calibration as the server returned them (synthetic_demoanduncalibratedare shown as a synthetic demonstration, not a validated measurement, and as thresholds that are not calibrated). A closed card is shown as an empty state. The preview creates no access record and ignores organization filters. - Hiding organizations: the hide button is offered only for organizations in the candidate's own access history (the server answers 404 for the rest), and only after the list of hidden organizations is fully loaded. Unhiding does not restore contact access.
- Histories: the settings history and the card access history are paginated; a partial page is never presented as complete. An access record shows the kind of access, the time, and the organization when the server names it (otherwise "Organization is not disclosed"); it carries no employees, queries, filters, or search position. An empty history and a load error are separate states.
- A link to request a manual assessment stays below.
The employer's card read and the search are described in Candidate search. The effect of hiding or a revoked C2 on a search is not yet checked from the employer's browser: the end-to-end suite does not repeat it on the employer side.
Company profile
pages/company selects a company from the paginated active memberships of the current account. Only an owner may read or edit its profile. The form keeps its draft in memory, displays the server verification level without a promotion action, and builds its preview only from candidate_card.
Creation uses one idempotency key for retries of the same body after a lost response. A 412 version conflict preserves the draft; the user explicitly loads current data, reviews the reapplied changes, and saves again. Background refresh does not reset the draft. A 401/403/404 response hides the profile and clears its cached query, then reloads the company directory. This complements server membership checks rather than replacing them.
Employer needs
/employer/needs shows a paginated list of organizations where the current account has an active owner membership and their needs. /employer/needs/new?organization_id=... creates a need, and /employer/needs/:needId?organization_id=... edits one. A URL or cached response grants no access: the client checks the current session and owner directory, and the server checks membership for every request. Cached data is scoped to the account and organization; a response from a prior session cannot populate the new cache. A 401/403/404 removes the organization's private queries.
The editor draft stays in memory. Fields and skills extracted from the source remain suggestions with provenance until the user confirms, edits, or deletes them. Unknown values are not replaced with defaults. Readiness questions appear next to missing fields; recommendation status and categories come from the API, with no fabricated results. If a create response is uncertain, retry sends the unchanged body with the same idempotency key. A 412 conflict retains the draft, offers the latest version, and requires review of reapplied changes before another save.
Need entity
entities/need converts the generated DTOs of the need contract (Need, NeedCreate, NeedUpdate) to a form model and back. It is pure functions without React and without its own store; server data stays in the TanStack Query cache. Need pages and forms live in pages/needs, pages/need-editor, and features/edit-need.
fromTransportbuilds a draft from aNeed. Each requirement field is an explicit state:unknownwithout a value,extractedas a stored suggestion with its provenance and quote, andconfirmedas a confirmed value. An unknown field never becomes an empty string, an empty list, or a default value; a skill outside the taxonomy keepstaxonomy_code: null. Data that breaks the rule "value and source are null exactly when unknown" is rejected withNeedTransportError.toUpdateBody(need, draft)sends only the fields whose request value changed, plus theexpected_versionof the read version. An untouched suggestion is not sent; when its field or list is sent for another reason, it goes with statusextracted. A cleared field is sent as null, an emptied list as[], and an untouched list is absent.toCreateBody(draft)always sends the title and leaves out unknown fields and empty lists, so the server extracts them fromsource_text.- The edit functions (
confirmField,setFieldValue,clearField,confirmSkill,moveSkill, and others) keep the invariants: only an untouched suggestion has statusextracted, an edited value becomesconfirmed, and moving a skill between lists does not confirm it. validateNeedCreateandvalidateNeedUpdatecheck the body with the generated Zod schemas and tie the problems to form fields. The server checks cross-field rules (the salary width, a repeated skill), andneedFormFieldOfmaps its pointer to a form field.
The tests take their fixtures from the named contract examples in api/core/openapi.bundle.yml and check every body with the generated NeedCreate and NeedUpdate schemas.
Candidate search
/employer/candidates (pages/matches) searches through POST /organizations/{org_id}/matches (SearchOrganizationMatches). The server model is in the architecture and the contract in the API.
- Access. Only the active owner of a company can search. The organization comes from
organization_id, and the owner's company list is read on every visit (as on the needs page). Without the right the page shows "Нужны права владельца компании"; 401 and 403 show the forbidden state, 404 shows the error "Потребность или компания не найдены", and other failures show a message with a retry. A 429, if one arrives, shows itsRetry-After. - Runs only on an action. The page and a reload never search: the result lives in a component mutation and is not stored. Above the "Найти кандидатов" button the form says that a search spends card view quota: each newly shown candidate counts as one view, and a candidate already shown in the current window is not charged again. A second press is ignored while a search runs.
- Basis. "По потребности": the first 100 needs of the company, the requirements version comes from the
GETof the need (requirements_version, not the generalversion), filters are added on top; the grade of the need is not a filter, and the form says so under the picker. The "Подобрать кандидатов" link on a need opens the search with that need chosen. "По всем профилям": a request with filters only, and each specialization of a candidate arrives as its own entry. - Filters (
features/filter-matches): specialization, confirmed grade, confirmation status, the grade the candidate declared, card technologies (all required), work format (one common format is enough), and salary expectation compatibility. The declared and the confirmed grade are separate fields with separate labels, and the hint under the declared one says it is not a confirmation. The form sends exactly the filters that are on and relaxes nothing: a contradictory pair (for example "not confirmed" with a confirmed grade) is sent as it is and gives an empty result. If the form changes after a result, a note above the result says that it is out of date; the result does not refresh by itself. - Result (
widgets/match-list). The heading "Результат поиска" takes focus after a search. Below it come the basis and the current filters: for a search over all profiles these are the normalized filters of the response, and for a need search the response does not repeat them, so the sent filters are shown. Then the three groups in a fixed order: "Подтвержденные", "Близкие варианты", "Грейд не подтвержден". An empty group stays with the line "В этой группе записей нет.". Thetruncatedflag is explained by "Показана часть выдачи; квота просмотров или предел группы" with no number. An empty result is explained separately: the filters stay on, the ones the employer can change are listed, and nothing is relaxed automatically. - Specializations. An entry is one candidate under one specialization, so one alias can stand in two groups (confirmed in Backend, not confirmed in Networks). When the result holds more than one specialization a view switch appears ("Все специализации", then each one): it hides the entries of the other specializations, recomputes nothing, and carries no confirmation across. The alias is shortened for display (
entities/match/model/views.ts); the full value is used only by requests and the invitation link. - Entry (
entities/match). It shows the specialization, the status "Грейд подтвержден: X" or "Грейд не подтвержден" (by icon shape and text), the confirmed category with its strength on a line apart from the grade the candidate declared, the safe card context (technologies, experience, formats, expectations), and the server's explanation of sources: everyevidence_summaryrow with the state "Подтверждено", "Подтверждено частично", "Только заявлено кандидатом", or "Пробел: подтверждения нет". Anullcontext value is printed as "Нет значения в карточке", because the contract does not say whether it is hidden or absent. The entry has no contact, no real identifier, and no reason why a grade is unconfirmed. - The explanation opens with a button that carries
aria-expanded. It is built only from the components of the response: Fit, Cov, Dom, Sem, the percentile, V, Fr, Rsp, and the final score S appear exactly as they arrived, with no rounding beyond six decimals. A neutral value (unknown_flags) is labelled "Нейтральное значение, не измерено" with its reason (ml_unavailable,cohort_below_30,percentile_not_computed, and others). Anullpercentile is printed as "Нет значения" and no number is invented. A zero competition value is called "не штраф". An entry without a confirmed grade has only Fit and Cov: the server computes no S, percentile, or category for it, and the screen draws none. Unknowns outside the scores (experience, formats, expectations, the assessment result) are listed under "Что неизвестно" with a note that they are not an absence of ability. - Opening a card. The "Открыть карточку" button reads
GET /organizations/{org_id}/candidate-cards/{handle}and, when the card has categories, the evidence section as well; the server refuses the section for a card without categories, so the request is not sent. Reads are neither retried automatically nor cached after the panel leaves the screen (gcTime: 0, no refetch on focus), because every read is an entry in the candidate's access history. A closed panel stays mounted, and opening it again does not read the card again. A 429 shows "Квота просмотров карточек исчерпана" and the time fromRetry-After; when the server named none, no time is invented. A 404 replaces every hidden case with one text and names no reason. - Invitation. Every entry has a "Пригласить" button, an unconfirmed one included. It leads to
/employer/invitationswithorganization_id,candidate_handle,specialization, and, for a need search,need_id. The alias is scoped to the organization and is not a candidate identifier. The invitations screen is still a placeholder, so the link lands on it for now. - Layout. At 1280 px the form is on the left and the result on the right; below 1024 px the form sits above the result; at 360 px the entry actions stack and the facts and the explanation fold into one column. Every action works from the keyboard, focus is visible, and status is carried by text and shape, not by color.
Checks. Unit tests cover parsing and labels (entities/match), the request built from a draft (features/filter-matches), and the result markup (widgets/match-list). The Playwright suite e2e/match-search.spec.ts has two groups. The first runs on the real backend (it needs the mail and company fixtures): five synthetic candidates publish the same card with declared Backend and Networks grades, and the owner searches and checks the groups, the Backend/Networks switch for one alias, Fit and Cov against the response, a card read, an explained empty result for an impossible filter, no repeated search after a reload, and 360 px. The second group answers from a stub and covers what the stand cannot produce: the order of three groups with a confirmed Backend and unconfirmed Networks for one alias, neutral values and reasons, truncated, a 429 with Retry-After, a 404 card, errors, rights, and a need search. Confirmed groups are not checked on the real backend: a card is served only to a group of at least five identical cards, and a confirmed category on the stand needs each of them to pass an assessment. A real exhausted quota and hiding or revoking C2 from the employer's browser are not checked either.
Support and manual assessment
/candidate/support/cases and /employer/support/cases show each account's paginated support history. Their .../new routes create a case and .../:caseId routes show its status and history. The public /support route directs a signed-in user to their cabinet. The form draft stays in memory, and a retry of an unchanged request reuses its idempotency key. Support history is scoped to the current account and cleared when the session changes or the server denies access.
Candidates can use /candidate/support/cases/manual-assessment to submit a support request with a specialization, desired grade, and description. This does not run automatic assessment, create an attempt, change C3, or grant a confirmed grade. The hint under the specialization and grade selectors uses the published grades from the catalog but does not promise a rubric: the server pins the version on submission. The case page displays the status and rubric version returned by the server and, for null, says plainly that no published rubric existed when the request was made; the client does not create an outcome. After a page reload the form loses its idempotency key, and a repeated submission while a manual assessment of the same specialization is open receives 409; the page explains this and links to "My cases" without creating a second request.
Notifications
features/notifications shows the inbox of the signed-in account at /candidate/notifications and /employer/notifications, and each shell links to it. NotificationInbox takes a scope: the candidate cabinet, or one organization. OrganizationNotificationInbox chooses the organization from the active memberships of the account (the organization_id parameter keeps the choice across reloads) and renders the inbox. The list is read on every visit and window focus and is never kept (gcTime: 0); the cached pages are keyed by account and cabinet and dropped when the account or the session changes or when the server refuses access.
The server resolves the text of every item from its current source. An item without content stays in the list with a generic line, and the client never shows an earlier copy. The read state is a word ("Не прочитано" or "Прочитано"), not only a style. "Отметить прочитанным" is a native button, sends the CSRF token of the session (read at call time; after a 403 it reads the session again and retries once, and only a 401 or 404 counts as lost access), and moves focus to the heading of the item after it succeeds, with a polite status message. A content link opens only if it is a same-origin path inside the cabinet that shows it. States: loading, empty, error with retry, forbidden (including a membership that ended), and "Показать еще" for the next page. Component tests render markup in Node; the keyboard path and the delivery of a real event are checked by frontend/e2e/notifications.spec.ts.
API client generation
make -C frontend generate runs Orval with codegen/orval.config.ts and then codegen/mock-patterns.ts. For a string with a pattern, Orval 8.40 writes faker.helpers.fromRegExp(pattern) into the MSW mock: faker prints the ^ and $ anchors and (?:...) groups as plain text, and Orval ignores minLength and maxLength when a pattern is present. The second step replaces such calls with fakeFromPattern(pattern, {minLength, maxLength}) from src/shared/api/mock-pattern.ts. It takes the length bounds from the OpenAPI contract by the name of the property that holds the call and by the pattern. The step fails when a call has an unexpected form, when the contract has no such property with that pattern, or when the matching schemas disagree on the length bounds. It leaves its own output unchanged, so generation is reproducible and make check-generated stays stable. Enums in the mocks are written as literals (enumGenerationType: "union"): Object.values of a zod.enum returns Zod internals, not the values.
fakeFromPattern parses a regular expression subset (characters, escapes, classes, groups, alternatives, quantifiers, and ^ and $ at the ends), picks a length within the pattern and the bounds, and builds the string with the faker generator, so the same seed gives the same data. Every value is checked with new RegExp(pattern, "u") and the length bounds; a pattern outside the subset (for example, a lookahead or a back reference) or unreachable bounds throw an error.
src/shared/api/mock-validity.test.ts calls every get*ResponseMock factory in endpoints/*/*.msw.ts with 25 faker seeds and checks the result with the generated Zod response schema. Orval's Zod schemas do not check uniqueItems, so the test does not cover that constraint; the response arrays with uniqueItems currently hold enum values, and the mock picks them with faker.helpers.arrayElements without repeats.
Tokens and theme
Tokens live in shared/ui/theme/tokens.css: palette, semantic colors, type scale, spacing in 4px steps, radii, lines, focus ring, content widths, and motion. Breakpoints are fixed in media queries: 360px minimum, 768px tablet (48rem), 1024px desktop navigation (64rem), and 1280px verified wide layout.
Only the light theme ships. The graphite employer sidebar is a local dark region with its own checked text, link, and focus colors. A dark theme must define and check its own pairs instead of inheriting the light accents.
WCAG 2.2 contrast of the pairs in use:
| Foreground | Background | Ratio | Use |
|---|---|---|---|
| #1B1C21 | #FFFFFF | 17.01 | Text on surfaces |
| #1B1C21 | #EDEDED | 14.53 | Text on the canvas |
| #2D2E37 | #FFFFFF | 13.48 | Secondary text |
| #2D2E37 | #EDEDED | 11.52 | Secondary text on the canvas |
| #402FFF | #FFFFFF | 6.84 | Links, active navigation, focus ring |
| #402FFF | #EDEDED | 5.85 | Labels and links on the canvas |
| #FFFFFF | #402FFF | 6.84 | Primary button, skip link |
| #EDEDED | #1B1C21 | 14.53 | Employer sidebar text |
| #FFFFFF | #1B1C21 | 17.01 | Active item and focus ring in the sidebar |
| #EC1D35 | #FFFFFF | 4.38 | Error graphics only (needs 3:1) |
| #FFFFFF | #EC1D35 | 4.38 | Glyph inside the error mark (graphic) |
Excluded pairs: red is not used for body text (4.38 is below 4.5); #402FFF on #1B1C21 (2.49) and on #2D2E37 (1.97) is not used; grey #C8C9CA (1.66 on white) is only for decorative dividers.
Fonts and logos
JetBrains Mono 2.304 (SIL OFL 1.1) is self-hosted from requirements/brandbook/: regular and bold woff2 files plus the license and authors list live in shared/ui/theme/fonts/. The font is used through Mono for numbers, scores, codes, and pseudonyms. Text uses the system font stack: Unbounded and Golos Text are not added, because their files and licenses are not in the repository.
The header uses the FSP brandbook logo: logo_02w.svg on light backgrounds and logo_01.svg on the graphite sidebar, unchanged, with the product name beside it.
Shared components
Page,Section,Stack: page layout;Pageowns the onlyh1and the document title.Button,ButtonLink,TextLink,NavItem: controls with text labels;NavItemmarks the active section witharia-current, a bar, and weight.StatusView,LoadingState,EmptyState,ErrorState,ForbiddenState,SavingStatus: screen states. Each state has its own shape and text.ErrorStateshows the code, status, server text, and request ID as plain text and offers a retry.QueryView: maps a query result to loading, error, forbidden (401 and 403 without retry), empty, or data.TrustLevel: an empty mark, ring, partial fill, or full mark with a visible label.Mono,VisuallyHidden,SkipLink,MainRegion,BrandLogo.
Accessibility: every shell starts with a skip link to main, has landmarks and a visible focus ring, and moves focus to main after navigation. Animations respect prefers-reduced-motion.
Tests
Vitest runs in the Node environment with no DOM library. Routes are rendered through React Router's static handler and checked as HTML: shells, landmarks, the skip link, the active item, redirects, and not-found pages. State tests render components to markup; the query-error test runs the real QueryClient with the generated health operation and a stubbed fetch. Playwright checks clicks, input, and focus movement in real Chromium; Vitest does not substitute a browser environment.
Playwright specs in e2e/ run in a real Chromium against the built frontend and backend: make -C deploy test-e2e starts a throwaway Compose stack and runs them in the official Playwright image, so no browser is installed on the host. Vitest excludes e2e/; make -C frontend typecheck and lint cover the specs. Artifacts of the last run are in test-results/e2e/. Details: TESTING.md.
See the development guide.