A robust, multilingual video conferencing application with France Travail OAuth 2.0 integration, comprehensive security features, and production-ready architecture.
- France Travail OAuth 2.0 + PKCE integration
- Automatic token refresh for seamless sessions
- Secure session management with Redis support
- State validation and CSRF protection
- 4 Languages: French, English, Spanish, Chinese
- Dynamic language switching with persistent preferences
- i18next integration for comprehensive internationalization
- Automatic language detection based on browser settings
- Rate limiting (100 requests/15 minutes)
- Request validation and sanitization
- Error handling with centralized middleware
- Security headers (XSS, CSRF, Content-Type protection)
- Sentry integration for error tracking
- Health check endpoints for system monitoring
- Comprehensive logging with Winston
- Performance metrics and error tracking
- Redis session store for scalability
- ZEGOCLOUD integration for high-quality video calls
- Real-time communication with WebRTC
- Meeting room management with secure token generation
- Participant controls (camera, microphone, screen sharing)
- Node.js β₯ 18.0.0
- npm β₯ 8.0.0
- Redis (optional, for production)
- France Travail Developer Account
- ZEGOCLOUD Account
# Clone the repository
git clone https://github.com/Kvnbbg/visio-conf.git
cd visio-conf
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Configure your environment variables (see Configuration section)
nano .env
# Start the development server
npm run devThe application will be available at http://localhost:3001
Create a .env file with the following configuration:
# Server Configuration
NODE_ENV=development
PORT=3001
SESSION_SECRET=your-super-secret-session-key
# ZEGOCLOUD Configuration
ZEGOCLOUD_APP_ID=your_zegocloud_app_id
ZEGOCLOUD_SERVER_SECRET=your_zegocloud_server_secret
# France Travail OAuth Configuration
FRANCETRAVAIL_CLIENT_ID=your_france_travail_client_id
FRANCETRAVAIL_CLIENT_SECRET=your_france_travail_client_secret
FRANCETRAVAIL_REDIRECT_URI=http://localhost:3001/auth/francetravail/callback
# Redis Configuration (optional)
REDIS_URL=redis://localhost:6379
# Monitoring (optional)
SENTRY_DSN=your_sentry_dsn
LOG_LEVEL=info- Visit francetravail.io
- Create a developer account
- Register your application
- Obtain
CLIENT_IDandCLIENT_SECRET - Configure redirect URI:
https://your-domain.com/auth/francetravail/callback
- Visit ZEGOCLOUD Console
- Create a new project
- Obtain
APP_IDandSERVER_SECRET - Enable video calling features
visio-conf/
βββ lib/ # Core modules
β βββ auth.js # OAuth 2.0 PKCE implementation
β βββ zegoToken.js # ZEGOCLOUD token management
β βββ middleware.js # Express security middleware
β βββ logger.js # Winston logging configuration
β βββ redis.js # Redis client management
β βββ franceTravailAuth.js # France Travail API integration
βββ public/
β βββ locales/ # Translation files
β βββ en/translation.json # English translations
β βββ fr/translation.json # French translations
β βββ es/translation.json # Spanish translations
β βββ zh/translation.json # Chinese translations
βββ src/ # React components (for build process)
β βββ components/
β β βββ LanguageSwitcher.js # Language selection component
β β βββ VideoConference.js # Video conferencing UI
β β βββ AuthButton.js # Authentication component
β β βββ HealthCheck.js # System status component
β βββ App.js # Main React application
β βββ index.js # React entry point
β βββ i18n.js # Internationalization setup
βββ tests/ # Comprehensive test suite
β βββ auth.test.js # Authentication tests
β βββ zegoToken.test.js # Token generation tests
β βββ middleware.test.js # Security middleware tests
β βββ server.test.js # API endpoint tests
β βββ integration.test.js # End-to-end tests
β βββ franceTravailAuth.test.js # France Travail API tests
β βββ logger.test.js # Logging tests
β βββ redis.test.js # Redis client tests
βββ server.js # Enhanced Express server
βββ index.html # Main HTML with React integration
βββ package.json # Dependencies and scripts
βββ vercel.json # Vercel deployment configuration
βββ README.md # This documentation
- Backend: Node.js, Express.js
- Frontend: React (CDN), Tailwind CSS
- Authentication: OAuth 2.0 + PKCE
- Video: ZEGOCLOUD WebRTC SDK
- Internationalization: i18next
- Session Store: Redis (with memory fallback)
- Logging: Winston
- Testing: Jest, Supertest
- Deployment: Vercel
- Monitoring: Sentry (optional)
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
# Run specific test file
npm test -- auth.test.jsThe application maintains 95.76% test coverage for core modules:
- 113 total tests across 8 test suites
- Unit tests: Authentication, token generation, middleware
- Integration tests: End-to-end workflows
- API tests: HTTP endpoints and error handling
-
Authentication Tests (
auth.test.js)- OAuth 2.0 PKCE flow validation
- JWT token decoding
- State parameter validation
-
Token Generation Tests (
zegoToken.test.js)- ZEGOCLOUD token creation
- Parameter validation
- Expiration handling
-
Middleware Tests (
middleware.test.js)- Security middleware validation
- Rate limiting
- Error handling
-
Integration Tests (
integration.test.js)- Complete authentication flows
- End-to-end scenarios
| Language | Code | Status | Coverage |
|---|---|---|---|
| French | fr |
β Complete | 100% |
| English | en |
β Complete | 100% |
| Spanish | es |
β Complete | 100% |
| Chinese | zh |
β Complete | 100% |
- Create translation file:
public/locales/{lang}/translation.json - Add language to
LanguageSwitchercomponent - Update i18n configuration in
src/i18n.js - Test language switching functionality
Key translation categories:
- Authentication: Login/logout messages
- Navigation: Menu items and buttons
- Errors: User-friendly error messages
- Video: Meeting controls and status
- General: Common UI elements
- OAuth 2.0 + PKCE for secure authorization
- State parameter validation to prevent CSRF
- Secure session management with httpOnly cookies
- Automatic token refresh to maintain sessions
- Rate limiting: 100 requests per 15 minutes per IP
- Input validation: Comprehensive request validation
- Security headers: XSS, CSRF, and content-type protection
- Error handling: Secure error responses without information leakage
- Session encryption with secure secrets
- Redis session store for production scalability
- Secure cookie configuration with SameSite protection
- Environment variable protection for sensitive data
Access system health at /api/health:
{
"status": "ok",
"timestamp": "2024-07-04T12:00:00.000Z",
"uptime": 3600,
"environment": "production",
"version": "2.0.0",
"services": {
"redis": "connected",
"franceTravail": "configured",
"zegocloud": "configured"
}
}Comprehensive logging with Winston:
- Error logs:
logs/error.log - Combined logs:
logs/combined.log - Console output: Development environment
- Structured JSON: Production logging
- Redis session store for horizontal scaling
- Static asset caching with appropriate headers
- Rate limiting to prevent abuse
- Efficient error handling with proper HTTP status codes
-
Connect Repository:
vercel --prod
-
Configure Environment Variables in Vercel dashboard:
ZEGOCLOUD_APP_IDZEGOCLOUD_SERVER_SECRETFRANCETRAVAIL_CLIENT_IDFRANCETRAVAIL_CLIENT_SECRETSESSION_SECRETREDIS_URL(optional, use Upstash)
-
Update Redirect URI:
https://your-app.vercel.app/auth/francetravail/callback
- Configure real France Travail credentials
- Set up Redis instance (Upstash recommended)
- Configure Sentry for error tracking
- Update CORS origins for production
- Set secure session secrets
- Enable HTTPS redirects
- Configure domain and SSL
NODE_ENV=development
REDIS_URL=redis://localhost:6379
DEBUG=trueNODE_ENV=production
REDIS_URL=rediss://username:password@host:port
LOG_LEVEL=warn
SENTRY_DSN=your_production_sentry_dsnInitiates France Travail OAuth flow
- Response: Redirects to France Travail authorization
Handles OAuth callback
- Parameters:
code,state - Response: Redirects to application with session
Check authentication status
- Response:
{ authenticated: boolean, user?: object }
Logout current user
- Response:
{ success: boolean }
Refresh access token
- Response:
{ success: boolean, accessToken?: string }
Generate ZEGOCLOUD token for meeting
- Body:
{ roomID: string, userID: string } - Response:
{ token: string, appID: string, roomID: string, userID: string } - Auth: Required
System health check
- Response: Health status object with service information
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
npm install - Run tests:
npm test - Start development server:
npm run dev
- ESLint: Follow JavaScript standard style
- Testing: Maintain >90% test coverage
- Documentation: Update README for new features
- Security: Follow OWASP guidelines
- Update tests for new functionality
- Run full test suite:
npm test - Update documentation as needed
- Create pull request with detailed description
- β Multilingual support (French, English, Spanish, Chinese)
- β Enhanced security with comprehensive middleware
- β Redis session store for production scalability
- β Automatic token refresh for seamless sessions
- β Comprehensive testing (113 tests, 95.76% coverage)
- β Production monitoring with health checks and logging
- β Enhanced error handling with Sentry integration
- β Basic France Travail OAuth integration
- β ZEGOCLOUD video conferencing
- β Express.js backend with session management
- β Basic React frontend
This project is licensed under the MIT License - see the LICENSE file for details.
- API Documentation: See API Reference section
- Deployment Guide: See Deployment section
- Testing Guide: See Testing section
- Issues: GitHub Issues
- Discussions: GitHub Discussions
For enterprise support and custom development, please contact the development team.
Built with β€οΈ by the Visio-Conf Team
Empowering secure, multilingual video communication for the modern workplace.