Commit Graph

1693 Commits

Author SHA1 Message Date
Jacques ROUSSEL
d93e262069 🔐(helm) update secrets
Made by @rouja. Structure is inspired from Impress, values are adapted
to Meet.
2024-07-10 23:33:05 +02:00
antoine lebaud
84792a7b81 🎨(backend) remove duplicated line of configuration
Uncommenting the line left the original commented line in place,
which was misleading because the comment indicated to comment
the next line, which was already commented.

Fixed!
2024-07-10 23:33:05 +02:00
antoine lebaud
4fe3333eea 🚚(helm) update values for remote environments
I have updated the staging, pre-prod and production environments.

Done:
- Remove silenced security checks, as SECURE_PROXY_SSL_HEADER is set in prod.
- Rename "impress" to "meet"
- Rename "docs" to "meet"
- Remove unused values (webrtc, ingressWS)

I haven't yet received the definitive DNS configuration from Florian or Olivier.
The hosts meet.numerique.gouv.fr and all meet-*.beta.numerique.gouv.fr are
only hypothetical at this point.
2024-07-10 23:33:05 +02:00
Emmanuel Pelletier
bb6f111381 📌(frontend) pin wouter dep that was forgotten
following this project's choice of pinning everything,
missed this one
2024-07-03 11:16:00 +02:00
Emmanuel Pelletier
33dbaedf2f 💚(frontend) do not run panda codegen on npm install/npm ci
panda needs to generate types to work. We used to generate those after
deps install but it's not that necessary, since we generate them before
running the dev env, and before building the prod build.

This fixes the `npm ci` error in the frontend docker build
2024-07-03 11:10:16 +02:00
Emmanuel Pelletier
e3eb3e240a ♻️(frontend) starting a bit more structured frontend app
the idea is to use react aria, panda-css, react query and wouter as a
base, in addition to livekit react components

this is still mostly wip but it's usable:

- homepage shows a login link to create a room
- before joining a room you are asked to configure your audio/video/user
name
- note that if you directly go to a a conference url it creates it even
if you are not logged in… very secured!
2024-07-02 20:31:42 +02:00
Jacques ROUSSEL
cf11cc3e60 🔥(CI) add ci secrets 2024-07-02 19:37:59 +02:00
antoine lebaud
af3ab37b53 🔧(helm) adapt helm chart
Done:
- Rename all occurrences of "impress" to "meet".
- Update Agent Connect secrets credentials for the dev environment.
- Add new development secrets for LiveKit.
- Remove Minio from the dev stack (no cold storage required).
- Add LiveKit chart to the stack.
- Remove templates and values related to the WebSocket server.

The integration of LiveKit was inspired by an example from the "numerique-gouve/infrastructure" repo.
However, a notable issue persists with LiveKit's default chart: we are unable to override
the namespace, resulting in all LiveKit components running in the default namespace.

thx to @rouja for his help.
2024-07-02 19:36:09 +02:00
antoine lebaud
d67934fbfa 🛂(helm) make start-kind.sh executable
The start-kind.sh script was read-only after copying the repository, preventing it from running
the "build-k8s-cluster" make command. Updated permissions to chmod 755.
2024-07-02 18:49:18 +02:00
antoine lebaud
5efbafa436 🎨(frontend) reorganize package.json dependencies
Sort the frontend dependencies, to avoid any undesired diff while
running npm install.
2024-07-02 17:09:43 +02:00
antoine lebaud
35ebc5a608 🔧(frontend) pass host and port through environment vars
Configured the frontend to use environment variables (prefixed with "VITE_") for frontend
port and host configuration, which will be overridden in the Helm chart values
to ensure correct values are used in different environments.

