Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
fa77383
Add detailed README.md with project setup instructions and resources …
harryviennot Oct 17, 2025
5a3d3ad
Update package dependencies: added axios, next-themes, and sonner; up…
harryviennot Oct 17, 2025
3508793
Update package dependencies: added @tanstack/react-query version 5.90…
harryviennot Oct 17, 2025
b759f5f
Feature/init app (#1)
harryviennot Oct 17, 2025
40c7ae2
Implement authentication context and loading state; update layout and…
harryviennot Oct 17, 2025
f390940
Implement authentication layouts (#2)
harryviennot Oct 17, 2025
d9baafa
Add application icon to metadata in layout file
harryviennot Oct 17, 2025
e4ecc7f
Update UI styles and enhance layout structure; add Radix UI component…
harryviennot Oct 17, 2025
deb131d
Remove unused screenshot files and update layout title; enhance AppHe…
harryviennot Oct 17, 2025
96e20a2
Add ActiveCallPage component with mock data for emergency calls; upda…
harryviennot Oct 17, 2025
9c95cf4
Feature/app layout (#3)
harryviennot Oct 17, 2025
a6055c6
Refactor ProtectedLayout to include FloatingQueue and QueueProvider; …
harryviennot Oct 17, 2025
67ba825
Add react-resizable-panels dependency and implement resizable layout …
harryviennot Oct 17, 2025
0cf72b8
Implement resizable layout in ProtectedLayout with collapsible Floati…
harryviennot Oct 17, 2025
e791cbc
Feature/floating queue (#4)
harryviennot Oct 17, 2025
4ece1c8
Add call handling functionality to FloatingQueue and create QueuedCal…
harryviennot Oct 17, 2025
de73a57
Refactor queue (#5)
harryviennot Oct 17, 2025
a146384
Refactor authentication system to use user model; update login and lo…
harryviennot Oct 20, 2025
101b33e
Add framer-motion for animations; create new admin pages for Analytic…
harryviennot Oct 20, 2025
4be3c5d
Enhance user management features by adding user API functions, includ…
harryviennot Oct 20, 2025
0fc7fa2
Refactor icon imports for consistency across admin and design system …
harryviennot Oct 20, 2025
7dd235a
Add Prettier configuration and ignore files; update package.json scri…
harryviennot Oct 21, 2025
9a80940
Feature/auth api implementation (#6)
harryviennot Oct 21, 2025
d4ed194
Merge branch 'dev' into feature/ci
harryviennot Oct 21, 2025
9c4a4cd
Add Jest testing setup and configuration
harryviennot Oct 21, 2025
fe99f15
Add Docker support and CI/CD workflows
harryviennot Oct 21, 2025
04b29e6
Update integration workflow dependencies
harryviennot Oct 21, 2025
0e17959
Refactor integration workflow for improved dependency management
harryviennot Oct 21, 2025
63ec77a
Update Prettier configuration and dependencies
harryviennot Oct 21, 2025
23b5b34
Refactor layout and component files for improved readability and cons…
harryviennot Oct 21, 2025
0b48e89
Enhance project setup with Husky and lint-staged integration
harryviennot Oct 21, 2025
5a81630
Update Prettier configuration and refactor components for consistency
harryviennot Oct 21, 2025
3b6f8ce
Update pre-commit hook to run lint and format scripts
harryviennot Oct 21, 2025
1d93d26
fix prettier format issues
harryviennot Oct 21, 2025
aa8cd3a
Refactor integration workflow to improve security checks
harryviennot Oct 21, 2025
c74d9c3
remove tests from sonar
harryviennot Oct 21, 2025
484a9ee
Enhance integration workflow with code checkout step
harryviennot Oct 21, 2025
aaed26a
remove sonar comment
harryviennot Oct 21, 2025
a288429
Feature/ci (#7)
harryviennot Oct 23, 2025
c770ef0
Update Dockerfile and add Terraform configuration for Cloud Run deplo…
harryviennot Oct 26, 2025
e5be009
Add deployment scripts for production and staging environments
harryviennot Oct 26, 2025
2901904
Add GitHub Actions workflows for production and staging deployments
harryviennot Oct 26, 2025
609162d
Refactor ActiveCallPage layout for improved structure and readability
magneant Oct 26, 2025
9f039de
Add queue API service and types for queue management
magneant Oct 26, 2025
8fb8e8a
Add transcript API and active call context management
magneant Oct 26, 2025
cc789f2
Enhance ActiveCallPage with real-time transcript updates and WebSocke…
magneant Oct 26, 2025
d167d9d
Add handoff API and enhance ActiveCall context for call control
magneant Oct 26, 2025
81f6b2a
Implement AudioManager for WebSocket audio streaming and enhance Acti…
magneant Oct 26, 2025
79ddf43
Feature/deploy (#8)
harryviennot Oct 27, 2025
f4eb760
Refactor transcript message parsing in ActiveCallProvider
magneant Oct 27, 2025
545a2be
Enhance ActiveCallProvider with improved transcript message handling
magneant Oct 27, 2025
515a187
Enhance test coverage for ActiveCallPage and QueueAPI
magneant Oct 27, 2025
b334209
Configure SonarCube coverage reporting
magneant Oct 27, 2025
4941ca8
Improve test coverage to reach 80%+ on critical files
magneant Oct 27, 2025
95bfa5d
Update Jest configuration and add comprehensive tests for layout comp…
magneant Oct 27, 2025
2c8325e
Enable and fix WebSocket tests for queue-api to improve coverage
magneant Oct 27, 2025
e5de7dc
Enhance ActiveCallPage and QueueAPI with WebSocket connection management
magneant Oct 28, 2025
c8b134d
Enhance tests for ActiveCallPage and ActiveCallContext with QueueAPI …
magneant Oct 28, 2025
1d8d55e
Enhance ActiveCallPage with AI insights and WebSocket connection mana…
magneant Oct 29, 2025
766e476
Fix failing tests to pass CI/CD pipeline
magneant Oct 29, 2025
05e3a58
Améliore la couverture de tests pour atteindre 80%+ sur tous les fich…
magneant Oct 29, 2025
8a62d64
Enhance tests for ActiveCallContext and QueueAPI with WebSocket integ…
magneant Oct 29, 2025
ed002f5
Fix test failures - update priority expectations and add async handling
magneant Oct 29, 2025
44236a5
Dev calls (#9)
ClementLagasse Oct 29, 2025
75e1d7b
DEV -> Staging (#10)
harryviennot Oct 30, 2025
565b0a1
Implement hang-up functionality in ActiveCallPage and ActiveCallContext
magneant Nov 1, 2025
0f15279
Implement hang-up functionality in ActiveCallPage and ActiveCallConte…
ClementLagasse Nov 1, 2025
fb89350
Add tests for hang-up functionality in ActiveCallContext and AudioMan…
magneant Nov 1, 2025
12949a6
Add tests for hang-up functionality in ActiveCallContext and AudioMan…
ClementLagasse Nov 1, 2025
f43317a
dev -> staging (#12)
alexandrelagasse Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Testing
coverage
.nyc_output
*.lcov

# Next.js
.next
out
build

# Production
dist

# Misc
.DS_Store
*.pem

# Debug
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Local env files
.env
.env*.local
.env.development
.env.test
.env.production

# Vercel
.vercel

# TypeScript
*.tsbuildinfo

# IDE
.vscode
.idea
*.swp
*.swo
*~

# Git
.git
.gitignore
.gitattributes

# GitHub
.github

# Documentation
README.md
docs
*.md

# CI/CD
.github
.gitlab-ci.yml
.travis.yml
.circleci

# Testing
__tests__
__mocks__
*.test.ts
*.test.tsx
*.spec.ts
*.spec.tsx
jest.config.js
.swc

# Misc
.prettierrc*
.eslintrc*
.editorconfig
tsconfig.tsbuildinfo
197 changes: 197 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
name: Deploy to Production

# Trigger this workflow when:
# - Push to main/master branch (production)
# - Manual trigger via GitHub UI (with version input)
# - New release is published
on:
push:
branches:
- main
- master
release:
types: [published]
workflow_dispatch: # Allows manual trigger
inputs:
version:
description: "Version to deploy (e.g., v1.0.0)"
required: true
type: string

# Environment variables used across all jobs
env:
PROJECT_ID: samu-ai-474822
REGION: europe-west1
SERVICE_NAME: samu-frontend-production
REGISTRY_URL: europe-west1-docker.pkg.dev/samu-ai-474822/frontend-images
BACKEND_API_URL: https://samu-ai-triage-production-262427917999.europe-west1.run.app

jobs:
deploy-production:
name: Build and Deploy to Production
runs-on: ubuntu-latest

# Production deployments require approval
environment:
name: production
url: ${{ steps.service.outputs.url }}

# Permissions needed for GCP authentication
permissions:
contents: read
id-token: write

steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Authenticate to Google Cloud
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}

# Step 3: Set up Cloud SDK
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

# Step 4: Configure Docker to use gcloud as credential helper
- name: Configure Docker for Artifact Registry
run: |
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev

# Step 5: Determine version number
- name: Determine version
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
# Manual trigger with version input
VERSION="${{ github.event.inputs.version }}"
elif [ "${{ github.event_name }}" == "release" ]; then
# Release event
VERSION="${{ github.event.release.tag_name }}"
else
# Push to main/master - use timestamp-based version
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
VERSION="v0.0.0-${TIMESTAMP}-${SHORT_SHA}"
fi

# Validate version format (should start with 'v')
if [[ ! $VERSION =~ ^v ]]; then
VERSION="v${VERSION}"
fi

echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Deploying version: ${VERSION}"

# Step 6: Generate additional tags
- name: Generate image tags
id: tags
run: |
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
echo "timestamp=${TIMESTAMP}" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT

# Step 7: Build Docker image
- name: Build Docker image
run: |
docker build \
--platform linux/amd64 \
--build-arg NEXT_PUBLIC_API_URL="${{ env.BACKEND_API_URL }}" \
-t ${{ env.REGISTRY_URL }}/frontend:${{ steps.version.outputs.version }} \
-t ${{ env.REGISTRY_URL }}/frontend:production-latest \
-t ${{ env.REGISTRY_URL }}/frontend:production-${{ steps.tags.outputs.timestamp }} \
.

# Step 8: Push images to Artifact Registry
- name: Push images to Artifact Registry
run: |
docker push ${{ env.REGISTRY_URL }}/frontend:${{ steps.version.outputs.version }}
docker push ${{ env.REGISTRY_URL }}/frontend:production-latest
docker push ${{ env.REGISTRY_URL }}/frontend:production-${{ steps.tags.outputs.timestamp }}

# Step 9: Deploy to Cloud Run
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ env.SERVICE_NAME }} \
--image=${{ env.REGISTRY_URL }}/frontend:${{ steps.version.outputs.version }} \
--region=${{ env.REGION }} \
--platform=managed \
--allow-unauthenticated \
--quiet

# Step 10: Get service URL
- name: Get service URL
id: service
run: |
SERVICE_URL=$(gcloud run services describe ${{ env.SERVICE_NAME }} \
--region=${{ env.REGION }} \
--format='value(status.url)')
echo "url=${SERVICE_URL}" >> $GITHUB_OUTPUT

# Step 11: Create GitHub Release (if not already a release event)
- name: Create GitHub Release
if: github.event_name != 'release' && startsWith(steps.version.outputs.version, 'v')
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: '${{ steps.version.outputs.version }}',
name: 'Release ${{ steps.version.outputs.version }}',
body: `## 🚀 Production Deployment\n\n**Service URL:** ${{ steps.service.outputs.url }}\n**Commit:** ${{ steps.tags.outputs.short_sha }}\n\nDeployed via GitHub Actions`,
draft: false,
prerelease: false
});
} catch (error) {
console.log('Release already exists or error creating release:', error.message);
}

# Step 12: Output deployment summary
- name: Deployment Summary
run: |
echo "## 🎉 Production Deployment Successful" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Environment | **Production** 🔴 |" >> $GITHUB_STEP_SUMMARY
echo "| Service | \`${{ env.SERVICE_NAME }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Version | **${{ steps.version.outputs.version }}** |" >> $GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ steps.tags.outputs.short_sha }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Service URL | ${{ steps.service.outputs.url }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Image Tags Created:" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
echo "- \`production-latest\`" >> $GITHUB_STEP_SUMMARY
echo "- \`production-${{ steps.tags.outputs.timestamp }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Test the deployment:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "curl ${{ steps.service.outputs.url }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

# Step 13: Notify on Slack (optional - add webhook URL to secrets)
- name: Notify Slack
if: success() && vars.SLACK_WEBHOOK_URL != ''
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "🎉 Production Deployment Successful",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Production Deployment*\n\n*Version:* ${{ steps.version.outputs.version }}\n*Service:* ${{ env.SERVICE_NAME }}\n*URL:* ${{ steps.service.outputs.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Loading
Loading