This repository is a multi-packages repository. See Modules for details.
ToM server enhances a Matrix Synapse server with several features:
- first, Tom is a Matrix Identity Server but with additional features:
- inside an organization, it adds some search APIs that allows to find internal users like do the mail clients, for autocompletion for example
- it extends also Matrix Identity Service search responses by adding inactive users
- it provide also an "application service" that allows administrator to create channels with automatic join
- it implements also the federated identity mechanism that extend the Matrix Identity Service to join Matrix identity services to provide a better search
Here is the architecture principle:
REST API Endpoints documentation is available on https://linagora.github.io/ToM-server/
- @twake/matrix-identity-server: Matrix Identity Service implementation for Node.js
- @twake/matrix-client-server: Matrix Client-Server implementation for Node.js
- @twake/matrix-invite: matrix invitation web application
- @twake/server: the main Twake Chat Server, extends @twake/matrix-identity-server
- @twake/federated-identity-service: Twake Federated Identity Service
- @twake/config-parser: simple file parser that uses also environment variables
- @twake/crypto: cryptographic methods for Twake Chat
- @twake/logger: logger for Twake
- @twake/utils: utilitary methods for Twake Chat
- @twake/matrix-application-server: implements Matrix Application Service API
- matrix-resolve: resolve a Matrix "server name" into base URL following Matrix specification
- @twake/retry-promise: simple module extending javascript Promise with retry strategy
- Node >=18
npm run build: build all packagesnpm run test: test all packagesnode ./server.mjs: run the server
Follow these steps to start the project in development mode:
Create a local .env file based on the provided example:
cp .env.example .envYou can adjust any variables inside .env as needed (e.g., database credentials, API keys, etc.).
Use the provided Docker Compose file to start the local dependencies (PostgreSQL, LDAP, etc.):
docker compose -f .compose/examples/dev.pgsql+ldap.yml up -dThis runs all necessary backend services in the background. To stop them later:
docker compose -f .compose/examples/dev.pgsql+ldap.yml downStart the local dev environment (watchers + server auto-reload):
npm run devThis will:
- Watch and rebuild all packages automatically (
lerna run watch) - Launch the backend server via
nodemon - Load environment variables from
.envautomatically
Once started:
- The server should be running at the URL printed in the console (e.g.
http://localhost:3000) - Any code changes in
packages/will trigger automatic rebuilds and server restarts
Copyright (c) 2023-present Linagora https://linagora.com
License: GNU AFFERO GENERAL PUBLIC LICENSE