Helm requires the frontend port to be 8081 and use the public host,
not the default "localhost" value.
2024-07-02 17:07:17 +02:00
antoine lebaud
29a9b52b0e 💚(CI) fix build-and-push-backend steps in Docker Hub workflow
Renamed docker/files/usr/local/etc/gunicorn/impress.py to .../meet.py to match the updated
backend source filenames. This resolves the issue where the Dockerfile was attempting
to copy a non-existent file, causing the build to fail.
2024-07-02 16:26:32 +02:00
antoine lebaud
f85a1efa29 🔧(frontend) pass API and LiveKit server URLs through environment vars
Configured the frontend to use environment variables (prefixed with "VITE_") for API
and LiveKit server URLs, which will be overridden in the Helm chart values
to ensure correct URLs are used in different environments.
2024-07-02 16:22:36 +02:00
antoine lebaud
5a90ac0a49 💚(CI) add missing environment variables
Backend tests failed due to missing newly introduced environment variables,
related to LiveKit configurations.
2024-07-02 10:31:29 +02:00
antoine lebaud
f051938ace (frontend) introduce frontend Docker image
Inspired by the Docker images from numerique-gouv/people and numerique-gouv/impress
(see commit 1a3b396 in the "people" repository).

Due to the lack of a certified cold storage solution (e.g., S3) for serving static files,
we've containerized the frontend as a temporary deployment solution.

Vite.js static output is served using an Nginx reverse proxy.

I am not quite sure of this commit, please @manuhabitela could you review how I exposed
the static build from vite in my Nginx server? and do the appriopriate fix if necessary.
2024-07-01 20:35:47 +02:00
antoine lebaud
847ad709c5 🚨(frontend) fix TypeScript errors to enable successful build
Resolved minor TypeScript errors in the Proof of Concept (PoC)
that were causing the "npm run build" command to fail.

These fixes were necessary to prepare the frontend for
containerization with Docker.

ASAP, a CI step will prevent these kind of errors.
2024-07-01 20:34:08 +02:00
lebaudantoine
ed2d85fcee 🔥(CI) remove minio steps
Minio is not used anymore in the stack, and was removed during the project
initialization. Update the CI according to the current stack.
2024-07-01 20:34:08 +02:00
lebaudantoine
533517c203 🔧(secret) update secret repository
@rouja secrets management relies on a central repository, which manages
all numerique-gouv secrets.

I have created a new subfolder in its "numerique-gouv/secret" repository
to store all update key/credentials related to the Meet project.
2024-07-01 20:34:08 +02:00
lebaudantoine
03c6a6734e 🚚(tsclient) rename Impress to Meet
I have updated all references of "Impress" to "Meet" in the tsclient.
Also, I forgot to rename the repository link in the mail package.json,
my bad, it's fixed.
2024-07-01 20:34:08 +02:00
lebaudantoine
e391d21298 📝(readme) update project presentation
Add a minimal and up-to-date description of the project.
2024-07-01 20:34:06 +02:00
lebaudantoine
d66f19793a 🔥(renovate) clean ignored frontend dependencies
As the frontend project has been dropped and replaced by a new Vite.js project,
previously ignored dependencies may no longer be relevant.
2024-07-01 19:46:55 +02:00
lebaudantoine
890a58b133 🚚(DockerHub) rename DockerHub images
I have created two new repositories on DockerHub, one for the currently
existing backend image, and one for the future frontend image.

I searched-replaced all occurences of "lasuite/impress-frontend" or "lasuite/impress-backend".

One image won't exist anymore, "impress-y-webrtc-signaling", I have
removed the steps building and pushing its image to the DockerHub account.
2024-07-01 19:46:55 +02:00
lebaudantoine
0599e831d6 🔥(github) clean useless items
Performed a minor cleanup:

The CI related to the frontend has been removed temporarily.
It will be reinstated once the frontend development is initiated by @manuhabitela.

A redundant issue template has been removed. Existing templates in
the "ISSUE_TEMPLATE" folder remain in place.
2024-07-01 19:46:55 +02:00
lebaudantoine
022a033f75 🔥(changelog) clean Impress changelog
Remove any Changelog item related to Impress.
Changelog is now empty.
2024-07-01 19:46:55 +02:00
lebaudantoine
64efcc1623 🚚(backend) rename Impress to Meet
I have updated all references of "Impress" to "Meet".
Migrations were manually updated and not regenerated. Never-mind,
they all will be squashed before the first release.

I have also searched for reference to "Magnify", and replaced them
by "Meet".

