This project aims at serving a Single Page Application allowing a user to interact with its contacts.
This frontend application is built in a monorepo structure with Rsbuild, React, and TypeScript. It shares its technical stack with twake-calendar-frontend, and interacts with:
- esn-sabre CalDAV + CardDAV server, tailor made for LINAGORA needs.
- An OpenPaaS / ESN backend, for the user profile, user configurations and the DAV JWT.
The repository is organized as a monorepo workspace:
apps/private: The main private contacts application. Accessible by authenticated users.common: Shared components, hooks, translation locales, and utility functions.
| Route | Description |
|---|---|
/ |
Login handler |
/contacts |
Main contacts view (authenticated) |
/callback |
OAuth callback |
/error |
Error page |
We use Prettier to keep code style consistent.
A .prettierrc file is already included in the repo, so formatting rules are predefined.
Before committing, make sure you format your files either using your IDE Prettier extension or Prettier CLI.
Requirement: Node 24+
First, install the dependencies from the root directory:
npm installTo start the application in development mode:
npm run start:privateRuns the private app on http://localhost:5000.
To build the application for production, run:
npm run buildThe production bundle will be compiled to apps/private/dist.
You can serve the built production assets locally using:
npm run serve:privateServes on http://localhost:5000.
Launches the Jest test runner:
npm testTo run the ESLint checks:
npm run lintTo automatically fix formatting and lint errors:
npm run lint:fixFirst, build the application:
npm run buildThen build the Docker image:
docker build -f apps/private/Dockerfile -t linagora/twake-contacts-private .To run the container, mount the .env.js configuration file from the root public/ directory:
docker run -d \
-v $PWD/public/.env.js:/usr/share/nginx/html/.env.js \
-p 5000:80 \
linagora/twake-contacts-privateThe application loads configuration dynamically at runtime from static JavaScript files in the public directory.
- Copy
public/.env.example.jstopublic/.env.js - Customize the variables in
public/.env.jsto match your environment.
| Variable | Description |
|---|---|
SSO_BASE_URL, SSO_CLIENT_ID, SSO_SCOPE, SSO_REDIRECT_URI, SSO_RESPONSE_TYPE, SSO_CODE_CHALLENGE_METHOD, SSO_POST_LOGOUT_REDIRECT |
OIDC provider settings |
SIDE_SERVICE_BASE_URL |
Contacts backend` |
DAV_BASE_URL |
Base URL displayed to users in the address book details |
DEBUG |
Disables the Nginx browser cache when true |
LANG |
Default language, overridden by the user configuration |
SENTRY_DSN |
Optional, omit to disable Sentry |
Note: .env.js is gitignored, so each environment can have its own configuration.
Developed with <3 at LINAGORA !