Commit graph

483 commits

Author SHA1 Message Date
Raphaël
ff0e218803
core: adding a linter to the project
This update focuses on improving **code consistency, readability, and maintainability** across the project.  
No functional changes have been introduced.

---

##  New
- Added a dedicated **`eslint.config.js`** configuration file.  
  - Integrates recommended JavaScript and TypeScript ESLint rules.  
  - Enforces consistent use of single quotes, semicolons, spacing, and other style standards.

---

## 🔧 Improvements
- Applied unified formatting to the following directories and files:
  - `src/@shared/src/auth/`  
  - `src/@shared/src/database/`  
  - `src/@shared/src/utils/`  
  - `src/auth/extra/login_demo.js`
- Replaced `let` with `const` where applicable to improve scoping and code safety.
- Standardized error handling and minor syntax refinements for greater clarity.

---

## 📌 Impact
- No changes to application logic or functionality.  
- The codebase is now **easier to read, maintain, and extend**, reducing the risk of style-related issues in the future.
2025-10-03 14:26:07 +02:00
Raphael
bb43622684
test 2025-10-03 13:31:54 +02:00
Raphael
c1b0833229
test 2025-10-03 13:31:35 +02:00
Raphael
357f1cc128
core(husky): adding the prefix 2025-10-03 13:17:32 +02:00
Raphael
8e1cfc0c4a
fix(flake/tmux): switching from pnpm to npx to workspace work
I don't know why but seems better
2025-09-30 14:47:48 +02:00
Raphael
fbc870f240
fix(package/eslint): adding the type module like asked by npmx eslint 2025-09-30 14:46:57 +02:00
Raphael
ec4eec13c8
core(flake/tmux): correct the name of the project 2025-09-30 14:42:12 +02:00
Raphael
80f9c13203
core(flake/tmux): adding tmux env for me
- Using tmux for developpement propose so adding a cmd to addit
(tmux-setup)
2025-09-30 14:39:19 +02:00
Raphael
9424bcf213
fix(package/script): adding a dev script for husky 2025-09-29 14:30:45 +02:00
Raphael
8ef9b323d0
fix(husky): adding precommit lint verification 2025-09-29 12:11:25 +02:00
Raphael
481a99ac27
core(pre-commit): adding a lint check before commit 2025-09-29 12:08:21 +02:00
Maieul BOYER
537cd03bb5 fixes(tsc): typing issue 2025-09-29 11:54:30 +02:00
Maieul BOYER
404735fe22 fixes(eslint): fixing everything that eslint complained about 2025-09-29 11:50:53 +02:00
Raphael
d11e4a4516
fix(ci/lint): Removing the frozen lockfile 2025-09-28 23:11:42 +02:00
Raphael
782d453cc8
fix(ci/lint): Using the working directory
- Learning the working-directory keyword in gh action
2025-09-28 23:10:23 +02:00
Raphael
bf34d113e0
fix(ci/lint): test w/ cd ./src before pnpm executions 2025-09-28 23:07:23 +02:00
Raphael
57d2f4e942
fix(ci/lint): testing without node cache 2025-09-28 23:03:44 +02:00
Raphael
9a025f16f8
fix(ci/lint): adding the correct version of the action pnpm 2025-09-28 23:01:21 +02:00
Raphael
3617ce6361
fix(ci/lint): adding the correct version on pnpm
- Using the same version of the flake (please i use nix btw)
2025-09-28 22:57:49 +02:00
Raphael
ecb77f98d4
fix(ci/lint): adding the correct version on node 2025-09-28 22:57:22 +02:00
Raphael
61da545281
fix(ci/lint): indentation was wrong
- correcting the indentation (yml de mort)
2025-09-28 22:53:24 +02:00
Raphael
369d0b2407
fix(ci/lint): indentation was wrong
- correcting the indentation (yml de mort)
2025-09-28 22:50:27 +02:00
Raphael
8e34b0563a
fix(icons/app): changing the variable name for one not already declared
- The name is now fastify2 because fastify was already declared
2025-09-28 22:32:49 +02:00
Raphael
6f42fe6929
fix!(icons/app): removing the global ignore
- Changing the ts-ignore by ts-execpt-error because safer and more
specific
2025-09-28 22:31:28 +02:00
Raphael
d5e7f57ef2
style(auth/vite): removing the comment on the same line
- Moving the comment below
2025-09-28 22:28:08 +02:00
Raphael
c88cc67e0b
style(icons/vite): removing the comment on the same line
- Moving the comment below
2025-09-28 22:27:27 +02:00
Raphael
a47ddb49bd
style(eslint): removing the files of the old version 2025-09-28 22:26:53 +02:00
Raphael
0a9c700228
ci(lint): adding a github action to check if lint is respected
- The github action will check:
  - If the code can be build
  - If the code respect the linter