While updating the backend sources, I have also fixed other parts of
the project, namely:
- Compose file
- Github documentation and CI
- Makefile commands
2024-07-01 19:46:55 +02:00
lebaudantoine
78e6f26383 📝(backend) update pyproject URLs to meet repository
I have renamed the Github project's name, from "Impress" to "Meet".
Updated the pyproject urls section, which provides essential metadata
about the project. This updates ensure all links point to the right
github repository.
2024-07-01 19:46:55 +02:00
lebaudantoine
1a2768f8dc 🚚(keycloak) rename Impress to Meet
I have updated all references of "Impress" to "Meet".

Few environment variables were updated, keycloak was including
the realm's name as a base URL for API endpoints.
2024-07-01 19:46:52 +02:00
lebaudantoine
e395f9a53e 🚚(frontend) rename Impress to Meet
I have updated all references of "Impress" to "Meet".
2024-07-01 14:53:23 +02:00
lebaudantoine
1ff0711534 🚚(mail) rename Impress to Meet
I have updated all references of "Impress" to "Meet".
Please note that the entire email content is outdated.
2024-07-01 14:47:52 +02:00
lebaudantoine
a111b615e8 🚚(frontend) delete useless nesting
Update frontend to be the root folder of the frontend sources,
instead of nesting them in a folder named as the application.

We only work on a single frontend app as of today, nesting
sources doesn't add any value, even though the initial organization
was more extensible.
2024-07-01 14:34:19 +02:00
lebaudantoine
afc3256ae1 💩(frontend) add PoC calling LiveKit server with an access token
This code is shit. It was made to play with the API.
@manuhabitela, the floor is yours.
2024-06-26 01:03:43 +02:00
lebaudantoine
817d352f00 🚧(backend) serialize the LiveKit access token
Call utility function while getting room informations, to return
a proper access token to the user which connects to a room.
2024-06-26 01:03:39 +02:00
lebaudantoine
2deef12d05 🚧(backend) Add utility function to generate LiveKit access token
Introduce a utility function to issue a basic LiveKit access token  with the minimal
required video grants for videoconferencing.

/!\ This function is naive, and doesn’t handle properly all cases. It’s under construction.

Testing was conducted using the LiveKit  connection test tool https://livekit.io/connection-test,
which allows users to  input the address of their local LiveKit server and an access token.

** Upcoming improvements? **

- Unit tests should be added.
- User display name should be their full name instead of their email address.
- Anonymous users should be allowed to provide a full name when requesting access to the room.
- Video grants should be adapted based on the room  configuration and the user's role.

These improvements will be addressed in future  commits.

Nevertheless, with this draft, we should be able to address various situations, including
public rooms, permanent rooms, temporary rooms, logged-in users, and anonymous users.
2024-06-25 18:55:52 +02:00
lebaudantoine
b3de3f5e92 🔧(backend) add LiveKit API secret/key pair in Django settings
When starting the LiveKit server using the '--dev' option, the server uses
defaults secret/key pair according to the documentation.

Make sure the Django settings and de facto the environment variable match
these defaults.

Please have a look at the documentation page here:
https://docs.livekit.io/home/self-hosting/local/
2024-06-25 18:26:24 +02:00
lebaudantoine
e66dbd163a (frontend) add LiveKit dependencies
LiveKit offers various React components as building blocks to build any
video or audio conference tools.

It also requires to install a LiveKit client, as the users will connect
to the LiveKit server once the backend have issued an Access Token,
directly from their web browsers.
2024-06-25 16:06:52 +02:00
lebaudantoine
1f534aed24 (backend) add livekit-api dependencies
Add livekit-api dependencies. According to the documentation, this Python
package is required while issuing Access Token for a LiveKit server, to
the users.
2024-06-25 16:06:52 +02:00
lebaudantoine
c90a92d5c9 (project) add CRUD API endpoints for Rooms and ResourceAccess models
Introduce CRUD API endpoints for the Rooms and ResourceAccess models.
The code follows the Magnify logic, with the exception that token generation
has been removed and replaced by a TODO item with a mocked value.

