Skip to content

Routes and server functions

38 pages, 5 server routes and 80 server functions, 51 of which change data.

Pages under the pathless layout _authed need a signed-in user: its beforeLoad sends anyone else to /sign-in, and a user without a display name to /welcome.

Path Sign-in Route file
/ needed src/routes/_authed/index.tsx
/account needed src/routes/_authed/account.tsx
/properties/$propertyId needed src/routes/_authed/properties/$propertyId/index.tsx
/properties/$propertyId/amounts needed src/routes/_authed/properties/$propertyId/amounts/index.tsx
/properties/$propertyId/amounts/$kind needed src/routes/_authed/properties/$propertyId/amounts/$kind.tsx
/properties/$propertyId/amounts/financing/$chargeId needed src/routes/_authed/properties/$propertyId/amounts/financing/$chargeId.tsx
/properties/$propertyId/amounts/financing/new needed src/routes/_authed/properties/$propertyId/amounts/financing/new.tsx
/properties/$propertyId/amounts/treatment needed src/routes/_authed/properties/$propertyId/amounts/treatment.tsx
/properties/$propertyId/charges needed src/routes/_authed/properties/$propertyId/charges.tsx
/properties/$propertyId/documents needed src/routes/_authed/properties/$propertyId/documents/index.tsx
/properties/$propertyId/documents/$documentId needed src/routes/_authed/properties/$propertyId/documents/$documentId/index.tsx
/properties/$propertyId/documents/$documentId/edit needed src/routes/_authed/properties/$propertyId/documents/$documentId/edit.tsx
/properties/$propertyId/documents/new needed src/routes/_authed/properties/$propertyId/documents/new.tsx
/properties/$propertyId/edit needed src/routes/_authed/properties/$propertyId/edit.tsx
/properties/$propertyId/rent needed src/routes/_authed/properties/$propertyId/rent/index.tsx
/properties/$propertyId/rent/$tenancyId/$month needed src/routes/_authed/properties/$propertyId/rent/$tenancyId/$month.tsx
/properties/$propertyId/sharing needed src/routes/_authed/properties/$propertyId/sharing.tsx
/properties/$propertyId/tenancy needed src/routes/_authed/properties/$propertyId/tenancy/index.tsx
/properties/$propertyId/tenancy/$tenancyId/deposit needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/deposit.tsx
/properties/$propertyId/tenancy/$tenancyId/edit needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/edit.tsx
/properties/$propertyId/tenancy/$tenancyId/end needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/end.tsx
/properties/$propertyId/tenancy/$tenancyId/fees/$feeId needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/fees/$feeId.tsx
/properties/$propertyId/tenancy/$tenancyId/fees/new needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/fees/new.tsx
/properties/$propertyId/tenancy/$tenancyId/rent needed src/routes/_authed/properties/$propertyId/tenancy/$tenancyId/rent.tsx
/properties/$propertyId/tenancy/new needed src/routes/_authed/properties/$propertyId/tenancy/new.tsx
/properties/$propertyId/transactions needed src/routes/_authed/properties/$propertyId/transactions/index.tsx
/properties/$propertyId/transactions/$transactionId needed src/routes/_authed/properties/$propertyId/transactions/$transactionId/index.tsx
/properties/$propertyId/transactions/$transactionId/edit needed src/routes/_authed/properties/$propertyId/transactions/$transactionId/edit.tsx
/properties/$propertyId/usage-charges needed src/routes/_authed/properties/$propertyId/usage-charges/index.tsx
/properties/$propertyId/usage-charges/$usageChargeId needed src/routes/_authed/properties/$propertyId/usage-charges/$usageChargeId.tsx
/properties/$propertyId/usage-charges/months needed src/routes/_authed/properties/$propertyId/usage-charges/months.tsx
/properties/$propertyId/usage-charges/new needed src/routes/_authed/properties/$propertyId/usage-charges/new.tsx
/properties/new needed src/routes/_authed/properties/new.tsx
/transactions/new needed src/routes/_authed/transactions/new.tsx
/welcome needed src/routes/_authed/welcome.tsx
/year-summary needed src/routes/_authed/year-summary/index.tsx
/year-summary/$propertyId needed src/routes/_authed/year-summary/$propertyId.tsx
/sign-in src/routes/sign-in.tsx

