-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Update web app layout and content, add environment configuratio… #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ns, and enhance Docker scripts - Updated layout.tsx with new title and description for FizzUp application. - Redesigned page.tsx with a new hero section, navigation, and feature grid. - Added environment configuration files for development, production, and local environments. - Created a shared library with enums and interfaces for environment management. - Introduced new Docker management scripts for development and production. - Added Docker Compose configuration for production environment. - Removed obsolete Docker scripts and ensured better organization of Docker-related files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refreshes the web app’s landing layout/content, introduces a new Nx “shared” library for environment typing/validation, and reorganizes Docker tooling by replacing multiple small scripts with consolidated dev/prod scripts plus a production compose file.
Changes:
- Redesign the web app landing page and update metadata.
- Add
libs/sharedwith environment enums/interfaces (Zod schemas) and wire it into the web app via TS path alias. - Replace legacy Docker helper scripts with
docker-dev.sh/docker-prod.shand add a production Docker Compose file.
Reviewed changes
Copilot reviewed 29 out of 34 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/docker-dev.sh | New consolidated dev Docker management script (start/stop/logs/clean/check). |
| scripts/docker-prod.sh | New production Docker management script (start/stop/build/logs/clean/debug). |
| scripts/docker-start.sh | Removed legacy Docker start script (superseded by docker-dev.sh). |
| scripts/docker-stop.sh | Removed legacy Docker stop script (superseded by docker-dev.sh). |
| scripts/docker-restart.sh | Removed legacy Docker restart script (superseded by docker-dev.sh). |
| scripts/docker-status.sh | Removed legacy Docker status script (superseded by docker-dev.sh). |
| scripts/docker-logs.sh | Removed legacy Docker logs script (superseded by docker-dev.sh). |
| scripts/docker-clean.sh | Removed legacy Docker clean script (superseded by docker-dev.sh). |
| scripts/check-ports.sh | Removed legacy port-check script (superseded by docker-dev.sh check). |
| docker-compose.prod.yaml | Introduces a production compose file for infrastructure services (Postgres/Redis/etc.). |
| scripts/docker/Dockerfile.api | Added API Dockerfile placeholder for future container builds. |
| scripts/docker/Dockerfile.web | Added web Dockerfile placeholder for future container builds. |
| scripts/docker/nginx/nginx.conf | Added Nginx config placeholder for future reverse-proxy/static serving. |
| libs/shared/src/lib/enums/environment.enum.ts | Adds environment enum/schema definitions (Zod). |
| libs/shared/src/lib/interfaces/web-environment.interface.ts | Adds a Zod schema + inferred type for web app environment configuration. |
| libs/shared/src/lib/enums/index.ts | Barrel export for enums. |
| libs/shared/src/lib/interfaces/index.ts | Barrel export for interfaces. |
| libs/shared/src/lib/index.ts | Library entry exports. |
| libs/shared/src/index.ts | Public entrypoint export. |
| libs/shared/tsconfig.json | TS config for the shared Nx library. |
| libs/shared/tsconfig.lib.json | Build TS config for the shared Nx library. |
| libs/shared/eslint.config.cjs | Shared lib eslint config extending repo base. |
| libs/shared/project.json | Nx project definition for shared library. |
| libs/shared/package.json | Shared library package manifest. |
| libs/shared/README.md | Shared library README. |
| apps/web-app/tsconfig.json | Adds TS path alias for @shared. |
| apps/web-app/app/layout.tsx | Updates app metadata (title/description). |
| apps/web-app/app/page.tsx | New landing page UI in the App Router home route. |
| apps/web-app/app/pages/index.tsx | Adds an additional page component under app/pages/ (currently not a valid App Router route file). |
| apps/web-app/app/environments/environment.ts | Adds local environment config constant. |
| apps/web-app/app/environments/environment.development.ts | Adds development environment config constant. |
| apps/web-app/app/environments/environment.production.ts | Adds production environment config constant. |
| apps/web-app/app/environments/index.ts | Adds an environments index file (currently empty). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…for improved usability, and refine environment configurations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 28 out of 33 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ports: | ||
| - "${REDIS_PORT}:6379" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis is published to the host via ports. Exposing Redis in production can allow unauthorized access if network controls are misconfigured; prefer keeping it internal (no ports) or binding to 127.0.0.1 at minimum.
| ports: | |
| - "${REDIS_PORT}:6379" |
| stop) | ||
| log_info "Arrêt des services..." | ||
| docker_compose down | ||
| log_success "Services arrêtés!" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stop doesn’t call check_env, but docker_compose always includes --env-file "$ENV_FILE". If .env.prod is missing, ./scripts/docker-prod.sh stop will fail (even though stopping running containers is a reasonable operation). Either call check_env here as well, or make docker_compose handle the missing env file for commands like down/ps/logs.
| export const environment: WebAppEnvironment = { | ||
| environment: Environment.PRODUCTION, | ||
| hostUrl: 'http://localhost:4200', | ||
| apiUrl: 'http://localhost:3000/api/v1', | ||
| }; No newline at end of file |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
environment.production.ts currently hard-codes hostUrl/apiUrl to localhost, which is unlikely to be correct for a real production deployment. Consider wiring these to deployment-time config (e.g., process.env.NEXT_PUBLIC_*) or at least setting production defaults that aren’t localhost.
| Exemples: | ||
| ./docker-prod.sh start | ||
| ./docker-prod.sh logs-db | ||
| ./docker-prod.sh build | ||
| ./docker-prod.sh debug |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples in the help output use ./docker-prod.sh ..., but the script is located at scripts/docker-prod.sh. Adjust the examples to the correct path to avoid confusion.
| ENV_FILE="${2:-.env.development}" | ||
| COMPOSE_FILE="docker-compose.local.yaml" | ||
|
|
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script always passes --env-file "$ENV_FILE" but the repo doesn’t include a .env.development file (only .env.example). Running ./scripts/docker-dev.sh start will fail immediately because Docker Compose errors on a missing env file. Consider adding an env-file existence check (and pointing users to the correct example file to copy) before executing compose commands.
| volumes: | ||
| - ${POSTGRES_VOLUME}:/var/lib/postgresql/data | ||
| ports: | ||
| - "${POSTGRES_PORT}:5432" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In docker-compose.prod.yaml, PostgreSQL is published to the host via ports. Exposing the DB port in production is a security risk unless it’s strictly required. Prefer removing the port mapping (internal network only), or bind to 127.0.0.1 if only local access is needed.
| - "${POSTGRES_PORT}:5432" | |
| - "127.0.0.1:${POSTGRES_PORT}:5432" |
| Usage: ./docker-prod.sh [COMMAND] | ||
|
|
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help text says Usage: ./docker-prod.sh [COMMAND], but the script lives under scripts/ (invoked as ./scripts/docker-prod.sh ...). Update the usage/examples so users can copy/paste working commands.
| logs-db) | ||
| log_info "Affichage des logs de PostgreSQL..." | ||
| docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" logs -f postgres | ||
| ;; | ||
|
|
||
| logs-redis) | ||
| log_info "Affichage des logs de Redis..." | ||
| docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" logs -f redis | ||
| ;; |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logs-db and logs-redis are using service names postgres/redis, but in docker-compose.local.yaml the services are named fizzup_postgres and fizzup_redis. As-is, these commands will fail with “no such service”. Update the service names (or centralize them in variables) to match the compose file.
| check_env() { | ||
| if [ ! -f "$ENV_FILE" ]; then | ||
| log_error "Le fichier $ENV_FILE n'existe pas!" | ||
| log_info "Copiez .env.prod.example en $ENV_FILE et configurez vos variables" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error guidance references .env.prod.example, but there is no such file in the repo. This will block users from successfully creating .env.prod. Update the message (and/or add the referenced example file) to match what actually exists (e.g., .env.example or a real .env.prod.example).
| log_info "Copiez .env.prod.example en $ENV_FILE et configurez vos variables" | |
| log_info "Copiez .env.example en $ENV_FILE et configurez vos variables" |
| <Link href="/about" className="text-gray-600 hover:text-blue-600 transition-colors"> | ||
| À propos | ||
| </Link> | ||
| <Link href="/features" className="text-gray-600 hover:text-blue-600 transition-colors"> | ||
| Fonctionnalités | ||
| </Link> | ||
| <Link href="/contact" className="text-gray-600 hover:text-blue-600 transition-colors"> | ||
| Contact | ||
| </Link> |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These navigation links point to /about, /features, and /contact, but there are no corresponding routes under apps/web-app/app/ in this PR. This will produce 404s. Either add the pages (e.g., app/about/page.tsx, etc.) or change these links to existing sections/routes.
feat: add GitHub Actions workflow for deploying to staging VPS
feat: add GitHub Actions workflow for deploying to staging VPS
…ns, and enhance Docker scripts