Proper integration of LiveKit will be added in future commits.

With the removal of group logic, some complex query sets can be simplified.
Previously, we checked for both direct and indirect access to a room.
Indirect access meant a room was shared with a group, and the user was a
member of that group. I haven’t simplified those query set, as I preferred
isolate changes in dedicated commits.

Additionally, all previous tests are still passing, although tests related
to groups have been removed.
2024-06-25 16:06:52 +02:00
lebaudantoine
2e6feede31 (project) add Room, Ressource, Access models from Magnify
I picked few models from Magnify to build our MVP:

- Resource:
   A generic model representing any type of resource. Though currently used only by Room,
   it encapsulates a meaningful business logic as an abstract model.
- Room:
   The primary object we manipulate, representing a meeting room with access
   and permission controls.
- ResourceAccess
   Ensures relevant users have the appropriate permissions for a given room.

** What’s different from Magnify ? **

Removed group logic; it will be added later. For now, we rely on the user model's
property to get its groups via desk.

Removed any logic or method related to Jitsi or LiveKit. These servers will be integrated
in the upcomming commits.

Focus on Room-related models to maintain a minimal and functional product (KISS principle)
until we achieve product-market fit (PMF).

Creating simple public and private, permanent and temporary rooms
is sufficient for building our MVP.

The Meeting model in Magnify, which supports recurrence, should be handled by
the collaborative calendar instead.

Adapted the unit test to use Pytest, and linted all the sources using Ruff linter.

(Migrations will be squashed before releasing the MVP)
2024-06-25 16:06:52 +02:00
lebaudantoine
fbe79b7b2b 🔧(compose) add a LiveKit server to the stack
Based on @mathisbarthere's PR on openfun/Magnify migration to LiveKit.
These configurations might need to be updated.

Please refer to the documentation: https://docs.livekit.io/home/self-hosting/local/

The 'livekit-server --dev' will start a LiveKit in development mode,
the instance will use the following API key/secret pair:

API Key: devkey
API secret: secret

By default LiveKit's signal server binds to `127.0.0.1:7880`, adding the
option `--bind 0.0.0.0 allow other devices on your network to access the
server.
2024-06-25 16:04:27 +02:00
lebaudantoine
54e4bbcd06 (frontend) add login/logout Authorization Code flow
Quick and dirty code to initiate a login or logout flow based on
user's click.

The code is copied/pasted from several sources of Impress. It's dirty,
and meant to be refactored.

It asserts the login and logout are still functional while introducing
new features in the project.
2024-06-25 13:12:25 +02:00
lebaudantoine
350a3cbd80 (frontend) create Vite app using npm
Run the command 'npm create vite@latest' to bootstrap a new frontend project.
Please note, other elements of the project still use yarn, to avoid confusion
let's use npm instead.

Vite was chosen over Next.Js for its simplicity; Next.Js could be kind of a
black box where a lot of magics happen.
2024-06-25 13:01:02 +02:00
Samuel Paccoud - DINUM
5b1a2b20de (project) Django boilerplate
This commit introduces a boilerplate inspired by https://github.com/numerique-gouv/impress.
The code has been cleaned to remove unnecessary Impress logic and dependencies.

Changes made:
- Removed Minio, WebRTC, and create bucket from the stack.
- Removed the Next.js frontend (it will be replaced by Vite).
- Cleaned up impress-specific backend logics.

The whole stack remains functional:
- All tests pass.
- Linter checks pass.
- Agent Connexion sources are already set-up.

Why clear out the code?

To adhere to the KISS principle, we aim to maintain a minimalist codebase. Cloning Impress
allowed us to quickly inherit its code quality tools and deployment configurations for staging,
pre-production, and production environments.

What’s broken?
- The tsclient is not functional anymore.
- Some make commands need to be fixed.
- Helm sources are outdated.
- Naming across the project sources are inconsistent (impress, visio, etc.)
- CI is not configured properly.

This list might be incomplete. Let's grind it.
2024-06-25 12:48:54 +02:00
Samuel Paccoud - DINUM
2d81979b0a Initialize project 2023-12-10 16:10:06 +01:00