Not covered by the server functions’ same-origin check; each route checks what it needs itself.

Path Methods Route file
/api/documents/$documentId GET src/routes/api/documents/$documentId.ts
/api/log POST src/routes/api/log.ts
/api/receipts/$receiptId GET src/routes/api/receipts/$receiptId.ts
/api/test/inbox GET src/routes/api/test/inbox.ts
/offline GET src/routes/offline.ts

Called by the UI through TanStack Start, same-origin only (createCsrfMiddleware in src/start.ts). Apart from signing in, a function that changes data (POST) checks the session itself: the signed-in layout protects pages, not endpoints. Expected failures return { ok: false, reason } with a reason code.

Change data (POST)

Function Input Defined in
setAccountLanguage localeInput src/features/account/functions.ts:10

Change data (POST)

Function Input Defined in
requestSignInCode requestCodeInput src/features/authentication/functions.ts:30
setDisplayName displayNameInput src/features/authentication/functions.ts:70
signOut src/features/authentication/functions.ts:89
verifySignInCode verifyCodeInput src/features/authentication/functions.ts:34

Read (GET)

Function Input Defined in
getSignedInUser src/features/authentication/functions.ts:55

Change data (POST)

Function Input Defined in
deleteDepositReturn depositReturnRefInput src/features/deposits/functions.ts:62
recordDepositReturn depositReturnInput src/features/deposits/functions.ts:48
updateDepositReturn depositReturnInput src/features/deposits/functions.ts:55

Read (GET)

Function Input Defined in
getDepositReturn depositReturnRefInput src/features/deposits/functions.ts:42

Change data (POST)

Function Input Defined in
addDocument readForm src/features/documents/functions.ts:103
deleteDocument documentRefInput src/features/documents/functions.ts:131
updateDocument updateDocumentInput src/features/documents/functions.ts:124

Read (GET)

Function Input Defined in
getDocument documentRefInput src/features/documents/functions.ts:93
getDocuments propertyRefInput src/features/documents/functions.ts:89
getNewDocument propertyRefInput src/features/documents/functions.ts:99

Change data (POST)

Function Input Defined in
changeOwnership changeOwnershipInput src/features/ownership/functions.ts:44
correctFirstOwnershipDate correctFirstDateInput src/features/ownership/functions.ts:59
undoOwnershipChange propertyRefInput src/features/ownership/functions.ts:55

Read (GET)

Function Input Defined in
getOwnership propertyRefInput src/features/ownership/functions.ts:40
listCurrentOwners src/features/ownership/functions.ts:66

Change data (POST)

Function Input Defined in
archiveProperty propertyIdInput src/features/properties/functions.ts:76
createProperty newPropertyInput src/features/properties/functions.ts:63
deleteProperty propertyIdInput src/features/properties/functions.ts:89
restoreProperty propertyIdInput src/features/properties/functions.ts:80
updateProperty updatePropertyInput src/features/properties/functions.ts:69

Read (GET)

Function Input Defined in
getFlatDetails propertyIdInput src/features/properties/functions.ts:94
getProperty propertyIdInput src/features/properties/functions.ts:59
getPropertyDeletion propertyIdInput src/features/properties/functions.ts:85
listProperties src/features/properties/functions.ts:55

Change data (POST)

Function Input Defined in
addFinancingCharge addFinancingChargeInput src/features/recurring-amounts/functions.ts:77
renameFinancingCharge renameFinancingChargeInput src/features/recurring-amounts/functions.ts:87
setFinancingTreatment setTreatmentInput src/features/recurring-amounts/functions.ts:96
setRecurringAmount setAmountInput src/features/recurring-amounts/functions.ts:55
undoFinancingTreatment propertyRefInput src/features/recurring-amounts/functions.ts:105
undoRecurringAmount undoAmountInput src/features/recurring-amounts/functions.ts:66

Read (GET)

