@poadio/starter-next 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +9 -0
- package/.env.example +8 -0
- package/Dockerfile +29 -0
- package/README.md +141 -2
- package/bun.lock +156 -0
- package/gitignore +37 -0
- package/next.config.ts +14 -0
- package/package.json +70 -4
- package/public/logo.svg +1 -0
- package/public/providers/google.svg +1 -0
- package/public/providers/keycloak.svg +1 -0
- package/scripts/dev.mjs +68 -0
- package/scripts/env.mjs +130 -0
- package/scripts/env.test.mjs +71 -0
- package/src/app/(auth)/login/login-form.tsx +258 -0
- package/src/app/(auth)/login/page.tsx +16 -0
- package/src/app/(auth)/mfa/mfa-form.tsx +55 -0
- package/src/app/(auth)/mfa/page.tsx +16 -0
- package/src/app/(auth)/reset/page.tsx +16 -0
- package/src/app/(auth)/reset/reset-form.tsx +51 -0
- package/src/app/app/account/account.css +36 -0
- package/src/app/app/account/account.tsx +476 -0
- package/src/app/app/account/page.tsx +18 -0
- package/src/app/app/dashboard.tsx +58 -0
- package/src/app/app/hello/[name]/page.tsx +38 -0
- package/src/app/app/layout.tsx +12 -0
- package/src/app/app/page.tsx +18 -0
- package/src/app/app/public/page.tsx +15 -0
- package/src/app/app/public/public-content.tsx +31 -0
- package/src/app/globals.css +271 -0
- package/src/app/home.css +186 -0
- package/src/app/home.tsx +92 -0
- package/src/app/icon.svg +1 -0
- package/src/app/layout.tsx +58 -0
- package/src/app/not-found.tsx +6 -0
- package/src/app/page.tsx +6 -0
- package/src/app/providers.tsx +24 -0
- package/src/app/setup/page.tsx +39 -0
- package/src/app/shell.css +752 -0
- package/src/app.meta.ts +41 -0
- package/src/components/brand.tsx +15 -0
- package/src/components/captcha.tsx +93 -0
- package/src/components/link-button.tsx +9 -0
- package/src/components/rich.tsx +14 -0
- package/src/components/shell/app-menu.tsx +127 -0
- package/src/components/shell/app-shell.tsx +268 -0
- package/src/components/shell/page-title.tsx +29 -0
- package/src/components/shell/switches.tsx +35 -0
- package/src/components/shell/use-layout.ts +123 -0
- package/src/core/auth.tsx +227 -0
- package/src/core/env.server.ts +27 -0
- package/src/core/env.tsx +46 -0
- package/src/core/guards.tsx +74 -0
- package/src/core/messages.ts +18 -0
- package/src/core/providers.ts +32 -0
- package/src/core/theme-script.ts +7 -0
- package/src/core/theme.tsx +37 -0
- package/src/i18n/client.tsx +47 -0
- package/src/i18n/en.ts +228 -0
- package/src/i18n/fr.ts +251 -0
- package/src/i18n/index.ts +38 -0
- package/src/i18n/server.ts +19 -0
- package/tsconfig.json +21 -0
package/.dockerignore
ADDED
package/.env.example
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Variables du front, à copier dans .env (partagé) ou .env.local (machine, non versionné).
|
|
2
|
+
# Lues par le serveur Next.js À CHAQUE REQUÊTE, jamais compilées dans le code.
|
|
3
|
+
# Seules PUBLIC_* et POAD_URL / POAD_ANON_KEY / POAD_MAIL_URL arrivent dans le navigateur.
|
|
4
|
+
# Sans POAD_URL ni POAD_ANON_KEY, bun start les lit dans poad/config.toml et poad/secrets.toml.
|
|
5
|
+
|
|
6
|
+
# POAD_URL=https://mon-projet.example.com
|
|
7
|
+
# POAD_ANON_KEY=eyJ...
|
|
8
|
+
PUBLIC_APP_ENV=development
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Image du front : compilée une fois, configurée au démarrage.
|
|
2
|
+
# docker build -t mon-app .
|
|
3
|
+
# docker run -p 8080:3000 -e POAD_URL=https://... -e POAD_ANON_KEY=... -e PUBLIC_APP_ENV=prod mon-app
|
|
4
|
+
# Le serveur Next.js lit les variables PUBLIC_* et POAD_* à chaque requête et
|
|
5
|
+
# les passe au navigateur : rien n'est compilé dans l'image (pas de NEXT_PUBLIC_* au build).
|
|
6
|
+
|
|
7
|
+
FROM node:22-alpine AS build
|
|
8
|
+
# bun installe les dépendances ; Node exécute Next.js
|
|
9
|
+
COPY --from=oven/bun:1.4.4-alpine /usr/local/bin/bun /usr/local/bin/bun
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
ENV NEXT_TELEMETRY_DISABLED=1
|
|
12
|
+
COPY package.json bun.lock ./
|
|
13
|
+
RUN bun install --frozen-lockfile
|
|
14
|
+
COPY . .
|
|
15
|
+
RUN bun run build
|
|
16
|
+
|
|
17
|
+
# Serveur autonome (output: 'standalone') : server.js et le strict nécessaire de node_modules
|
|
18
|
+
FROM node:22-alpine
|
|
19
|
+
WORKDIR /app
|
|
20
|
+
ENV NODE_ENV=production \
|
|
21
|
+
NEXT_TELEMETRY_DISABLED=1 \
|
|
22
|
+
HOSTNAME=0.0.0.0 \
|
|
23
|
+
PORT=3000
|
|
24
|
+
COPY --from=build --chown=node:node /app/.next/standalone ./
|
|
25
|
+
COPY --from=build --chown=node:node /app/.next/static ./.next/static
|
|
26
|
+
COPY --from=build --chown=node:node /app/public ./public
|
|
27
|
+
USER node
|
|
28
|
+
EXPOSE 3000
|
|
29
|
+
CMD ["node", "server.js"]
|
package/README.md
CHANGED
|
@@ -1,3 +1,142 @@
|
|
|
1
|
-
#
|
|
1
|
+
# poad · starter Next.js
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Application Next.js (App Router, TypeScript) prête à brancher sur un projet
|
|
4
|
+
poad : page de démarrage, écran de connexion, cadre d'application et compte
|
|
5
|
+
utilisateur, sur `@poadio/ui-react` et `@poadio/client-js`. Le pendant du
|
|
6
|
+
starter Angular (`@poadio/starter-angular`), page pour page.
|
|
7
|
+
|
|
8
|
+
## Démarrer
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
poad create mon-app --template next # modèle, poad init, dépendances, premier commit
|
|
12
|
+
cd mon-app && bun start # projet poad, variables, puis next dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Ou dans un dossier existant : `poad init && poad start`, `bun install`, `bun start`.
|
|
16
|
+
|
|
17
|
+
Projet repris de git sur un autre poste : `git clone`, puis `bun start`, rien
|
|
18
|
+
d'autre. `bun start` installe les dépendances si elles manquent et lance le
|
|
19
|
+
projet poad local s'il ne tourne pas (`poad start` : secrets de ce poste, base
|
|
20
|
+
neuve, migrations, seed, ports déjà pris remplacés, services du projet), puis
|
|
21
|
+
`next dev` sur le premier port libre à partir de 3300 (`bun start --port 4000`
|
|
22
|
+
pour en imposer un). Il faut Docker et le CLI (`npm install -g poad`).
|
|
23
|
+
|
|
24
|
+
## Variables d'environnement (lues au démarrage, pas compilées)
|
|
25
|
+
|
|
26
|
+
Next.js lit `.env`, `.env.<mode>`, `.env.local`, `.env.<mode>.local`, puis
|
|
27
|
+
l'environnement du processus (voir `.env.example`). Sans `POAD_URL` ni
|
|
28
|
+
`POAD_ANON_KEY`, `bun start` les lit dans `poad/config.toml` et
|
|
29
|
+
`poad/secrets.toml` (ce dossier ou un parent).
|
|
30
|
+
|
|
31
|
+
Le serveur Next.js lit ces variables **à chaque requête** (`src/core/env.server.ts`,
|
|
32
|
+
appelé par `src/app/layout.tsx`) et ne passe au navigateur que `PUBLIC_*`,
|
|
33
|
+
`NEXT_PUBLIC_*` et `POAD_URL`, `POAD_ANON_KEY`, `POAD_MAIL_URL`. Rien n'est
|
|
34
|
+
compilé dans le code : pas besoin de reconstruire pour changer de projet poad.
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
'use client';
|
|
38
|
+
import { useEnv } from '@/core/env';
|
|
39
|
+
const api = useEnv('PUBLIC_API_URL'); // dans un composant ; env('PUBLIC_API_URL') ailleurs
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`bun run env` affiche les noms des variables que verra le navigateur.
|
|
43
|
+
|
|
44
|
+
## Image Docker
|
|
45
|
+
|
|
46
|
+
Compilée une fois, configurée au démarrage : serveur autonome de Next.js
|
|
47
|
+
(`output: 'standalone'`), qui lit les variables du conteneur à chaque requête.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
docker build -t mon-app .
|
|
51
|
+
docker run -p 8080:3000 -e POAD_URL=https://mon-projet.example.com -e POAD_ANON_KEY=eyJ... -e PUBLIC_APP_ENV=prod mon-app
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Routes
|
|
55
|
+
|
|
56
|
+
Celles de Next.js : un dossier de `src/app`, un `page.tsx`.
|
|
57
|
+
|
|
58
|
+
| Fichier | Route |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `app/page.tsx` | `/` |
|
|
61
|
+
| `app/app/account/page.tsx` | `/app/account` |
|
|
62
|
+
| `app/app/hello/[name]/page.tsx` | `/app/hello/:name` (paramètre dans `params`) |
|
|
63
|
+
| `app/(auth)/login/page.tsx` | `/login` (dossier entre parenthèses : groupe sans segment) |
|
|
64
|
+
| `app/app/layout.tsx` | cadre de toutes les pages de `app/` |
|
|
65
|
+
|
|
66
|
+
Une page exporte son titre (traduit) et pose ses gardes :
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
export const generateMetadata = titled('title.account'); // titre de l'onglet
|
|
70
|
+
export default function Page() {
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
<PageTitle k="title.account" /> {/* titre du canevas */}
|
|
74
|
+
<SignedIn>…</SignedIn> {/* connecté */}
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
// <SignedIn roles={['admin']}> rôle dans app_metadata.roles
|
|
79
|
+
// <SignedIn mfa={false}> sans exiger la MFA
|
|
80
|
+
// <SignedOut> pages de connexion
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Session et gardes
|
|
84
|
+
|
|
85
|
+
La session vit dans le navigateur, comme dans le starter Angular :
|
|
86
|
+
`@poadio/auth-js` la garde dans `localStorage` (partagée entre onglets,
|
|
87
|
+
renouvelée avant échéance, retour des liens e-mail et d'OAuth traité au
|
|
88
|
+
chargement). Le serveur Next.js ne la voit pas : les gardes (`src/core/guards.tsx`)
|
|
89
|
+
sont des composants clients, qui montrent un indicateur le temps de lire la
|
|
90
|
+
session puis affichent la page ou redirigent. Elles ne sont qu'un confort
|
|
91
|
+
d'affichage : ce qui protège les données, c'est le RLS du projet poad.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
'use client';
|
|
95
|
+
import { useAuth, usePoad, useSession, useUser } from '@/core/auth';
|
|
96
|
+
const user = useUser(); // null si déconnecté
|
|
97
|
+
const poad = usePoad(); // poad.from('notes').find(), poad.storage…
|
|
98
|
+
const { displayName, claims, needsMfa } = useAuth();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Langues
|
|
102
|
+
|
|
103
|
+
Français (défaut) et anglais. Les textes de l'application sont dans
|
|
104
|
+
`src/i18n/fr.ts` et `en.ts` (mêmes clés, vérifiées par TypeScript) ; ceux des
|
|
105
|
+
composants viennent du catalogue de la bibliothèque (`UI_FR`, `UI_EN`, via
|
|
106
|
+
`UiI18nProvider`). La langue suit le choix de l'utilisateur (sélecteur FR/EN,
|
|
107
|
+
cookie `app.locale`), sinon celle du navigateur.
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
const t = useT(); // composant client
|
|
111
|
+
const t = await getT(); // composant serveur
|
|
112
|
+
t('dashboard.hello', { name });
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Ce qu'il y a dedans
|
|
116
|
+
|
|
117
|
+
| Route | Page | Accès |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `/` | Démarrage | tous |
|
|
120
|
+
| `/login` | Mot de passe, inscription, lien magique, oubli, fournisseurs OAuth, sans compte | déconnecté |
|
|
121
|
+
| `/mfa`, `/reset` | Double authentification, nouveau mot de passe | session |
|
|
122
|
+
| `/app` | Tableau de bord, dans le cadre (barre + menu) | connecté |
|
|
123
|
+
| `/app/public` | Page du cadre ouverte à tous | tous |
|
|
124
|
+
| `/app/account` | Profil, sécurité, MFA (TOTP), identités, sessions | connecté |
|
|
125
|
+
| `/app/hello/:name` | Exemple de route dynamique | tous |
|
|
126
|
+
| `/setup` | Comment brancher l'application (sans `POAD_URL` ni `POAD_ANON_KEY`) | tous |
|
|
127
|
+
|
|
128
|
+
Les boutons de connexion suivent ce que le projet poad propose (`/settings`) :
|
|
129
|
+
ajoutez un fournisseur côté poad (`poad run kc` pour un Keycloak local) et son
|
|
130
|
+
bouton apparaît.
|
|
131
|
+
|
|
132
|
+
## Adapter
|
|
133
|
+
|
|
134
|
+
- **Nom, description, version** : `package.json` (`title`, `description`, `version`).
|
|
135
|
+
- **Logo** : `public/logo.svg` et `src/app/icon.svg` ; couleurs et thème sombre : `src/app/globals.css`.
|
|
136
|
+
- **Menu** : `src/app.meta.ts`.
|
|
137
|
+
- **Pages** : `src/app`.
|
|
138
|
+
- **Textes** : `src/i18n/fr.ts`, `src/i18n/en.ts`.
|
|
139
|
+
|
|
140
|
+
## Dépendances
|
|
141
|
+
|
|
142
|
+
Next.js, React et les paquets `@poadio/*` (MIT), rien d'autre.
|
package/bun.lock
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 2,
|
|
3
|
+
"configVersion": 1,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "@poadio/starter-next",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@poadio/client-js": "^0.6.1",
|
|
9
|
+
"@poadio/ui-core": "^0.4.0",
|
|
10
|
+
"@poadio/ui-react": "^0.4.0",
|
|
11
|
+
"next": "16.4.6",
|
|
12
|
+
"react": "19.3.1",
|
|
13
|
+
"react-dom": "19.3.1",
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/node": "^24.0.0",
|
|
17
|
+
"@types/react": "^19.3.0",
|
|
18
|
+
"@types/react-dom": "^19.3.0",
|
|
19
|
+
"typescript": "~5.9.2",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
"packages": {
|
|
24
|
+
"@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
|
25
|
+
|
|
26
|
+
"@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="],
|
|
27
|
+
|
|
28
|
+
"@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="],
|
|
29
|
+
|
|
30
|
+
"@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="],
|
|
31
|
+
|
|
32
|
+
"@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="],
|
|
33
|
+
|
|
34
|
+
"@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="],
|
|
35
|
+
|
|
36
|
+
"@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="],
|
|
37
|
+
|
|
38
|
+
"@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="],
|
|
39
|
+
|
|
40
|
+
"@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="],
|
|
41
|
+
|
|
42
|
+
"@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="],
|
|
43
|
+
|
|
44
|
+
"@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="],
|
|
45
|
+
|
|
46
|
+
"@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="],
|
|
47
|
+
|
|
48
|
+
"@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="],
|
|
49
|
+
|
|
50
|
+
"@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="],
|
|
51
|
+
|
|
52
|
+
"@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="],
|
|
53
|
+
|
|
54
|
+
"@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="],
|
|
55
|
+
|
|
56
|
+
"@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="],
|
|
57
|
+
|
|
58
|
+
"@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="],
|
|
59
|
+
|
|
60
|
+
"@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="],
|
|
61
|
+
|
|
62
|
+
"@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="],
|
|
63
|
+
|
|
64
|
+
"@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="],
|
|
65
|
+
|
|
66
|
+
"@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="],
|
|
67
|
+
|
|
68
|
+
"@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="],
|
|
69
|
+
|
|
70
|
+
"@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="],
|
|
71
|
+
|
|
72
|
+
"@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="],
|
|
73
|
+
|
|
74
|
+
"@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="],
|
|
75
|
+
|
|
76
|
+
"@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="],
|
|
77
|
+
|
|
78
|
+
"@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="],
|
|
79
|
+
|
|
80
|
+
"@next/env": ["@next/env@16.4.6", "", {}, "sha512-SunBjJ6t+oBtecS3dTjdVuMhUogP5wD/vrGL5EVuQYM1iS4O5ilL51HkiJ3sPjMzRHiCChvr4dbaSJbR7F3lxA=="],
|
|
81
|
+
|
|
82
|
+
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@16.4.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-kJ4VVZkley17xKaJx72QN2IBqjrj7zenCQZaUF0l9ShS/1Mt2kW4+Z5KGG6vgr3L/J562xTOizVyM1iA/u5nlg=="],
|
|
83
|
+
|
|
84
|
+
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.4.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-eIPGZIqC+8JKaeZmvnCANJQF4xWkkHqSnAAajtFxgwDMAOnCgxNvP52SeWZ41PyVwoe+Le/NQuZSaQ8j7YshSA=="],
|
|
85
|
+
|
|
86
|
+
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA=="],
|
|
87
|
+
|
|
88
|
+
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA=="],
|
|
89
|
+
|
|
90
|
+
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ=="],
|
|
91
|
+
|
|
92
|
+
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA=="],
|
|
93
|
+
|
|
94
|
+
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.4.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-U0p7/tEtqvHX2crhd841CDwKtp5CFkKXVjOhmfccR3Pvp64sj8KBwRqsvltqLOwVBbj0NtkxwXSDpEHYGbxeXQ=="],
|
|
95
|
+
|
|
96
|
+
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.4.6", "", { "os": "win32", "cpu": "x64" }, "sha512-3ZG15/5WIdlTQsIEvc9sPTTSL5XFrlLklIKmfF4fwsDnoAhu6NcBDXsk3mbGxNyo6aVLEGex+fHCv2MahY7a9g=="],
|
|
97
|
+
|
|
98
|
+
"@poadio/auth-js": ["@poadio/auth-js@0.1.0", "", {}, "sha512-v3pWGFfvgG3p3JpvAwKMELzgSfsfhPGLR96M5GLrlJegFujVnj4kSWIjgTz+cypxmqpeiAjYTvH+NWeSf2KXwg=="],
|
|
99
|
+
|
|
100
|
+
"@poadio/client-js": ["@poadio/client-js@0.6.1", "", { "dependencies": { "@poadio/auth-js": "^0.1.0", "@poadio/data-js": "^0.4.0", "@poadio/storage-js": "^0.1.0" }, "peerDependencies": { "@angular/core": ">=19", "react": ">=18", "vue": ">=3.3" }, "optionalPeers": ["@angular/core", "react", "vue"] }, "sha512-UyXTJOmykLkxS3uLEM5jdizDUKE/4Puz5VeR+9s28fS7tQ0WRMizrzOssIvzAFON/V+2GMBkgut3oh4+9PfFaw=="],
|
|
101
|
+
|
|
102
|
+
"@poadio/data-js": ["@poadio/data-js@0.4.0", "", {}, "sha512-7k5/0Z5GVktpCJjcuX4qX9GuK9bYohDSIrn5oKcc55TMc8mzcFehvmIA+1CEQm9oAJQt5EGx1OqTFh1fRwiYcQ=="],
|
|
103
|
+
|
|
104
|
+
"@poadio/storage-js": ["@poadio/storage-js@0.1.0", "", {}, "sha512-uE7l8XCRimmY5RYdXDSdNAWEPoRa30Umlf91jB+QLMi2k+zMVbuyxFDEuWIdqF3jcOAdpfrfji2OG8i4YOWPzA=="],
|
|
105
|
+
|
|
106
|
+
"@poadio/ui-core": ["@poadio/ui-core@0.4.0", "", {}, "sha512-NNrVnQQnMjIbXc8u1sHYpwsVaCZHHo0MsaImWNEDwW/EcrmmcyH6kMSEdsSwn9VjuqPCu6xUs4PbLk17UEAWdA=="],
|
|
107
|
+
|
|
108
|
+
"@poadio/ui-react": ["@poadio/ui-react@0.4.0", "", { "dependencies": { "@poadio/ui-core": "^0.4.0" }, "peerDependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" } }, "sha512-h2JFx7xOG1+I5d6/hbNTJp4wXxRGixSukj+CIAcRJN1980T2AQnqGbRFwb2nlvB5lIj/D1EYi+v9rnk/A5XHlg=="],
|
|
109
|
+
|
|
110
|
+
"@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],
|
|
111
|
+
|
|
112
|
+
"@types/node": ["@types/node@24.19.2", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ=="],
|
|
113
|
+
|
|
114
|
+
"@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="],
|
|
115
|
+
|
|
116
|
+
"@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="],
|
|
117
|
+
|
|
118
|
+
"baseline-browser-mapping": ["baseline-browser-mapping@2.11.39", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-Q9buOYhr2ggrEZpImICecZTJHCCd8yXkRUokFlUEQ8uiD6oP82F4W4jWnhOHZYV+wlvrC51V7Wy0ULyWjil5Wg=="],
|
|
119
|
+
|
|
120
|
+
"caniuse-lite": ["caniuse-lite@1.0.30001828", "", {}, "sha512-7MWeT+3DlrpuDybTWHl4Zb1Z80Z1fLLnOXuBjDXebzDVcqnEWUlV8JcbASg8B8BhcW8QT2UiR1KAtzYFIZHZYA=="],
|
|
121
|
+
|
|
122
|
+
"client-only": ["client-only@0.0.1", "", {}, "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="],
|
|
123
|
+
|
|
124
|
+
"csstype": ["csstype@3.2.4", "", {}, "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ=="],
|
|
125
|
+
|
|
126
|
+
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
|
127
|
+
|
|
128
|
+
"nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="],
|
|
129
|
+
|
|
130
|
+
"next": ["next@16.4.6", "", { "dependencies": { "@next/env": "16.4.6", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.6", "@next/swc-darwin-x64": "16.4.6", "@next/swc-linux-arm64-gnu": "16.4.6", "@next/swc-linux-arm64-musl": "16.4.6", "@next/swc-linux-x64-gnu": "16.4.6", "@next/swc-linux-x64-musl": "16.4.6", "@next/swc-win32-arm64-msvc": "16.4.6", "@next/swc-win32-x64-msvc": "16.4.6", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA=="],
|
|
131
|
+
|
|
132
|
+
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
|
133
|
+
|
|
134
|
+
"postcss": ["postcss@8.5.23", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="],
|
|
135
|
+
|
|
136
|
+
"react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="],
|
|
137
|
+
|
|
138
|
+
"react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="],
|
|
139
|
+
|
|
140
|
+
"scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="],
|
|
141
|
+
|
|
142
|
+
"semver": ["semver@7.8.6", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw=="],
|
|
143
|
+
|
|
144
|
+
"sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="],
|
|
145
|
+
|
|
146
|
+
"source-map-js": ["source-map-js@1.2.4", "", {}, "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA=="],
|
|
147
|
+
|
|
148
|
+
"styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "@babel/core": "*", "babel-plugin-macros": "*", "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" }, "optionalPeers": ["@babel/core", "babel-plugin-macros"] }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="],
|
|
149
|
+
|
|
150
|
+
"tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="],
|
|
151
|
+
|
|
152
|
+
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
153
|
+
|
|
154
|
+
"undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
|
|
155
|
+
}
|
|
156
|
+
}
|
package/gitignore
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Dépendances
|
|
2
|
+
/node_modules
|
|
3
|
+
/.pnp
|
|
4
|
+
.pnp.*
|
|
5
|
+
|
|
6
|
+
# Next.js
|
|
7
|
+
/.next/
|
|
8
|
+
/out/
|
|
9
|
+
/build
|
|
10
|
+
next-env.d.ts
|
|
11
|
+
*.tsbuildinfo
|
|
12
|
+
|
|
13
|
+
# Tests
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# Divers
|
|
17
|
+
.DS_Store
|
|
18
|
+
Thumbs.db
|
|
19
|
+
*.pem
|
|
20
|
+
npm-debug.log*
|
|
21
|
+
yarn-debug.log*
|
|
22
|
+
yarn-error.log*
|
|
23
|
+
.vscode/*
|
|
24
|
+
!.vscode/settings.json
|
|
25
|
+
!.vscode/extensions.json
|
|
26
|
+
.idea/
|
|
27
|
+
|
|
28
|
+
# Projet poad local : secrets et données (poad/config.toml et poad/migrations sont versionnés)
|
|
29
|
+
/poad/secrets.toml
|
|
30
|
+
/poad/data
|
|
31
|
+
/public/poad.json
|
|
32
|
+
# Keycloak local (secrets de test)
|
|
33
|
+
/dev/keycloak
|
|
34
|
+
|
|
35
|
+
# Variables locales
|
|
36
|
+
.env.local
|
|
37
|
+
.env.*.local
|
package/next.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NextConfig } from 'next';
|
|
2
|
+
|
|
3
|
+
const nextConfig: NextConfig = {
|
|
4
|
+
// Image Docker : serveur autonome (.next/standalone/server.js), sans node_modules complet
|
|
5
|
+
output: 'standalone',
|
|
6
|
+
// Pas d'en-tête « x-powered-by: Next.js »
|
|
7
|
+
poweredByHeader: false,
|
|
8
|
+
// Indicateur de next dev en bas à droite : en bas à gauche, il couvre le pied du rail (thème, langue)
|
|
9
|
+
devIndicators: { position: 'bottom-right' },
|
|
10
|
+
// next dev n'écrit pas AGENTS.md dans l'application (fichier que l'utilisateur n'a pas demandé)
|
|
11
|
+
agentRules: false,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default nextConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poadio/starter-next",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"title": "Mon application",
|
|
4
|
+
"description": "Application Next.js branchée sur poad : connexion, compte, cadre d’application (poad create --template next)",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/poadio/starter-next.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"start": "node scripts/dev.mjs",
|
|
13
|
+
"dev": "node scripts/dev.mjs",
|
|
14
|
+
"build": "next build",
|
|
15
|
+
"serve": "next start",
|
|
16
|
+
"env": "node scripts/env.mjs",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"test": "node --test scripts/*.test.mjs"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src",
|
|
22
|
+
"public",
|
|
23
|
+
"!public/env.json",
|
|
24
|
+
"scripts",
|
|
25
|
+
"gitignore",
|
|
26
|
+
"Dockerfile",
|
|
27
|
+
".dockerignore",
|
|
28
|
+
".env.example",
|
|
29
|
+
"next.config.ts",
|
|
30
|
+
"tsconfig.json",
|
|
31
|
+
"bun.lock",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@poadio/client-js": "^0.6.1",
|
|
36
|
+
"@poadio/ui-core": "^0.4.0",
|
|
37
|
+
"@poadio/ui-react": "^0.4.0",
|
|
38
|
+
"next": "16.4.6",
|
|
39
|
+
"react": "19.3.1",
|
|
40
|
+
"react-dom": "19.3.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/node": "^24.0.0",
|
|
44
|
+
"@types/react": "^19.3.0",
|
|
45
|
+
"@types/react-dom": "^19.3.0",
|
|
46
|
+
"typescript": "~5.9.2"
|
|
47
|
+
},
|
|
48
|
+
"poad": {
|
|
49
|
+
"port": 3300,
|
|
50
|
+
"template": {
|
|
51
|
+
"framework": "next",
|
|
52
|
+
"label": "Next.js + @poadio/ui-react",
|
|
53
|
+
"description": "Application Next.js branchée sur poad",
|
|
54
|
+
"port": 3300,
|
|
55
|
+
"gitignore": [
|
|
56
|
+
"/.next/",
|
|
57
|
+
"/out/",
|
|
58
|
+
"/build",
|
|
59
|
+
"/coverage",
|
|
60
|
+
"next-env.d.ts",
|
|
61
|
+
"*.tsbuildinfo",
|
|
62
|
+
"/public/env.json",
|
|
63
|
+
"/public/poad.json",
|
|
64
|
+
"/dev/keycloak"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"packageManager": "bun@1.4.4"
|
|
72
|
+
}
|
package/public/logo.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#4f46e5"/><rect x="9.4" y="7" width="3.2" height="19" rx="1.6" fill="#fff"/><circle cx="17" cy="13" r="4.9" fill="none" stroke="#fff" stroke-width="3.2"/><circle cx="17" cy="13" r="1.5" fill="#fff"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#FFC107" d="M43.6 20.1H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 13 4 4 13 4 24s9 20 20 20 20-9 20-20c0-1.3-.1-2.6-.4-3.9z"/><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z"/><path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z"/><path fill="#1976D2" d="M43.6 20.1H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.6-.4-3.9z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#4D4D4D" d="M13 5h22l11 19-11 19H13L2 24z"/><path fill="#00B8E3" d="M17 13h3l-6 11 6 11h-3l-6-11zm14 0h-3l6 11-6 11h3l6-11z"/><circle cx="24" cy="21" r="4" fill="#fff"/><path fill="#fff" d="M22.5 23h3l1 8h-5z"/></svg>
|
package/scripts/dev.mjs
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// bun start : tout ce qu'il faut pour travailler, y compris juste après un
|
|
2
|
+
// git clone sur un poste où rien n'est installé :
|
|
3
|
+
// 1. les dépendances, si node_modules manque ;
|
|
4
|
+
// 2. le projet poad local (poad/config.toml ici ou dans un dossier parent),
|
|
5
|
+
// s'il ne tourne pas : « poad start » crée les secrets de ce poste, la
|
|
6
|
+
// base, applique les migrations et le seed, remplace les ports déjà pris
|
|
7
|
+
// et lance les services du projet (Keycloak, Valkey…) ;
|
|
8
|
+
// 3. POAD_URL et POAD_ANON_KEY lus dans le projet poad, sauf s'ils sont déjà
|
|
9
|
+
// donnés (.env*, environnement), puis next dev sur un port libre.
|
|
10
|
+
// Les arguments sont passés à next dev : bun start --port 3300 (port fixe)
|
|
11
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
12
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
13
|
+
import { createServer } from 'node:net';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
|
|
16
|
+
const windows = process.platform === 'win32';
|
|
17
|
+
const { root, findPoadProject, poadDefaults } = await import('./env.mjs');
|
|
18
|
+
const nextBin = join(root, 'node_modules', '.bin', windows ? 'next.cmd' : 'next');
|
|
19
|
+
|
|
20
|
+
// 1. Dépendances : bun s'il est là, sinon npm
|
|
21
|
+
if (!existsSync(nextBin)) {
|
|
22
|
+
console.log('Dependencies are missing: installing them.');
|
|
23
|
+
const tried = ['bun', 'npm'].some((cmd) => {
|
|
24
|
+
const r = spawnSync(cmd, ['install'], { cwd: root, stdio: 'inherit', shell: windows });
|
|
25
|
+
return !r.error && r.status === 0;
|
|
26
|
+
});
|
|
27
|
+
if (!tried || !existsSync(nextBin)) {
|
|
28
|
+
console.error('Dependencies could not be installed: run "bun install" (or "npm install"), then "bun start" again.');
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 2. Projet poad local : démarré s'il ne tourne pas (sans effet sinon)
|
|
34
|
+
const project = process.env.POAD_URL ? null : findPoadProject(root);
|
|
35
|
+
if (project) {
|
|
36
|
+
const r = spawnSync('poad', ['start', '--quiet'], { cwd: project, stdio: 'inherit', shell: windows });
|
|
37
|
+
if (r.error && r.error.code === 'ENOENT') console.warn('The poad CLI is not installed: the local backend was not started (npm install -g poad, then "poad start").');
|
|
38
|
+
else if (r.error || r.status) console.warn('The local poad project did not start: the application will not reach its backend ("poad start" to see why).');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 3. Variables : celles du projet poad, seulement si rien ne les donne déjà
|
|
42
|
+
const added = poadDefaults('development');
|
|
43
|
+
const given = Object.keys(added);
|
|
44
|
+
console.log(`[env] ${given.length ? `from the poad project: ${given.join(', ')}` : 'POAD_* from .env* or the environment'}`);
|
|
45
|
+
|
|
46
|
+
/** Premier port libre à partir de start */
|
|
47
|
+
const free = (port) =>
|
|
48
|
+
new Promise((ok) => {
|
|
49
|
+
const s = createServer().once('error', () => ok(false)).once('listening', () => s.close(() => ok(true)));
|
|
50
|
+
s.listen(port, '127.0.0.1');
|
|
51
|
+
});
|
|
52
|
+
async function freePort(start) {
|
|
53
|
+
for (let port = start; port < start + 100; port++) if (await free(port)) return port;
|
|
54
|
+
return start;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const args = process.argv.slice(2);
|
|
58
|
+
if (!args.some((a) => a === '-p' || a === '--port' || a.startsWith('--port='))) {
|
|
59
|
+
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
60
|
+
const port = await freePort(Number(process.env.PORT) || Number(pkg.poad?.port) || 3300);
|
|
61
|
+
args.push('--port', String(port));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const next = spawn(nextBin, ['dev', ...args], { cwd: root, stdio: 'inherit', shell: windows, env: { ...process.env, ...added } });
|
|
65
|
+
const stop = () => next.kill();
|
|
66
|
+
process.on('SIGINT', stop);
|
|
67
|
+
process.on('SIGTERM', stop);
|
|
68
|
+
next.on('exit', (code) => process.exit(code ?? 0));
|