diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 059dffa..e51adba 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen (or code). 3. And then the bug happens! **Environment** -- Docs version: +- Conversations version: - Instance url: **Possible Solution** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9414e2..2b5239d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thank you for taking the time to contribute! Please follow these guidelines to ensure a smooth and productive workflow. 🚀🚀🚀 -To get started with the project, please refer to the [README.md](https://github.com/suitenumerique/conversations/blob/main/README.md) for detailed instructions on how to run Docs locally. +To get started with the project, please refer to the [README.md](https://github.com/suitenumerique/conversations/blob/main/README.md) for detailed instructions on how to run Conversations locally. Contributors are required to sign off their commits with `git commit --signoff`: this confirms that they have read and accepted the [Developer's Certificate of Origin 1.1](https://developercertificate.org/). For security reasons we also require [signing your commits with your SSH or GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) with `git commit -S`. @@ -92,11 +92,3 @@ Make sure that all new features or fixes have corresponding tests. Run the test If you need any help while contributing, feel free to open a discussion or ask for guidance in the issue tracker. We are more than happy to assist! Thank you for your contributions! 👍 - -## Contribute to BlockNote -We use [BlockNote](https://www.blocknotejs.org/) for the text editing features of Docs. -If you find and issue with the editor you can [report it](https://github.com/TypeCellOS/BlockNote/issues) directly on their repository. - -Please consider contributing to BlockNotejs, as a library, it's useful to many projects not just Docs. - -The project is licended with Mozilla Public License Version 2.0 but be aware that [XL packages](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-docx-exporter/LICENSE) are dual licenced with GNU AFFERO GENERAL PUBLIC LICENCE Version 3 and proprietary licence if you are [sponsor](https://www.blocknotejs.org/pricing). diff --git a/README.md b/README.md index 5f6a4b1..ef679dd 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,11 @@ In the works: Docker Compose, soon YunoHost You can test Conversations on your browser by visiting this => TBD -### Run Docs locally +### Run Conversations locally -> ⚠️ The methods described below for running Docs locally is **for testing purposes only**. It is based on building Docs using [Minio](https://min.io/) as an S3-compatible storage solution. Of course you can choose any S3-compatible storage solution. +> ⚠️ The methods described below for running Conversations locally is **for testing purposes only**. +> It is based on building Conversations using [Minio](https://min.io/) as an S3-compatible storage solution. +> Of course you can choose any S3-compatible storage solution. **Prerequisite** diff --git a/SECURITY.md b/SECURITY.md index 0ba904a..6ccb106 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,7 +6,7 @@ Security is very important to us. If you have any issue regarding security, please disclose the information responsibly submitting [this form](https://vdp.numerique.gouv.fr/p/Send-a-report?lang=en) and not by creating an issue on the repository. You can also email us at docs@numerique.gouv.fr -We appreciate your effort to make Docs more secure. +We appreciate your effort to make Conversations more secure. ## Vulnerability disclosure policy @@ -20,4 +20,4 @@ and Exposures (CVE) identifier for the vulnerability. 3. Once this grace period has passed, we will publish the vulnerability. By adhering to this security policy, we aim to address security concerns -effectively and responsibly in our open source software project. \ No newline at end of file +effectively and responsibly in our open source software project. diff --git a/docs/architecture.md b/docs/architecture.md index 230d324..1170715 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -6,14 +6,9 @@ flowchart TD User -- HTTP --> Front("Frontend (NextJS SPA)") Front -- REST API --> Back("Backend (Django)") - Front -- WebSocket --> Yserver("Microservice Yjs (Express)") -- WebSocket --> CollaborationServer("Collaboration server (Hocuspocus)") -- REST API <--> Back Front -- OIDC --> Back -- OIDC ---> OIDC("Keycloak / ProConnect") Back -- REST API --> Yserver Back --> DB("Database (PostgreSQL)") Back <--> Celery --> DB Back ----> S3("Minio (S3)") ``` - -### Architecture decision records - -- [ADR-0001-20250106-use-yjs-for-docs-editing](./adr/ADR-0001-20250106-use-yjs-for-docs-editing.md) \ No newline at end of file diff --git a/docs/system-requirements.md b/docs/system-requirements.md index 9246c37..2a47efb 100644 --- a/docs/system-requirements.md +++ b/docs/system-requirements.md @@ -1,9 +1,9 @@ -# La Suite Docs – System & Requirements (2025-06) +# La Suite Conversations – System & Requirements (2025-06) ## 1. Quick-Reference Matrix (single VM / laptop) | Scenario | RAM | vCPU | SSD | Notes | -| ------------------------- | ----- | ---- | ------- | ------------------------- | +|---------------------------|-------|------|---------|---------------------------| | **Solo dev** | 8 GB | 4 | 15 GB | Hot-reload + one IDE | | **Team QA** | 16 GB | 6 | 30 GB | Runs integration tests | | **Prod ≤ 100 live users** | 32 GB | 8 + | 50 GB + | Scale linearly above this | @@ -14,16 +14,15 @@ Memory is the first bottleneck; CPU matters only when Celery or the Next.js buil ## 2. Development Environment Memory Requirements -| Service | Typical use | Rationale / source | -| ------------------------ | ----------------------------- | --------------------------------------------------------------------------------------- | -| PostgreSQL | **1 – 2 GB** | `shared_buffers` starting point ≈ 25% RAM ([postgresql.org][1]) | -| Keycloak | **≈ 1.3 GB** | 70% of limit for heap + ~300 MB non-heap ([keycloak.org][2]) | -| Redis | **≤ 256 MB** | Empty instance ≈ 3 MB; budget 256 MB to allow small datasets ([stackoverflow.com][3]) | -| MinIO | **2 GB (dev) / 32 GB (prod)**| Pre-allocates 1–2 GiB; docs recommend 32 GB per host for ≤ 100 Ti storage ([min.io][4]) | -| Django API (+ Celery) | **0.8 – 1.5 GB** | Empirical in-house metrics | -| Next.js frontend | **0.5 – 1 GB** | Dev build chain | -| Y-Provider (y-websocket) | **< 200 MB** | Large 40 MB YDoc called “big” in community thread ([discuss.yjs.dev][5]) | -| Nginx | **< 100 MB** | Static reverse-proxy footprint | +| Service | Typical use | Rationale / source | +|-----------------------|-------------------------------|-----------------------------------------------------------------------------------------| +| PostgreSQL | **1 – 2 GB** | `shared_buffers` starting point ≈ 25% RAM ([postgresql.org][1]) | +| Keycloak | **≈ 1.3 GB** | 70% of limit for heap + ~300 MB non-heap ([keycloak.org][2]) | +| Redis | **≤ 256 MB** | Empty instance ≈ 3 MB; budget 256 MB to allow small datasets ([stackoverflow.com][3]) | +| MinIO | **2 GB (dev) / 32 GB (prod)** | Pre-allocates 1–2 GiB; docs recommend 32 GB per host for ≤ 100 Ti storage ([min.io][4]) | +| Django API (+ Celery) | **0.8 – 1.5 GB** | Empirical in-house metrics | +| Next.js frontend | **0.5 – 1 GB** | Dev build chain | +| Nginx | **< 100 MB** | Static reverse-proxy footprint | [1]: https://www.postgresql.org/docs/9.1/runtime-config-resource.html "PostgreSQL: Documentation: 9.1: Resource Consumption" [2]: https://www.keycloak.org/high-availability/concepts-memory-and-cpu-sizing "Concepts for sizing CPU and memory resources - Keycloak" @@ -37,16 +36,16 @@ Memory is the first bottleneck; CPU matters only when Celery or the Next.js buil Production deployments differ significantly from development environments. The table below shows typical memory usage for production services: -| Service | Typical use | Rationale / notes | -| ------------------------ | ----------------------------- | --------------------------------------------------------------------------------------- | -| PostgreSQL | **2 – 8 GB** | Higher `shared_buffers` and connection pooling for concurrent users | -| OIDC Provider (optional) | **Variable** | Any OIDC-compatible provider (Keycloak, Auth0, Azure AD, etc.) - external or self-hosted | -| Redis | **256 MB – 2 GB** | Session storage and caching; scales with active user sessions | -| Object Storage (optional)| **External or self-hosted** | Can use AWS S3, Azure Blob, Google Cloud Storage, or self-hosted MinIO | -| Django API (+ Celery) | **1 – 3 GB** | Production workloads with background tasks and higher concurrency | -| Static Files (Nginx) | **< 200 MB** | Serves Next.js build output and static assets; no development overhead | -| Y-Provider (y-websocket) | **200 MB – 1 GB** | Scales with concurrent document editing sessions | -| Nginx (Load Balancer) | **< 200 MB** | Reverse proxy, SSL termination, static file serving | +| Service | Typical use | Rationale / notes | +|---------------------------|-----------------------------|------------------------------------------------------------------------------------------| +| PostgreSQL | **2 – 8 GB** | Higher `shared_buffers` and connection pooling for concurrent users | +| OIDC Provider (optional) | **Variable** | Any OIDC-compatible provider (Keycloak, Auth0, Azure AD, etc.) - external or self-hosted | +| Redis | **256 MB – 2 GB** | Session storage and caching; scales with active user sessions | +| Object Storage (optional) | **External or self-hosted** | Can use AWS S3, Azure Blob, Google Cloud Storage, or self-hosted MinIO | +| Django API (+ Celery) | **1 – 3 GB** | Production workloads with background tasks and higher concurrency | +| Static Files (Nginx) | **< 200 MB** | Serves Next.js build output and static assets; no development overhead | +| Y-Provider (y-websocket) | **200 MB – 1 GB** | Scales with concurrent document editing sessions | +| Nginx (Load Balancer) | **< 200 MB** | Reverse proxy, SSL termination, static file serving | ### Production Architecture Notes @@ -69,7 +68,7 @@ Production deployments differ significantly from development environments. The t ## 4. Recommended Software Versions | Tool | Minimum | -| ----------------------- | ------- | +|-------------------------|---------| | Docker Engine / Desktop | 24.0 | | Docker Compose | v2 | | Git | 2.40 | @@ -85,10 +84,9 @@ Production deployments differ significantly from development environments. The t ## 5. Ports (dev defaults) | Port | Service | -| --------- |-----------------------| +|-----------|-----------------------| | 3000 | Next.js | | 8071 | Django | -| 4444 | Y-Provider | | 8080 | Keycloak | | 8083 | Nginx proxy | | 9000/9001 | MinIO | @@ -106,4 +104,4 @@ Production deployments differ significantly from development environments. The t **Disk** – SSD; add 10 GB extra for the Docker layer cache. -**MinIO** – for demos, mount a local folder instead of running MinIO to save 2 GB+ of RAM. \ No newline at end of file +**MinIO** – for demos, mount a local folder instead of running MinIO to save 2 GB+ of RAM. diff --git a/src/backend/conversations/settings.py b/src/backend/conversations/settings.py index f807687..8458c5b 100755 --- a/src/backend/conversations/settings.py +++ b/src/backend/conversations/settings.py @@ -630,7 +630,7 @@ USER QUESTION: ), "propagate": False, }, - "docs.security": { + "conversations.security": { "handlers": ["console"], "level": values.Value( "INFO",