Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fatelessdev/translogiX/llms.txt

Use this file to discover all available pages before exploring further.

TranslogiX uses BetterAuth for authentication. Users sign in with an email address and password. Sessions are stored as cookies, last seven days, and are automatically refreshed daily. This page explains the sign-in flow, session behaviour, and how roles control access to different parts of the dashboard.

Signing in

1

Navigate to the login page

Open /login in your browser. If you try to access a protected route without a valid session, TranslogiX redirects you to /login automatically.
2

Enter your credentials

Type your email address and password, then click Sign in.
3

Get redirected to your dashboard

On success, TranslogiX reads your role from the session and sends you to the correct dashboard:
RoleRedirect destination
ADMIN/admin
TRANSPORTER/transporter
DRIVER/driver
CUSTOMER/customer
If your credentials are incorrect, the login page displays “Invalid credentials” and stays on /login. No account lockout is applied after a fixed number of attempts.

Sessions

SettingValue
Session lifetime7 days from the time of sign-in
Session refreshRefreshed automatically if the session is used within the last 1 day of the current window
Cookie namebetter-auth.session_token
StoragePostgreSQL sessions table via BetterAuth
Sessions are issued as HTTP cookies by the BetterAuth nextCookies plugin. The cookie is set on the server and is not accessible to JavaScript running in the browser.
To sign out, call the BetterAuth sign-out endpoint or use the sign-out button available in the dashboard navigation. This invalidates the session record in the database and clears the cookie.

Roles

Every user account has exactly one role. The role determines which dashboard the user sees and which API actions they can perform.
RoleDescription
ADMINFull access to all data, users, transporters, vehicles, routes, shipments, and the AI Ops dashboard.
TRANSPORTERAccess scoped to their own transporter organisation — vehicles, routes, and shipments.
DRIVERAccess to driver-specific views and shipment updates.
CUSTOMERAccess to shipment tracking for their own packages.

Default role

New users are assigned the CUSTOMER role by default. An administrator must update the user’s role through the admin panel to grant elevated access.

Role assignment

Only administrators can change a user’s role. Roles are assigned through the user management section of the admin dashboard, not through self-service.
Changing a user’s role takes effect on their next request. An active session is not invalidated when the role changes — the user may need to sign out and sign back in to see the updated dashboard.

Failed authentication

If a request reaches a protected API route without a valid session, the server returns a 401 Unauthorized response. If a valid session exists but the user’s role does not permit the action, the server returns 403 Forbidden. In both cases, the application redirects the browser back to /login.

Build docs developers (and LLMs) love