Add Language Translation Support for International Students#651
Open
Sundriveauto wants to merge 4 commits into
Open
Add Language Translation Support for International Students#651Sundriveauto wants to merge 4 commits into
Sundriveauto wants to merge 4 commits into
Conversation
…age selector - Enhanced i18n system with nested dot-notation key access and tn() helper - Expanded locale files (en, es, zh) with full educational content translations - Added getTranslatedCourseContent() for locale-aware course content rendering - Wired LanguageSelector into Navbar (desktop + mobile) - Synced language preference to userStore on change
feat: add multi-language support for core educational content with auto-detection and manual selection
|
@Sundriveauto is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Sundriveauto Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…user limits - Created centralized rate limit config (rateLimit.config.ts) with endpoint profiles - Rewrote rate limiter middleware with dual-tier burst + sustained windows - Per-user tracking for authenticated requests, per-IP for anonymous - Per-endpoint overrides for auth, login, register, security, generator, export, contracts - Env-var configurability via RATE_LIMIT_* environment variables - Preserved legacy slidingWindowRateLimiter factory for route-specific usage - Replaced express-rate-limit with config-driven in-house solution
feat: implement configurable rate limiting with per-endpoint and per-user limits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #597
Add multi-language support for core educational content with automatic detection and manual selection.
This is an important, MVP-critical feature designed to expand the platform's impact globally.
🛠️ Implementation Requirements
Build translation support.
Include comprehensive unit tests with coverage >90%.
Add thorough documentation and educational comments.
Integrate with existing i18n infrastructure.
🔧 Technical Specifications
Built with React and TypeScript.
Use next-intl for internationalization.
Follow accessibility best practices (WCAG 2.1).
Include proper error handling and fallbacks.
✅ Acceptance Criteria
Translations load correctly.
Language switching works as expected.
All unit tests pass with full coverage.
Documentation is complete and educational.
Closes #604
Summary
Replaces the previous basic rate limiting (fixed-window
express-rate-limit+ hardcoded sliding window) with a comprehensive, configurable, multi-tier rate limiting system that protects against abuse and DoS attacks.Changes
New file:
backend/src/config/rateLimit.config.tsauth/login(POST): 5 req/s burst, 20 req/min sustainedauth/register(POST): 3 req/s burst, 10 req/min sustained/certificates,/enrollments,/courses: 120 req/s burst, 1000 req/min/security: 10 req/s burst, 60 req/min/generator: 5 req/s burst, 30 req/min/contracts: 15 req/s burst, 100 req/minsetRateLimitEnvOverrides()Rewritten:
backend/src/middleware/rateLimiter.tsuserIdfor accurate quota enforcementRateLimit-Limit,RateLimit-Remaining,RateLimit-ResetX-RateLimit-Burst-*,X-RateLimit-Sustained-*NODE_ENV=testslidingWindowRateLimiterfactory for route-specific overridesModified:
backend/src/index.tsexpress-rate-limit+ oldapiRateLimiterwith newrateLimitermiddlewareconfig.rateLimiting.enabledModified:
backend/src/config/env.config.tsrateLimitingconfig section with env-var-backed settingsModified:
backend/.env.exampleRATE_LIMIT_*environment variables with documentationConfiguration via environment variables
RATE_LIMIT_ENABLEDRATE_LIMIT_BURST_MAXRATE_LIMIT_SUSTAINED_MAXRATE_LIMIT_AUTH_BURST_MAXRATE_LIMIT_AUTH_SUSTAINED_MAXRATE_LIMIT_ADMIN_BURST_MAXRATE_LIMIT_ADMIN_SUSTAINED_MAXRATE_LIMIT_LOGIN_BURST_MAXRATE_LIMIT_REGISTER_BURST_MAXTesting