Function Input Defined in
getRecurringAmounts propertyRefInput src/features/recurring-amounts/functions.ts:49

Change data (POST)

Function Input Defined in
deleteRentPayment deleteRentPaymentInput src/features/rent-payments/functions.ts:75
recordRentPayment recordRentPaymentInput src/features/rent-payments/functions.ts:68

Read (GET)

Function Input Defined in
getRentMonth rentMonthInput src/features/rent-payments/functions.ts:57
getRentPayments rentPaymentsInput src/features/rent-payments/functions.ts:47
listRentThisMonth src/features/rent-payments/functions.ts:53

Change data (POST)

Function Input Defined in
acceptInvitation invitationIdInput src/features/sharing/functions.ts:71
cancelInvitation invitationIdInput src/features/sharing/functions.ts:63
declineInvitation invitationIdInput src/features/sharing/functions.ts:75
inviteToProperty inviteInput src/features/sharing/functions.ts:57
leaveProperty propertyRefInput src/features/sharing/functions.ts:85
removeAccess removeAccessInput src/features/sharing/functions.ts:79

Read (GET)

Function Input Defined in
getSharing propertyRefInput src/features/sharing/functions.ts:53
listMyInvitations src/features/sharing/functions.ts:67

Change data (POST)

Function Input Defined in
addTenantFee addTenantFeeInput src/features/tenancies/functions.ts:155
cancelTenancyEnding tenancyRefInput src/features/tenancies/functions.ts:110
createTenancy createTenancyInput src/features/tenancies/functions.ts:81
endTenancy endTenancyInput src/features/tenancies/functions.ts:103
removeTenancy tenancyRefInput src/features/tenancies/functions.ts:116
setTenancyOccupants setTenancyOccupantsInput src/features/tenancies/functions.ts:139
setTenancyRent setTenancyRentInput src/features/tenancies/functions.ts:126
setTenantFee setTenantFeeInput src/features/tenancies/functions.ts:169
undoTenancyOccupants tenancyRefInput src/features/tenancies/functions.ts:149
undoTenancyRent tenancyRefInput src/features/tenancies/functions.ts:133
undoTenantFee tenantFeeRefInput src/features/tenancies/functions.ts:179
updateTenancy updateTenancyInput src/features/tenancies/functions.ts:96

Read (GET)

Function Input Defined in
getNewTenancyOptions propertyRefInput src/features/tenancies/functions.ts:71
getTenancies propertyRefInput src/features/tenancies/functions.ts:67
getTenancy tenancyRefInput src/features/tenancies/functions.ts:75
listTenancyStatuses src/features/tenancies/functions.ts:122

Change data (POST)

Function Input Defined in
createTransaction readForm src/features/transactions/functions.ts:124
deleteTransaction transactionRefInput src/features/transactions/functions.ts:175
updateTransaction readForm src/features/transactions/functions.ts:143

Read (GET)

Function Input Defined in
entriesSince z.object({ propertyId: z.string().min(1).max(64), category: z.enum(WATER_CATEGORIES), from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), }) src/features/transactions/functions.ts:182
getNewTransactionOptions z.object({ propertyId: z.string().max(64).optional() }) src/features/transactions/functions.ts:118
getTransaction transactionRefInput src/features/transactions/functions.ts:112
getTransactions z.object({ propertyId: z.string().min(1).max(64), year: z.number().int().min(2000).max(2100).optional(), }) src/features/transactions/functions.ts:101

Change data (POST)

Function Input Defined in
addUsageCharge addUsageChargeInput src/features/usage-charges/functions.ts:51
setUsageCharge setUsageChargeInput src/features/usage-charges/functions.ts:64
undoUsageCharge usageChargeRefInput src/features/usage-charges/functions.ts:73

Read (GET)

Function Input Defined in
getUsageCharges propertyRefInput src/features/usage-charges/functions.ts:47

Read (GET)

Function Input Defined in
getFlatYear flatYearInput src/features/year-summary/functions.ts:53
getYearSummary yearSummaryInput src/features/year-summary/functions.ts:47
getYearSummaryPdf yearSummaryInput src/features/year-summary/functions.ts:64