Commit Graph

1577 Commits

Author SHA1 Message Date
Anthony LC
0024cc5814 🚨(backend) fix linting issue
Fix linting issue in the backend codebase.
2024-04-12 16:24:23 +02:00
Anthony LC
5587cf69dd 🔧(helm) add command create_demo
We need to get dummy data in the system
for the moment, it will insert a template
for the PDF endpoint.
We need to run this command after the
migration is made.
2024-04-12 16:24:23 +02:00
Anthony LC
68c130bd84 🔧(backend) activate https on oidc redirection
mozilla-django-oidc didn't add the https://
prefix to the redirect_uri.
We set the option SECURE_PROXY_SSL_HEADER to
('HTTP_X_FORWARDED_PROTO', 'https') in the
settings.py file to force the https prefix.
2024-04-12 16:24:23 +02:00
Anthony LC
22e79e7583 🔧(backend) activate container liveness probes
Enabled Dockerflow Django app by activating liveness probes. The previously
unavailable routes such as `__heartbeat__` and `__lbheartbeat__` are now
accessible. New endpoints include:
* GET /__version__
* GET /__heartbeat__
* GET /__lbheartbeat__
2024-04-12 16:24:23 +02:00
Anthony LC
056bad08a5 🔧(backend) configure RedisCache in production settings
In development, sessions are saved in local memory. It's working well,
however it doesn't adapt to a kubernetized setup. Several pods need
to access the current sessions, which need to be stored in a single
source of truth.

With a local memory cache, pods cannot read session saved in other pods.
We end up returning 401 errors, because we cannot authenticate the user.

I preferred setting up a proper cache than storing sessions in database,
because in the long run it would be a performance bottleneck. Cache will
decrease data access latency when reading current sessions.

I added a Redis cache backend to the production settings. Sessions would
be persisted to Redis. In K8s, a Redis operator will make sure the cached
data are not lost.

Two new dependencies were added, redis and django-redis.

I followed the installation guide of django-redis dependency. These
setting were tested deploying the app to a local K8s cluster.
2024-04-12 16:24:23 +02:00
Anthony LC
2f4dd4ee7a 🔐(impress) update impress oidc secrets
Update oidc secrets in dev and staging environments
to match agent connect with impress settings.
2024-04-12 16:24:23 +02:00
Anthony LC
51babc07af 🚚(project) rename desk occurences to impress
Rename desk occurences to impress.
2024-04-12 16:24:23 +02:00
Anthony LC
dbb592bc9a 🔨(CI) add Tilt
Tilt is a tool for local Kubernetes development.
It makes it easy to see your changes as you
make them, and it rebuilds and redeploys
your app as you change it.
It is a great tool for local development
and testing of Kubernetes applications.
2024-04-12 16:24:23 +02:00
Anthony LC
0dc1be4cc7 (e2e) test the pdf export of the impress app
Add a test to check the pdf export of the
impress app.
It intercept the download of the PDF and
read its content.
We can assert that the template is correctly
rendered, and that the pad text is present as
well.
2024-04-11 09:21:35 +02:00
Anthony LC
a772d8fc29 🤡(backend) demo template
Create the create_demo command.
It creates a demo template for the backend.
We add it in the makefile bootstrap.

We force the template id, this id is the same as
used in the frontend for the moment.
When the template feature will be created in
the frontend side we will not have to force
it anymore.
2024-04-11 09:21:35 +02:00
Anthony LC
c6c0c1355d 🙈(project) add .devcontainer in gitignore
.devcontainer is used to create virtual environment
for development. It is not necessary to be
included in the git repository.
2024-04-11 09:21:35 +02:00
Anthony LC
cc64b8c8b5 🐛(backend) format html when generate document
When we converted from markdown to html,
we didn't format the html, so it was displayed
like a string in our pdf.
We now format_html the html before we generate
the pdf.
2024-04-11 09:21:35 +02:00
Anthony LC
2665b707db (app-impress) print to pdf
Feature to print the pad to pdf.

