commit 550e5d7ed2331f117fa834276baf9d43e747b73c Author: alma Date: Thu Apr 17 11:39:15 2025 +0200 Initial commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..6ddb0d00 Binary files /dev/null and b/.DS_Store differ diff --git a/.env b/.env new file mode 100644 index 00000000..dc7dd78a --- /dev/null +++ b/.env @@ -0,0 +1,72 @@ +NEXTAUTH_URL=https://lab.slm-lab.net +NEXTAUTH_SECRET=9eff5ad2f4b5ea744a34d9d8004cb5236f1931b26bf75f01a0a26203312fe1ec + +KEYCLOAK_CLIENT_ID=lab +KEYCLOAK_CLIENT_SECRET=LwgeE1ntADD20OuWC88S3pR0EaO7FtO4 +KEYCLOAK_REALM=cercle +KEYCLOAK_ISSUER=https://connect.slm-lab.net/realms/cercle +KEYCLOAK_BASE_URL=https://connect.slm-lab.net + +NEXTCLOUD_URL=https://espace.slm-lab.net +NEXTCLOUD_CLIENT_ID=espace.slm-lab.net +NEXTCLOUD_CLIENT_SECRET=YHLVMGpu0nGRaP7gMDpSjRr1ia6HiSr1 + +# Agenda/Calendar database (Prisma) +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/calendar_db?schema=public" + +# Sidebar iframes +NEXT_PUBLIC_IFRAME_DIARY_URL=https://espace.slm-lab.net/apps/diary/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_MAIL_URL=https://espace.slm-lab.net/apps/mail/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_DRIVE_URL=https://espace.slm-lab.net/apps/files/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_CONTACTS_URL=https://espace.slm-lab.net/apps/contacts/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_LEARN_URL=https://apprendre.slm-lab.net +NEXT_PUBLIC_IFRAME_PAROLE_URL=https://parole.slm-lab.net/channel/City +NEXT_PUBLIC_IFRAME_CHAPTER_URL=https://chapitre.slm-lab.net +NEXT_PUBLIC_IFRAME_AGILITY_URL=https://agilite.slm-lab.net/oidc/login +NEXT_PUBLIC_IFRAME_ARTLAB_URL=https://artlab.slm-lab.net +NEXT_PUBLIC_IFRAME_GITE_URL=https://gite.slm-lab.net/user/oauth2/cube +NEXT_PUBLIC_IFRAME_CALCULATION_URL=https://calcul.slm-lab.net +NEXT_PUBLIC_IFRAME_MEDIATIONS_URL=https://connect.slm-lab.net/realms/cercle/protocol/openid-connect/auth?client_id=mediations.slm-lab.net&redirect_uri=https%3A%2F%2Fmediations.slm-lab.net%2F%3Fopenid_mode%3Dtrue&scope=openid%20profile%20email&response_type=code +NEXT_PUBLIC_IFRAME_SHOWCASE_URL=https://page.slm-lab.net + +# Navigation bar iframes +NEXT_PUBLIC_IFRAME_CONFERENCE_URL=https://vision.slm-lab.net +NEXT_PUBLIC_IFRAME_RADIO_URL=https://galaorangelique.wixsite.com/website +NEXT_PUBLIC_IFRAME_TIMETRACKER_URL=https://espace.slm-lab.net/apps/timemanager/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_NOTES_URL=https://espace.slm-lab.net/apps/notes/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_ANNOUNCEMENT_URL=https://espace.slm-lab.net/apps/announcementcenter/?embedMode=true&hideNavigation=true + +# Avatar menu iframes +NEXT_PUBLIC_IFRAME_HEALTHVIEW_URL=https://espace.slm-lab.net/apps/health/?embedMode=true&hideNavigation=true +NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL=https://connect.slm-lab.net/realms/cercle/protocol/openid-connect/auth?response_type=code&scope=openid&client_id=page.slm-lab.net&state=f72528f6756bc132e76dd258691b71cf&redirect_uri=https%3A%2F%2Fpage.slm-lab.net%2Fwp-admin%2F +NEXT_PUBLIC_IFRAME_USERSVIEW_URL=https://example.com/users-view +NEXT_PUBLIC_IFRAME_THEMESSAGE_URL=https://lemessage.slm-lab.net/admin/ +NEXT_PUBLIC_IFRAME_AI_ASSISTANT_URL=https://alma.slm-lab.net + +ROCKET_CHAT_TOKEN=w91TYgkH-Z67Oz72usYdkW5TZLLRwnre7qyAhp7aHJB +ROCKET_CHAT_USER_ID=Tpuww59PJKsrGNQJB +LEANTIME_TOKEN=lt_lsdShQdoYHaPUWuL07XZR1Rf3GeySsIs_UDlll3VJPk5EwAuILpMC4BwzJ9MZFRrb +LEANTIME_API_URL=https://agilite.slm-lab.net + + +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/calendar_db?schema=public" + + +NEWSDB_URL=postgresql://alma:Sict33711###@172.16.0.104:5432/rivacube +DB_USER=alma +DB_PASSWORD=Sict33711### +DB_NAME=rivacube +DB_HOST=172.16.0.104 + +# Database Configuration +DB_HOST=172.16.0.104 +DB_PORT=5432 +DB_USER=alma +DB_PASSWORD=Sict33711### +DB_NAME=rivacube + +# IMAP Configuration +IMAP_USER=alma@governance-labs.org +IMAP_PASSWORD=8s-hN8u37-IP#-y +IMAP_HOST=mail.infomaniak.com +IMAP_PORT=993 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a90168b9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Use Node.js 22 as the base image +FROM node:22-alpine + +# Set working directory +WORKDIR /application + +# Copy package files first +COPY package*.json ./ + +# Install dependencies +RUN npm ci + +# Copy the rest of the application +COPY . . + +# Initialize Prisma +RUN npx prisma generate +RUN npx prisma migrate dev --name init + +# Build the Next.js application +RUN npm run build + +# Expose port 3000 +EXPOSE 3000 + +# Set environment variable +ENV NODE_ENV production +ENV NEXT_TELEMETRY_DISABLED 1 + +# Start the application and keep the container running even if it fails +CMD ["sh", "-c", "npm start || tail -f /dev/null"] \ No newline at end of file diff --git a/app/[section]/page.tsx b/app/[section]/page.tsx new file mode 100644 index 00000000..cc3515e1 --- /dev/null +++ b/app/[section]/page.tsx @@ -0,0 +1,31 @@ +import { notFound } from 'next/navigation' + +const menuItems = { + board: "https://example.com/board", + chapter: "https://example.com/chapter", + flow: "https://example.com/flow", + design: "https://example.com/design", + gitlab: "https://gitlab.com", + crm: "https://example.com/crm", + missions: "https://example.com/missions" +} + +export default function SectionPage({ params }: { params: { section: string } }) { + const iframeUrl = menuItems[params.section as keyof typeof menuItems] + + if (!iframeUrl) { + notFound() + } + + return ( +
+