Skip to content

Commit fd1334e

Browse files
Merge pull request #214 from A6dulmalik/feat/lazy-loading-module-refactoring
feat(lazy-loading): implement feature flag-based conditional module l…
2 parents b77e6ba + fd6cff6 commit fd1334e

File tree

9 files changed

+1014
-101
lines changed

9 files changed

+1014
-101
lines changed

.env.example

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,45 @@ EMAIL_FROM_NAME=TeachLink
2626

2727
# Application URL (for tracking links)
2828
APP_URL=http://localhost:3000
29+
30+
# =============================================================================
31+
# Feature Flags - Module Loading Configuration
32+
# =============================================================================
33+
# Set to 'false' to disable loading of specific modules at startup
34+
# This reduces memory footprint and improves startup time
35+
# =============================================================================
36+
37+
# Core Features (recommended to keep enabled)
38+
ENABLE_AUTH=true
39+
ENABLE_SESSION_MANAGEMENT=true
40+
41+
# Optional Feature Modules
42+
ENABLE_PAYMENTS=true
43+
ENABLE_AB_TESTING=false
44+
ENABLE_DATA_WAREHOUSE=false
45+
ENABLE_COLLABORATION=true
46+
ENABLE_MEDIA_PROCESSING=true
47+
ENABLE_BACKUP=true
48+
ENABLE_GRAPHQL=false
49+
ENABLE_SYNC=true
50+
ENABLE_MIGRATIONS=true
51+
ENABLE_RATE_LIMITING=true
52+
ENABLE_OBSERVABILITY=true
53+
ENABLE_CACHING=true
54+
ENABLE_FEATURE_FLAGS=true
55+
ENABLE_SEARCH=true
56+
ENABLE_NOTIFICATIONS=true
57+
ENABLE_EMAIL_MARKETING=true
58+
ENABLE_GAMIFICATION=true
59+
ENABLE_ASSESSMENT=true
60+
ENABLE_LEARNING_PATHS=true
61+
ENABLE_MODERATION=true
62+
ENABLE_ORCHESTRATION=true
63+
ENABLE_SECURITY=true
64+
ENABLE_TENANCY=true
65+
ENABLE_CDN=true
66+
67+
# Performance Tuning
68+
# Set to 'true' to enable cluster mode (uses all CPU cores)
69+
CLUSTER_MODE=false
70+
CLUSTER_WORKERS=4

.husky/pre-commit

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
#!/usr/bin/env sh
2-
# .husky/pre-commit
3-
#
4-
# Runs automatically before every `git commit`.
5-
# Exits non-zero to abort the commit if any check fails.
6-
#
7-
# What runs:
8-
# lint-staged — Prettier (format) + ESLint (lint) on staged files only.
9-
#
10-
# To skip this hook in an emergency (NOT recommended for normal flow):
11-
# git commit --no-verify -m "your message"
12-
#
13-
# To re-install hooks after a fresh `npm ci`:
14-
# npm run prepare
15-
16-
. "$(dirname -- "$0")/_/husky.sh"
17-
181
echo "⚡ Running pre-commit checks via lint-staged..."
192

203
npx lint-staged --config lint-staged.config.js

0 commit comments

Comments
 (0)