diff --git a/Documentation/docs/get-started.md b/Documentation/docs/get-started.md index 59db87073..b724db7b0 100644 --- a/Documentation/docs/get-started.md +++ b/Documentation/docs/get-started.md @@ -1 +1,4 @@ # Get started +::: info +This paragraph is not ready yet, you can contribute to this documentation on our [Github!](https://github.com/linagora/twake-drive/issues/546) +::: diff --git a/Documentation/docs/index.md b/Documentation/docs/index.md index c14652218..375a2bd2e 100644 --- a/Documentation/docs/index.md +++ b/Documentation/docs/index.md @@ -1,15 +1,22 @@ # ☀️ Welcome to Twake Drive -Twake Drive is an open source collaborative drive. It can be self-hosted, used is saas and easily integrated into your teams. Twake Drive offers all the features for collaboration : team chat, file storage, team calendar, tasks manager. +Twake Drive is an open source collaborative drive. It can be self-hosted, +used is saas and easily integrated into your teams. +Store all your files and folders securely, whether in the cloud or your server, +and share them with your partners and team. Twake Drive prioritizes the confidentiality +and integrity of your data at all times. All that you expect from file storage, +plus privacy and elegant interface -This **documentation** assists developers and users in having the best Twake Drive experience as possible. We’ve developed Twake Drive to have a better teamwork. +This **documentation** assists developers and users in having the best Twake Drive experience as possible. +We’ve developed Twake Drive to have a better teamwork. --- #### Start using Twake Drive now -Install it on your own server: [click here](onprem/installation.md)). +Install it on your own server: [click here](onprem/installation.md) -#### Add plugins like OnlyOffice +#### Add plugins like OnlyOffice [click here](plugins.md) + +#### Developer documentation [click here](internal-documentation/backend-services/README.md) -[click here](plugins.md)). diff --git a/Documentation/docs/internal-documentation/backend-services/README.md b/Documentation/docs/internal-documentation/backend-services/README.md index 1c4cdf65a..1c7451148 100644 --- a/Documentation/docs/internal-documentation/backend-services/README.md +++ b/Documentation/docs/internal-documentation/backend-services/README.md @@ -1,8 +1,7 @@ --- description: >- This page will document all the services implemented in the new NodeJS - backend. For all the PHP services not yet migrated, please ask us directly on - https://community.tdrive.app/ + backend. --- # 🧱 Backend and APIs @@ -13,17 +12,23 @@ As a frontend developer / connector developer to read our APIs, or to understand If document are empty, check out our Notion documentation: [https://www.notion.so/tdrive/Backend-documentation-e219323593d2401c9887d0e11b2a597b](https://www.notion.so/tdrive/Backend-documentation-e219323593d2401c9887d0e11b2a597b) +### General + +#### Authentication +[TODO](https://github.com/linagora/twake-drive/issues/544) + ### Services [users/](users/README.md) [applications/](applications/README.md)) -[channels/](channels/README.md)) +[documents/](documents/README.md)) + +[files/](files/README.md)) -[messages/](messages/README.md)) +[tags/](tags/README.md)) -[notifications/](notifications/README.md)) ## Get started to code in Twake Drive @@ -31,6 +36,6 @@ Want to edit Twake Drive code ? Congratulation ! You participate in the developm [start-working-into-a-service](intro/start-working-into-a-service.md) -[create-a-new-tdrive-service](intro/create-a-new-tdrive-service.md) +[create-a-new-tdrive-service](intro/create-a-new-twake-service.md) [intro/platform/](intro/platform/README.md)) diff --git a/Documentation/docs/internal-documentation/backend-services/applications/README.md b/Documentation/docs/internal-documentation/backend-services/applications/README.md index 78f386d84..f5441a0bc 100644 --- a/Documentation/docs/internal-documentation/backend-services/applications/README.md +++ b/Documentation/docs/internal-documentation/backend-services/applications/README.md @@ -13,10 +13,12 @@ An application is described by an identity sheet containing this information: - **Identity** \(name, description, logo\) - **API** **preferences** \(TDrive→Connector events endpoint, API id and secret, and Connector→TDrive allowed IPs\) - **Privileges and capabilities** \(List of things the connector can read and can write\) -- **Display information** \(Where the connector is visible, button in chat, configuration in application list etc\) +- **Display information** \(Where the connector is visible, configuration in application list etc\) This is all we need to define a connector. [database-models](database-models.md) [rest-apis](rest-apis.md) + +[examples](examples.md) diff --git a/Documentation/docs/internal-documentation/backend-services/applications/database-models.md b/Documentation/docs/internal-documentation/backend-services/applications/database-models.md index 4c038612f..e99c449a6 100644 --- a/Documentation/docs/internal-documentation/backend-services/applications/database-models.md +++ b/Documentation/docs/internal-documentation/backend-services/applications/database-models.md @@ -4,34 +4,39 @@ description: Application models for backend # Database models -**applications**\ -\*\*\*\*Represent an application in the database - -```javascript -{ - //PK - "company_id": uuid; - "id": uuid; - - "identity": ApplicationIdentity; - "api": ApplicationApi; - "access": ApplicationAccess; - "display": ApplicationDisplay; - "publication": ApplicationPublication; - "stats": ApplicationStatistics; +**applications** + +Represent an application in the database + +```Typescript +export default interface Application { + id: string; + internal_domain?: string; + external_prefix?: string; + company_id: string; + is_default: boolean; + identity: ApplicationIdentity; + api: ApplicationApi; + access: ApplicationAccess; + display: ApplicationDisplay; + publication: ApplicationPublication; + stats: ApplicationStatistics; } -type ApplicationIdentity = { +export type ApplicationIdentity = { + code: string; name: string; - iconUrl: string; + icon: string; description: string; website: string; categories: string[]; - compatibility: "tdrive"[]; + compatibility: "twake"[]; + repository?: string; }; -type ApplicationPublication = { +export type ApplicationPublication = { published: boolean; + requested: boolean; }; type ApplicationStatistics = { @@ -56,73 +61,20 @@ type ApplicationDisplay = { tdrive: { "version": 1, - "files" : { - "preview": { - "url": "", //Url to preview file (full screen or inline) - "inline": true, - "main_ext": ["docx", "xlsx"], //Main extensions app can read - "other_ext": ["txt", "html"] //Secondary extensions app can read - }, - "actions": [ //List of action that can apply on a file - { - "name": "string", - "id": "string" - } - ] - }, - - //Chat plugin - "chat": { - "input": { - "icon": "", //If defined replace original icon url of your app - "type": "file" | "call" //To add in existing apps folder / default icon - }, - "commands": [ - { - "command": "mycommand", // my_app mycommand - "description": "fdsqfds" - } - ], - "actions": [ //List of action that can apply on a message - { - "name": "string", - "id": "string" - } - ] - }, - - //Allow app to appear as a bot user in direct chat - "direct": { - "name": "My app Bot", - "icon": "", //If defined replace original icon url of your app - }, - - //Display app as a standalone application in a tab - "tab": { - "url": "" - }, - - //Display app as a standalone application on the left bar - "standalone": { - "url": "" - }, - - //Define where the app can be configured from - "configuration": ["global", "channel"] - }; + "files": { + "preview": { + "url": "", //Url to preview file (full screen or inline) + "inline": true, + "main_ext": ["docx", "xlsx"], //Main extensions app can read + "other_ext": ["txt", "html"] //Secondary extensions app can read + }, + "actions": [ //List of action that can apply on a file + { + "name": "string", + "id": "string" + } + ] + } + } }; ``` - -**company_application**\ -\*\*\*\*Represent an application in a company - -```javascript -{ - "company_id": uuid; - "application_id": uuid; - "id": uuid; - - "created_at": number; - "created_by": string; //Will be the default delegated user when doing actions on TDrive -} -``` diff --git a/Documentation/docs/internal-documentation/backend-services/applications/examples.md b/Documentation/docs/internal-documentation/backend-services/applications/examples.md new file mode 100644 index 000000000..35b68ed3a --- /dev/null +++ b/Documentation/docs/internal-documentation/backend-services/applications/examples.md @@ -0,0 +1,4 @@ +# Twake Drive Application Example +::: info +This paragraph is not ready yet, you can contribute to this documentation on our [Github!](https://github.com/linagora/twake-drive/issues/548) +::: \ No newline at end of file diff --git a/Documentation/docs/internal-documentation/backend-services/applications/rest-apis.md b/Documentation/docs/internal-documentation/backend-services/applications/rest-apis.md index 69eda4207..0d50d93c8 100644 --- a/Documentation/docs/internal-documentation/backend-services/applications/rest-apis.md +++ b/Documentation/docs/internal-documentation/backend-services/applications/rest-apis.md @@ -3,4 +3,6 @@ description: Rest API for application --- # REST APIs - +::: info +This paragraph is not ready yet, you can contribute to this documentation on our [Github!](https://github.com/linagora/twake-drive/issues/547) +::: diff --git a/Documentation/docs/internal-documentation/backend-services/authentication/README.md b/Documentation/docs/internal-documentation/backend-services/authentication/README.md new file mode 100644 index 000000000..01d0d3918 --- /dev/null +++ b/Documentation/docs/internal-documentation/backend-services/authentication/README.md @@ -0,0 +1,3 @@ +::: info +This paragraph is not ready yet, you can contribute to this documentation on our Github! +::: \ No newline at end of file diff --git a/Documentation/docs/internal-documentation/backend-services/documents/README.md b/Documentation/docs/internal-documentation/backend-services/documents/README.md index 0e9b2cf9a..878d339f0 100644 --- a/Documentation/docs/internal-documentation/backend-services/documents/README.md +++ b/Documentation/docs/internal-documentation/backend-services/documents/README.md @@ -2,11 +2,11 @@ description: Drive on TDrive --- -# 📁 Drive +# 📁 Documents ## description -**Drive** or **Documents** is the Nodejs drive implementation for tdrive, it contains drive items. +**Documents** is the Nodejs drive implementation for tdrive, it contains drive items. A **Drive item** can be: diff --git a/Documentation/docs/internal-documentation/backend-services/documents/database-models.md b/Documentation/docs/internal-documentation/backend-services/documents/database-models.md index 14fa5e5f1..5bb13d65f 100644 --- a/Documentation/docs/internal-documentation/backend-services/documents/database-models.md +++ b/Documentation/docs/internal-documentation/backend-services/documents/database-models.md @@ -6,25 +6,25 @@ description: Documents database models **DriveFile** -```javascript -{ - // Primary Key - "company_id": uuid; - "id": uuid; - - "parent_id": string; - "is_in_trash": boolean; - "is_directory": boolean; - "name": string; - "extension": string; - "description": string; - "tags": string[]; - "added": string; - "last_modified": string; - "access_info": AccessInformation; - "content_keywords": string; - "hidden_data": unknown; - "last_version_cache": Partial; +```TypeScript +export class DriveFile { + company_id: string; + id: string; + parent_id: string; + is_in_trash: boolean; + is_directory: boolean; + name: string; + extension: string; + description: string; + tags: string[]; + added: number; + last_modified: number; + access_info: AccessInformation; + content_keywords: string; + creator: string; + size: number; + last_version_cache: Partial; + scope: DriveScope; } type AccessInformation = { @@ -46,23 +46,24 @@ type AuthEntity = { **FileVersion** -```javascript -{ - "id": string; - "provider": "internal" | "drive" | string; - "file_id": string; - "file_metadata": DriveFileMetadata; - "date_added": number; - "creator_id": string; - "application_id": string; - "realname": string; - "key": string; - "mode": string | "OpenSSL-2"; - "file_size": number; - "filename": string; - "data": unknown; +```Typescript +export class FileVersion { + drive_item_id: string; + id: string; + provider: "internal" | "drive" | string; + file_metadata: DriveFileMetadata; + date_added: number; + creator_id: string; + application_id: string; + realname: string; + key: string; + mode: string | "OpenSSL-2"; + file_size: number; + filename: string; + data: unknown; } + type DriveFileMetadata = { source: "internal" | "drive" | string; external_id: string; diff --git a/Documentation/docs/internal-documentation/backend-services/documents/rest-apis.md b/Documentation/docs/internal-documentation/backend-services/documents/rest-apis.md index 3e3609348..03e9c317f 100644 --- a/Documentation/docs/internal-documentation/backend-services/documents/rest-apis.md +++ b/Documentation/docs/internal-documentation/backend-services/documents/rest-apis.md @@ -2,14 +2,6 @@ description: Documents API --- -# Authentication - -All the following routes require the usual authentication header. But you can also use other ways of authentication: - -- For the download routes, you can use a token generated by the `/internal/services/documents/v1/companies/:company_id/download/token` route (see bellow). -- All the routes can use a query string `?public_token=token` to authenticate the user. -- All the routes can use a query string `?tdrive_tab_token=token` to authenticate the user in the context of a channel tab for instance. - # Navigation and drive capabilities ## Fetch a drive item diff --git a/Documentation/docs/internal-documentation/backend-services/files/README.md b/Documentation/docs/internal-documentation/backend-services/files/README.md index 934f0f7fb..575c19dda 100644 --- a/Documentation/docs/internal-documentation/backend-services/files/README.md +++ b/Documentation/docs/internal-documentation/backend-services/files/README.md @@ -3,10 +3,9 @@ description: File on Twake Drive --- # 📄 Files - ## description -**Files** is everything related to file upload in Twake Drive after the migration to Node.js. Note that the Twake Drive isn't part of this migration because it will be replaced by Linshare. +**Files** is everything related to file upload in Twake Drive. Twake Drive Files upload support chunk upload and file encryption. @@ -18,7 +17,14 @@ Twake Drive Files upload support chunk upload and file encryption. ## Encryption -Files and Storage services in Twake Drive feature encryption at rest in **aes-256-cbc**. +Files and Storage services in Twake Drive feature encryption at rest in **aes-256-gbc**. Or you can also set your desired algorithm is the Twake Drive configuration +```JSON + { + "database": { + "encryption": "DB_ENCRYPTION_ALGORITHM" + } + } +``` Each file is encrypted with two layers: diff --git a/Documentation/docs/internal-documentation/backend-services/files/database-models.md b/Documentation/docs/internal-documentation/backend-services/files/database-models.md index a658ec652..b9be50651 100644 --- a/Documentation/docs/internal-documentation/backend-services/files/database-models.md +++ b/Documentation/docs/internal-documentation/backend-services/files/database-models.md @@ -1,40 +1,28 @@ --- description: File database models --- - # Database models * **files** The main file object in database - ```javascript - - javascript - { - - //Primary key: [["company_id"], "id"] - "company_id": "uuid-v4", - "id": "uuid-v4", - "user_id": "string", - "application_id": "string", - "updated_at": "number", - "created_at":"number - - "upload_data": (json){ - "size": number, //Total file size - "chunks": number, //Number of chunks - } - "metadata": (json){ - "name": "string", //File name - "mime": "type/subtype", - } - "thumbnails": (json) { //Url to thumbnail (or set it to undefined if no relevant) - "index": "string", - "id": "uuid-v4", - "type": "string", - "size": "number, - "width": number, //Thumbnail width (for images only) - "height": number, //Thumbnail height (for images only) - } +```Typescript + export class File { + company_id: string; + id: string; + user_id: string; + application_id: null | string; + encryption_key: string; + updated_at: number; + created_at: number; + metadata: null | { + name?: string; + mime?: string; + thumbnails_status?: "done" | "error" | "waiting"; + }; + thumbnails: Thumbnail[]; + upload_data: null | { + size: number; + chunks: number; + }; } - - ``` +``` diff --git a/Documentation/docs/internal-documentation/backend-services/intro/README.md b/Documentation/docs/internal-documentation/backend-services/intro/README.md index e8c62eea4..02aad7acf 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/README.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/README.md @@ -6,6 +6,6 @@ description: Get started with Twake Drive service development [start-working-into-a-service](start-working-into-a-service.md) -[create-a-new-tdrive-service](create-a-new-tdrive-service.md) +[create-a-new-twake-drive-service](create-a-new-twake-service.md) [platform/](platform/README.md) diff --git a/Documentation/docs/internal-documentation/backend-services/intro/create-a-new-twake-service.md b/Documentation/docs/internal-documentation/backend-services/intro/create-a-new-twake-service.md index 056bff694..2fa396056 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/create-a-new-twake-service.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/create-a-new-twake-service.md @@ -17,7 +17,7 @@ In order to illustrate how to create a component, let's create a fake Notificati 1. Create the folder `src/services/notification` 2. Create an `index.ts` file which exports a `NotificationService` class -```javascript +```Typescript // File src/services/notification/index.ts import { TdriveService } from "../../core/platform/framework"; import NotificationServiceAPI from "./api.ts"; @@ -37,7 +37,7 @@ export default class NotificationService extends TdriveService;` Customize the `init` step of the component. This is generally the place where services are instanciated. From this step, you can retrieve services consumed by the current component which have been already initialized by the platform. 3. `public async doStart(): Promise;` Customize the `start` step of the component. You have access to all other services which are already started. -```javascript +```Typescript // File src/services/notification/index.ts import { TdriveService } from "../../core/platform/framework"; import NotificationServiceAPI from "./api.ts"; @@ -94,7 +94,7 @@ export default class NotificationService extends TdriveService { The platform and services configuration is defined in the `config/default.json` file. It uses [node-config](https://github.com/lorenwest/node-config) under the hood and to configuration file inheritence is supported in the platform. The list of services to start is defined in the `services` array like: - -```javascript +```JSON { - "services": ["auth", "user", "channels", "webserver", "websocket", "database", "realtime"] + "services": ["auth", "user", "channels", "webserver", "database"] } -``` +``` -Then each service can have its own configuration block which is accessible from its service name i.e. `websocket` service configuration is defined in the `websocket` element like: +Then each service can have its own configuration block which is accessible from its service name i.e. `storage` service configuration is defined in the `storage` element like: -```javascript +```JSON { - "services": ["auth", "user", "channels", "webserver", "websocket", "orm"], - "websocket": { - "path": "/socket", - "adapters": { - "types": [], - "redis": { - "host": "redis", - "port": 6379 + "services": ["auth", "user", "webserver", "storage"], + "storage": { + "type": "S3", + "S3": { + "endPoint": "play.min.io", + "port": 9000, + "useSSL": false, + "accessKey": "ABCD", + "secretKey": "xyz", + "disableRemove": false + }, + "local": { + "path": "/tdrive" } - } - } + } } ``` On the component class side, the configuration object is directly accessible from the `configuration` property like: -```javascript +```Typescript export default class WebSocket extends TdriveService { async doInit(): Promise { // get the "path" value, defaults to "/socket" if not defined diff --git a/Documentation/docs/internal-documentation/backend-services/intro/platform.md b/Documentation/docs/internal-documentation/backend-services/intro/platform.md index 44a8b407e..29506b699 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/platform.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/platform.md @@ -7,8 +7,7 @@ description: >- # Platform/Technical services ## **Database Technical Service** - -Twake Drive uses a custom ORM to work with both MongoDB and CassandraDB/ScyllaDB. +Twake Drive uses a custom ORM to work with both MongoDB and PostgreSQL. ::: info This paragraph is not ready yet, you can contribute to this documentation on our Github! diff --git a/Documentation/docs/internal-documentation/backend-services/intro/platform/README.md b/Documentation/docs/internal-documentation/backend-services/intro/platform/README.md index e205584b1..2a270f338 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/platform/README.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/platform/README.md @@ -7,7 +7,11 @@ description: >- # Platform/Technical services ## **Database Technical Service** - -Twake Drive uses a custom ORM to work with both MongoDB and CassandraDB/ScyllaDB. +Twake Drive uses a custom ORM to work with both MongoDB and PostgreSQL. [database-orm-platform-service](database-orm-platform-service.md) +::: info +This paragraph is not ready yet, you can contribute to this documentation on our [Github](https://github.com/linagora/twake-drive/issues/545)! +::: + + diff --git a/Documentation/docs/internal-documentation/backend-services/intro/platform/database-orm-platform-service.md b/Documentation/docs/internal-documentation/backend-services/intro/platform/database-orm-platform-service.md index 18f3aaa99..02c810e74 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/platform/database-orm-platform-service.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/platform/database-orm-platform-service.md @@ -48,13 +48,13 @@ await repository.remove({company_id: "", id: ""}); #### I set a column to a type but I get an other type on code. Why for two identical definitions it created fields of different types? -It depends on what database you use \(mongo or scylladb\) for development. Here is the process for each: +It depends on what database you use (MongoDB or PostgreSQL) for development. Here is the process for each: -Scylla: +PostgreSQL: -- on startup it creates the tables with the requested types, in this case tdrive_boolean => tinyint on scylla side -- on save entity it will convert the node type \(boolean\) to the good cql request: "{bool: false}" => "SET bool = 0", it happens in the transformValueToDbString method -- on find entity it will convert the database raw value \(a tinyint\) to the nodejs type \(boolean\): 1 => true, 0 => false. +- on startup it creates the tables with the requested types, in this case tdrive_boolean => boolean on PostgreSQL side +- on save entity it will convert the node type \(boolean\) to the good sql request: "{bool: false}" => "SET bool = false", it happens in the transformValueToDbString method +- on find entity it will convert the database raw value \(a boolean\) to the nodejs type \(boolean\) Mongo: @@ -67,5 +67,5 @@ Mongo: So what could have happened in you case ? - \(1\) if you use mongodb and we did not enforce the type before to save to mongo, then maybe you used a string instead of a boolean at some point in time while working and mongo just saved it as it was \(without checking the requested type on entity\) -- \(2\) other possibility is that we incorrectly get the information from the database on the typeTransforms.ts file, from cassandra for instance I think we don't convert tinyint back to clean boolean, so you could get 0 and 1 instead of false and true. And maybe instead of 0 and 1 sometime undefined values can convert to ''. +- \(2\) other possibility is that we incorrectly get the information from the database on the typeTransforms.ts file, from PostgreSQL for instance I think we don't convert tinyint back to clean boolean, so you could get 0 and 1 instead of false and true. And maybe instead of 0 and 1 sometime undefined values can convert to ''. - To fix all this just enforce the types in typeTransforms.ts for the tdrive_boolean type. diff --git a/Documentation/docs/internal-documentation/backend-services/intro/start-working-into-a-service.md b/Documentation/docs/internal-documentation/backend-services/intro/start-working-into-a-service.md index 74a634653..58f72f209 100644 --- a/Documentation/docs/internal-documentation/backend-services/intro/start-working-into-a-service.md +++ b/Documentation/docs/internal-documentation/backend-services/intro/start-working-into-a-service.md @@ -37,7 +37,7 @@ This is where you declare the routing you want to use. ### /services : where the magic happen -This is where you work for real, calling databases, sending websockets events, using tasks pushers etc. +This is where you work for real, calling databases, sending events, using tasks pushers etc. ### /entities : where we keep the data diff --git a/Documentation/docs/internal-documentation/backend-services/tags/README.md b/Documentation/docs/internal-documentation/backend-services/tags/README.md index 42a36e76b..aafbb1bbe 100644 --- a/Documentation/docs/internal-documentation/backend-services/tags/README.md +++ b/Documentation/docs/internal-documentation/backend-services/tags/README.md @@ -1,12 +1,12 @@ --- -description: Tags on TDrive +description: Tags on Twake Drive --- # 📁 Tags ## description -**Tags** is everything related to tafs in TDrive after the migration to Node.js. +**Tags** is everything related to tags in Twake Drive after the migration to Node.js. ## Models and APIs diff --git a/Documentation/docs/internal-documentation/backend-services/tags/database-models.md b/Documentation/docs/internal-documentation/backend-services/tags/database-models.md index 34c67bd5d..532023f25 100644 --- a/Documentation/docs/internal-documentation/backend-services/tags/database-models.md +++ b/Documentation/docs/internal-documentation/backend-services/tags/database-models.md @@ -6,13 +6,8 @@ description: Documents database models **DriveFile** -```javascript -{ - // Primary Key - "company_id": uuid; - "tag_id": string; - - "name": string; - "colour": string; +```TypeScript +export class DriveFile { + tags: string[]; } ``` diff --git a/Documentation/docs/internal-documentation/backend-services/users/README.md b/Documentation/docs/internal-documentation/backend-services/users/README.md index bf01e7e35..1ae6267c5 100644 --- a/Documentation/docs/internal-documentation/backend-services/users/README.md +++ b/Documentation/docs/internal-documentation/backend-services/users/README.md @@ -3,5 +3,4 @@ description: How users and workspaces are managed in backend --- # 👥 Users and workspaces - Document still on notion: [https://www.notion.so/tdrive/Backend-documentation-e219323593d2401c9887d0e11b2a597b](https://www.notion.so/tdrive/Backend-documentation-e219323593d2401c9887d0e11b2a597b) diff --git a/Documentation/docs/internal-documentation/our-stack.md b/Documentation/docs/internal-documentation/our-stack.md index 590baca57..2d3b5411d 100644 --- a/Documentation/docs/internal-documentation/our-stack.md +++ b/Documentation/docs/internal-documentation/our-stack.md @@ -6,7 +6,7 @@ description: Here is the list of our middlewares and their usages. Write an article describing our stack at Twake Drive composed of: -- In full mode a docker containing: node, react behind nginx, elasticsearch, scylladb, redis, rabbitmq +- In full mode a docker containing: node, react behind nginx, Open Search, PostgreSQL, redis, rabbitmq - In simple mode a docker containing: node, react and mongodb for db and search ### Simple mode @@ -26,8 +26,8 @@ The full mode of Twake Drive messaging app is designed to handle large-scale pro - Node: A JavaScript runtime environment used to develop server-side applications. - React: A JavaScript library used to build user interfaces. - Nginx: A web server used as a reverse proxy to distribute incoming requests to the appropriate backend service. -- Elasticsearch: A distributed search and analytics engine used to perform advanced search operations. -- Scylladb: A NoSQL database used to store large amounts of structured and unstructured data. +- OpenSearch: A distributed search and analytics engine used to perform advanced search operations. +- PostgreSQL: An advanced, open-source relational database management system known for its extensibility, SQL compliance, and robust performance. - Redis: An in-memory data structure store used to implement caching, messaging, and pub/sub functionalities. - Rabbitmq: An open-source message broker used to transmit messages between applications. diff --git a/Documentation/docs/internal-documentation/translation.md b/Documentation/docs/internal-documentation/translation.md index ad5436886..7c6bc29e4 100644 --- a/Documentation/docs/internal-documentation/translation.md +++ b/Documentation/docs/internal-documentation/translation.md @@ -8,18 +8,12 @@ description: Want to translate Twake Drive ? Twake Drive is built for everyone. That means we support languages that user want. If we do not already support your language, or you find a mistake in the translation, you have a simply way to do that. -Send us a mail to this address saying that you want to help us on the translation : [sales@tdrive.app](mailto:sales@tdrive.app). After, you'll have to follow the bellow steps. - -## Join weblate server - -At Twake Drive, we use [weblate](https://hosted.weblate.org/), a tool that allow you to translate Twake Drive without working on the code. After you sent an email, we'll invite you to the project. Inside the Twake Drive project you can find [tdrive-web-frontend](https://hosted.weblate.org/projects/tdrive/tdrive-web-frontend/) that contains all translation for the web version. +Send us a mail to this address saying that you want to help us on the translation : [software@linagora.com](mailto:software@linagora.com). After, you'll have to follow the bellow steps. ## Start to translate -After choosing the language you want to contribute, you can click on categories that need some work \(like `Not translated strings` . Now you can start to translate : you have to fulfill the input You can see `Other languages` tab to give you more context about the string. After, just click on save and it is done ! - -![](<../assets/image-(6).png>) +You can add your own language or modify a translation for the existing one [here](https://github.com/linagora/twake-drive/tree/main/tdrive/frontend/public/locales). +Just create a PR with your modification and it is done ! ## Thank you! -Twake Drive is build by and for the community. Your commitment is highly appreciate! In reward, we can offer you a year on our SaaS version. You just have to contact us through this email : [sales@tdrive.app](mailto:sales@tdrive.app) diff --git a/tdrive/.gitignore b/tdrive/.gitignore index 52315a73e..791df4053 100644 --- a/tdrive/.gitignore +++ b/tdrive/.gitignore @@ -112,7 +112,6 @@ docker-compose.yml /vendor/ /app/Ressources/DatabaseEncryption/.HaliteEncryptor.key /app/Ressources/DatabaseEncryption/.Halite.key -/backend/websockets_server/false/ ### AWS ### /app/config/aws_config.yml diff --git a/tdrive/docker/tdrive-frontend/site.conf b/tdrive/docker/tdrive-frontend/site.conf index 335efee30..921e959cd 100644 --- a/tdrive/docker/tdrive-frontend/site.conf +++ b/tdrive/docker/tdrive-frontend/site.conf @@ -68,19 +68,6 @@ server { proxy_pass ${NODE_HOST}; } - location ~ ^/socket/.* { - proxy_pass ${NODE_HOST}; - # this magic is needed for WebSocket - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_connect_timeout 7d; - proxy_send_timeout 7d; - proxy_read_timeout 7d; - } - location ~ ^/(ajax|api|administration|upload|bundle|medias).* { # try to serve file directly, fallback to rewrite try_files $uri @rewriteapp;