It display a button in the pad toolbar,
when clicked it will convert the pad to markdown,
send the markdown with a template to the backend
to convert it to pdf and then download the pdf.
2024-04-11 09:21:35 +02:00
Anthony LC
e28a4294fa (app-desk) add useCreatePdfFromMarkdown
Add the hook useCreatePdfFromMarkdown,
it will be used to generate a pdf from a
a template and a markdown.
2024-04-11 09:21:35 +02:00
Anthony LC
9ca63baeeb 🔨(backend) add local CSRF_TRUSTED_ORIGINS
To allow the frontend to make requests to the backend,
we need to add the frontend's origin
to the CSRF_TRUSTED_ORIGINS setting.
2024-04-11 09:21:35 +02:00
Anthony LC
a5a8a64350 ♻️(app-impress) refacto pad store to add the editor
To spread the data editor to different feature
of our app, we add the editor in the pad store.
It will give an easy access to the editor data.
2024-04-11 09:21:35 +02:00
Anthony LC
272b18ae02 (y-webrtc-signaling) test signaling server
Create a e2e testcase to test the signaling server.
2024-04-09 16:56:21 +02:00
Anthony LC
37367f2d22 🎨(app-impress) different color per user
We generate a color for each user.
This color is used to highlight the
user's cursor and selection.
2024-04-09 16:56:21 +02:00
Anthony LC
2070a159e1 ️(app-impress) create pad store
Better to store the WebrtcProvider, we will
reuse the provider if one is already created.
2024-04-09 16:56:21 +02:00
Anthony LC
a4e8bbd26e 🚚(app-impress) rename usePadStore to usePadPanelStore
This commit renames the `usePadStore`
to `usePadPanelStore` to better
reflect the purpose of the store.
2024-04-09 16:56:21 +02:00
Anthony LC
75bb4b36d4 🔨(y-webrtc-signaling) dockerize y-webrtc-signaling
Dockerize y-webrtc-signaling for futur deployment.
Add a docker-compose file to run easily
the signaling server.
2024-04-09 16:56:21 +02:00
Anthony LC
f4e4cbaa56 (y-webrtc-signaling) create signaling server
Create signaling server for WebRTC.
It will be used for the collaborative editor, client
will connect to this server to see their
changes in real-time.
2024-04-09 16:56:21 +02:00
Anthony LC
6b567a0f69 🔧(sops) add secrets
Add secrets to the repository using sops.
2024-04-05 12:42:33 +02:00
Anthony LC
007a9ae4f4 💚(docker) adapt dockerfile with people updates
Adapt the dockerfile to include the new
people updates, plus adapt to impress project.
2024-04-05 12:42:33 +02:00
Anthony LC
ca0571cb21 (CI) copy docker-hub github-actions from people
Copy of docker-hub github-actions
from people repository to impress repository.
Replace occurence of people by impress.
2024-04-05 12:42:33 +02:00
Anthony LC
560dbf1c2e 🔧(helm) replace occurences of desk and people
Replace naively all occurences of
desk and people with impress.
2024-04-05 12:42:33 +02:00
Anthony LC
17729e231b (CI) copy helm config from people
Naive copy of helm config from people repository
to impress repository.
2024-04-05 12:42:33 +02:00
Anthony LC
409691d466 🚨(app-desk) improve linter
The linter was passing near the ts errors in
the tests, we improve the linter by adding
a ts checkup.
2024-04-04 17:40:27 +02:00
Anthony LC
603ece466d 🤡(app-impress) mock BlockNoteEditor
BlockNoteEditor uses many libraries not compatible
with Jest.
This commit mocks the BlockNoteEditor
component to allow Jest to run without errors.
2024-04-04 17:40:27 +02:00
Anthony LC
79831154be (app-impress) add basic blocknotes editor
Create PadEditor, the parent component for the editors.
We integrate the BlockNoteEditor into the PadEditor.
2024-04-04 17:40:27 +02:00
Anthony LC
da273d6b2b (app-markdown) add necessary library for pad editor
Add the necessary library for the pad editor:
- blocknote editor (Notion like editor)
- yjs and y-webrtc for real-time collaboration
2024-04-04 17:40:27 +02:00
Anthony LC
5ce77c2138 🤡(app-desk) mock pad and pads panel
In order to access to the pad page we mocked
the api calls of the pad and pads panel.
2024-04-04 17:40:27 +02:00
renovate[bot]
b7663cca2d ⬆️(dependencies) update js dependencies 2024-04-04 12:38:11 +02:00
Anthony LC
80335ffd15 🔥(markdownPDF) remove versionning app mardownPDF
Remove the app mardownPDF from the versionning,
this app is not used anymore, we don't want
to maintain it.
2024-04-04 12:05:54 +02:00
Anthony LC
6de828c049 🚨(frontend) fix CI probs
The CI highlighted some issues with the tests.
This commit fixes the issues.
2024-04-03 17:36:54 +02:00
Anthony LC
352d4f6d27 🔥(app-impress) remove teams pages
Remove teams pages from the next router.
2024-04-03 17:36:54 +02:00
Anthony LC
3e6f20aedd ️(frontend) clean yarn.lock
The yarn.lock file get full of garbage and old
dependencies after a while. This commit cleans it.
2024-04-03 17:36:54 +02:00
Anthony LC
bf19c50146 💚(CI) add frontend jobs
Add the frontend jobs to the CI pipeline.
2024-04-03 17:36:54 +02:00
Anthony LC
1d3f1f793e (e2e) adapt tests to impress app
Adapt e2e test to works with Impress.
2024-04-03 17:36:54 +02:00
renovate[bot]
cad206cccf ⬆️(dependencies) update django to v5.0.3 [SECURITY] 2024-04-03 13:10:09 +02:00
Anthony LC
3cd1852b93 🔧(sops) add secrets
Add secrets to the repository using sops.
2024-04-03 13:07:05 +02:00
Anthony LC
d19c7f7fd8 👷(project) rename i18n-back to i18n-crowdin
Rename i18n-back to i18n-crowdin.
Change the job to use the 'age' env.
2024-04-03 13:07:05 +02:00
Anthony LC
8afc003004 🐛(docker) switch CMD form from Shell to Exec
`backend-development` and `backend-production` CMD syntaxes were
using a Shell Form. Shell form prevented Unix signals from reaching
our container correctly, such as SIGTERM. Also, the shell process
ends up being the PID 1, instead of our Python scripts.

