Background
The monorepo mixes three different build systems (Next.js 14, Docusaurus, Fastify) with incompatible or conflicting configurations. Recent build failures in apps/dashboard and deprecation warnings in apps/docs suggest version mismatches, incompatible TypeScript settings, or misconfigured transpilation.
Problem
- Docusaurus v3 deprecation warnings: The
apps/docs build logs show deprecated config options that will break in v4
- Next.js transpilation: The dashboard may not properly transpile monorepo packages
- Fastify TypeScript setup:
apps/access-api may lack proper TypeScript and ESM support
- Version inconsistency: Each app may have different Node/TypeScript/pnpm version requirements, not documented
Expected Outcome
- All app build systems are compatible with the monorepo structure
- Deprecation warnings are addressed proactively
- Clear version requirements documented (Node, TypeScript, pnpm)
- CI/CD ensures compatibility across major version changes
- Apps build deterministically and reproducibly
Suggested Implementation
-
Audit versions in each app's package.json:
apps/docs: Docusaurus version, React version
apps/dashboard: Next.js version, React version
apps/access-api: Fastify version, Node.js version
apps/discord-bot: Discord.js version
Create a spreadsheet or VERSIONS.md documenting them.
-
Fix Docusaurus deprecation in apps/docs:
- Update
docusaurus.config.js to migrate siteConfig.onBrokenMarkdownLinks to siteConfig.markdown.hooks.onBrokenMarkdownLinks:
// apps/docs/docusaurus.config.js
const config = {
// ...
markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
};
- Remove the deprecated
onBrokenMarkdownLinks option from the root level
-
Update Next.js configuration in apps/dashboard:
- Ensure
next.config.js transpiles monorepo packages:
const nextConfig = {
transpilePackages: ['@guildpass/env', '@guildpass/integration-client'],
};
- Set
typescript.tsconfigPath if needed
-
Configure Fastify TypeScript in apps/access-api:
- Ensure
tsconfig.json targets Node.js version
- Configure ESM or CommonJS consistently
- Document in
apps/access-api/README.md
-
Create VERSIONS.md in the workspace root:
# Dependency Versions
## Node.js
- Minimum: 18.x
- Recommended: 20.x
## pnpm
- Minimum: 8.x
- Recommended: 9.x
## TypeScript
- Version: ^5.3
## App-Specific
- Next.js (`apps/dashboard`): 14.x
- Docusaurus (`apps/docs`): 3.x
- Fastify (`apps/access-api`): 4.x
- Discord.js (`apps/discord-bot`): 14.x
## Update Policy
Major version updates require approval from the core team.
-
Add GitHub Actions matrix for testing across Node versions:
strategy:
matrix:
node-version: [18.x, 20.x]
-
Document in README.md:
## Prerequisites
- Node.js 18+ (see VERSIONS.md)
- pnpm 8+ (see VERSIONS.md)
Acceptance Criteria
Affected Files/Directories
apps/docs/docusaurus.config.js
apps/dashboard/next.config.js
apps/dashboard/tsconfig.json
apps/access-api/tsconfig.json
apps/access-api/README.md
VERSIONS.md (create)
.github/workflows/ci.yml (update with matrix)
README.md (update)
Background
The monorepo mixes three different build systems (Next.js 14, Docusaurus, Fastify) with incompatible or conflicting configurations. Recent build failures in
apps/dashboardand deprecation warnings inapps/docssuggest version mismatches, incompatible TypeScript settings, or misconfigured transpilation.Problem
apps/docsbuild logs show deprecated config options that will break in v4apps/access-apimay lack proper TypeScript and ESM supportExpected Outcome
Suggested Implementation
Audit versions in each app's
package.json:apps/docs: Docusaurus version, React versionapps/dashboard: Next.js version, React versionapps/access-api: Fastify version, Node.js versionapps/discord-bot: Discord.js versionCreate a spreadsheet or
VERSIONS.mddocumenting them.Fix Docusaurus deprecation in
apps/docs:docusaurus.config.jsto migratesiteConfig.onBrokenMarkdownLinkstositeConfig.markdown.hooks.onBrokenMarkdownLinks:onBrokenMarkdownLinksoption from the root levelUpdate Next.js configuration in
apps/dashboard:next.config.jstranspiles monorepo packages:typescript.tsconfigPathif neededConfigure Fastify TypeScript in
apps/access-api:tsconfig.jsontargets Node.js versionapps/access-api/README.mdCreate
VERSIONS.mdin the workspace root:Add GitHub Actions matrix for testing across Node versions:
Document in README.md:
Acceptance Criteria
apps/docsDocusaurus config updated to v3 standard (no warnings)apps/dashboardNext.js build succeeds with proper transpilationapps/access-apiFastify setup is documented and builds cleanlyVERSIONS.mddocuments all major dependencies and Node/pnpm versionsREADME.mdlinks toVERSIONS.mdfor setup requirementsAffected Files/Directories
apps/docs/docusaurus.config.jsapps/dashboard/next.config.jsapps/dashboard/tsconfig.jsonapps/access-api/tsconfig.jsonapps/access-api/README.mdVERSIONS.md(create).github/workflows/ci.yml(update with matrix)README.md(update)