2025-09-28 22:09:23 +02:00
Raphael
3566513881
core(package): removing the double package and added it in the src folder
The package for the core of the project is in src/
2025-09-28 21:48:23 +02:00
Raphael
bdcadcf324
style(src/icons): auto-correction of the linter
- using pnpm eslint --fix ./src
2025-09-28 19:04:24 +02:00
Raphael
38013b77d3
style(auth): auto-correction of the linter
- using pnpm eslint --fix ./src
2025-09-28 19:03:59 +02:00
Raphael
b56906b557
style(shared): auto-correction of the linter
- using pnpm eslint --fix ./src
2025-09-28 19:03:51 +02:00
Raphael
77324f6d89
core(package/linter): adding a linter for continuity propose
- Added a linter make an mandatory code of conduct for developpers and
have the same minimum
2025-09-28 19:02:49 +02:00
Raphael
dd7db727aa
core(make/tmux): adding the tmux rules
- Now tmux configuration can be load with the command make tmux
- The rules was added to .PHONY
- Project variable is needed for the creation of this tmux
2025-09-28 18:45:28 +02:00
Maieul BOYER
c4b1bb2f65 fix(auth): small issues with login process 2025-09-08 14:52:47 +02:00
Maix0
4f8ebc7dd9 feat(otp): use dedicated method to get user's otp secret
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 15:47:07 +02:00
Maix0
238dead666 Update src/auth/src/routes/whoami.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 15:47:07 +02:00
Maix0
a6ce4630f5 feat(jwtPlugin): correctly check for multiple registration
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 15:47:07 +02:00
Maix0
fa3966729f feat(database): remove use of any
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 15:47:07 +02:00
Maieul BOYER
85cfea3cbf feat(database): removed debug logs 2025-09-01 15:47:07 +02:00
Maieul BOYER
a7c753f38b feat(auth): Added 2FA/OTP manage endpoints
- CodeWise: Changed everything to use undefined when not present
- CodeWise: checks for nonpresent value using `isNullish`
- enableOtp: enable Otp, return topt url. Does nothing when
  already enabled
- disableOtp: disable 2FA Totp for the user
- statusOtp: get the 2FA status for the user. return the Totp Url if
  enabled
- loginDemo: split into two files
- loginDemo: supports for 2FA
- loginDemo: better response box
2025-09-01 15:47:07 +02:00
Raphaël
29a5d38530 fix(routes/OTP): timeout condition check
- The condition was inverted for the expiration of the token will be unvalidated
2025-09-01 15:47:07 +02:00
Raphaël
61adf0f742 fix(routes/login): remove debug message from login.ts
- The debug message was not anymore useful (and not the better way to speak to my console)
2025-09-01 15:47:07 +02:00
Maieul BOYER
964fe908a6 feat(auth): Base auth with plugins
- Add fastify to protect routes plugins (requireAuth: true)
- Simple Demo to show regular password auth (no 2FA/OTP nor remote auth)
- Currently supports: login, logout, signin
- OTP workflow should work, not tested
- Fixed convention for docker volumes (now all placed in /volumes/<name>)
2025-09-01 15:47:07 +02:00
Maieul BOYER
ddde700494 feat(auth): working plugin 2025-09-01 15:47:07 +02:00
Maieul BOYER
c545499c73 feat(otp): yeah used packet............. 2025-09-01 15:47:07 +02:00
Maieul BOYER
a16852c1b9 feat(death): I want to die... 2025-09-01 15:47:07 +02:00
Maieul BOYER
33e893ec58 feat(wip): ... 2025-09-01 15:47:07 +02:00
Maieul BOYER
70d72f4419 feat(database): split stuff into multiple files 2025-09-01 15:47:07 +02:00
Maieul BOYER
baf9dc54c6 wip(auth): WIP 2025-09-01 15:47:07 +02:00