Docker recommends to use the exec form whenever possible.
2024-04-03 13:07:05 +02:00
Anthony LC
23797f2953 🔧(project) add frontend cmd to Makefile
add frontend cmd to Makefile.
2024-04-03 13:07:05 +02:00
Anthony LC
78bccafb93 🐛(backend) generate po file
Generate the PO file.
It will create the locale folder, and so
init correctly LOCALE_PATHS env.
This should fix the CI.
2024-04-03 13:07:05 +02:00
Anthony LC
42bea9940e 🔥(app-impress) remove addMembers feature
addMembers feature was a part of the People
project, we don't need it in the Impress project.
2024-04-03 11:57:36 +02:00
Anthony LC
55e2a2073d 🔥(app-impress) remove Members feature
Members feature was a part of the People
project, we don't need it in the Impress project.
2024-04-03 11:57:36 +02:00
Anthony LC
1f804ad1f9 🔥(app-impress) remove Teams feature
Teams feature was a part of the People
project, we don't need it in the Impress project.
2024-04-03 11:57:36 +02:00
Anthony LC
3ba388bc49 ⬆️(project) update renovate.json config
Update the renovate config to fit with
what we setup in People project.
2024-04-03 11:57:36 +02:00
Anthony LC
b517b0bc39 (app-impress) create feature pad
Create a new feature pad for the app impress.
It will be used to display a pad in the app.
2024-04-03 11:57:36 +02:00