Skip to content

refactor(branding,docs): configure static export, relocate brand folder to public/brand and update bootstrap setup checklist - #12

Merged
Zahnentferner merged 8 commits into
AOSSIE-Org:mainfrom
reach2saksham:refactor/structure
Aug 7, 2026
Merged

refactor(branding,docs): configure static export, relocate brand folder to public/brand and update bootstrap setup checklist#12
Zahnentferner merged 8 commits into
AOSSIE-Org:mainfrom
reach2saksham:refactor/structure

Conversation

@reach2saksham

@reach2saksham reach2saksham commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

This PR reorganizes the repository branding assets into public/brand/ to align with Next.js static asset conventions, updates all documentation and component paths, resolves code quality/accessibility audit items, and expands the Initial Project Setup Checklist in README.md to cover all TODO placeholders.


Changes Introduced

1. Branding Asset Relocation & Path Updates

  • Moved Branding Assets: Relocated brand/ into public/brand/ and merged vector/favicon icons into public/brand/icons/.
  • Documentation References: Updated paths in README.md, AGENTS.md, public/brand/Brand.md, public/llms.txt, and .coderabbit.yml.
  • Code Assets: Updated logo and favicon URLs in layout.tsx, page.tsx, src/i18n/metadata.ts, and public/.well-known/ai-plugin.json.

2. Architecture & Code Quality Enhancements

  • Import Alias Cleanup: Converted relative imports (../../) to @/* path aliases (@/i18n/*, @/components/*) across layout.tsx, not-found.tsx, page.tsx, LanguageSwitcher.tsx, and ThemeToggle.tsx.
  • Devanagari Font Support: Loaded Noto_Sans_Devanagari in layout.tsx and mapped --font-devanagari in globals.css for proper Hindi rendering.
  • Dynamic Layout Metadata: Replaced static metadata export in layout.tsx with dynamic generateMetadata delegating to generateLocaleMetadata(locale, 'Home').
  • Semantic Theme Tokens: Replaced hardcoded tailwind colors in ThemeToggle.tsx with semantic theme tokens (text-icon-sun, text-icon-moon, text-icon-system).
  • Button Type Accessibility: Added explicit type="button" to buttons in error.tsx and ThemeToggle.tsx.

3. Documentation & Bootstrap Checklist Updates

  • App Router Rendering Model: Corrected README.md to state that React Server Components are used by default, introducing Client Components only where required.
  • Default Locale Routing: Updated README.md to document localePrefix: 'as-needed' (/ for default English, /hi for Hindi).
  • Comprehensive TODO Checklist: Expanded Initial Project Setup Checklist in README.md to cover all TODO placeholders (AGENTS.md, llms.txt, robots.txt, assetlinks.json, ai-plugin.json, page.tsx JSON-LD, Contributors.md).

4. Pure Client-Side Static Export & GitHub Pages Hosting

  • Static Export Configuration (next.config.ts):

    • Configured output: 'export' and images: { unoptimized: true } to output static HTML/CSS/JS bundles into ./out for GitHub Pages.
    • Resolved Turbopack dev/build module resolution for "next-intl/config" on Windows environments by using relative POSIX path aliases.
  • Root Routing & Middleware Cleanup:

    • Created src/app/page.tsx with a server redirect to default locale (/en), ensuring an out/index.html is generated for static web servers.
    • Removed src/proxy.ts (edge middleware), as Next.js static exports strictly require client-side/static routing without server middleware.
  • Localized SSG & Static Rendering ([locale]):

    • Added generateStaticParams() and setRequestLocale(locale) in src/app/[locale]/layout.tsx to pre-render static paths for all supported locales (/en, /hi).
    • Removed duplicate generateStaticParams export from page.tsx to prevent segment parameter warnings during dev server rendering.
  • DX, Metadata & Asset Fixes:

    • JSON-LD Script Tag: Replaced Next.js <Script> with standard HTML <script type="application/ld+json"> in src/app/[locale]/page.tsx to eliminate React 19 client rendering warnings.
    • Favicon 404 Resolution: Placed favicon.ico in public/favicon.ico and added icons: { icon: '/brand/icons/favicon.ico' } in src/i18n/metadata.ts.
    • Static Sitemap: Configured export const dynamic = 'force-static' in src/app/sitemap.ts.
    • Documentation: Updated README.md build guide to detail GitHub Pages ./out static export and updated AGENTS.md with static export rules.

Verification Checklist

  • npm run build completed successfully without any compilation errors.
  • npm run lint completed with 0 errors or warnings.
  • All file links and image asset paths resolve correctly.

Additional Notes:

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added locale-aware metadata, translated SEO content, and default-language routing.
    • Added Devanagari font support and theme-specific icon colors.
    • Enabled static site export and improved branding asset support.
  • Bug Fixes

    • Improved button behavior and corrected branding links in metadata and page content.
  • Documentation

    • Updated branding, setup, architecture, localization, and project metadata documentation.
    • Added brand guidelines and maintainer information.
  • Chores

    • Added a Node.js 20.9.0 minimum requirement.
    • Strengthened CI permissions and pinned build actions.
    • Updated project and platform configuration placeholders.

…date bootstrap setup checklist

- Move brand guidelines and assets to public/brand and public/brand/icons
- Update asset paths across documentation, metadata, AI configs, and components
- Refactor relative imports to use @/* path aliases across app routes
- Add Devanagari font fallback and locale-aware layout metadata
- Update README setup checklist to cover all TODO repository placeholders
@reach2saksham reach2saksham self-assigned this Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The pull request converts project-specific content to placeholders, updates branding paths, hardens CI configuration, adds a Node.js version requirement, enables static export, and improves localized metadata, Devanagari font support, theme colors, and navigation imports.

Changes

Template foundation and application updates

Layer / File(s) Summary
Repository foundation and project setup
.coderabbit.yml, .github/workflows/ci.yml, package.json, AGENTS.md, MAINTAINERS.md, COPYRIGHT.md, next.config.ts
CI permissions and action references were updated. Node.js >=20.9.0 is required. Repository guidance, maintainers, copyright data, asset review paths, and Next.js build settings were updated.
Public metadata and branding paths
public/.well-known/*, public/brand/Brand.md, public/llms.txt, public/robots.txt, README.md, src/i18n/metadata.ts
Project placeholders, branding paths, routing documentation, setup guidance, public metadata, sitemap references, and brand documentation were updated.
Localized layout and static rendering
src/app/[locale]/layout.tsx, src/app/[locale]/page.tsx, src/app/page.tsx, src/app/sitemap.ts, src/i18n/routing.ts
The locale layout now generates metadata and static locale parameters. The page uses server-side translations and Devanagari fonts. The root page redirects to the default language. The sitemap uses static generation. Locale prefixes are always included.
Theme controls and navigation wiring
src/app/[locale]/globals.css, src/components/*, src/app/[locale]/error.tsx, src/app/[locale]/not-found.tsx
Theme icon colors now use shared variables. Buttons declare their type. Imports now use path aliases.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: Typescript Lang

Suggested reviewers: zahnentferner

Poem

A rabbit checks the brand-new trail,
Locale pages load without fail.
Fonts and themes now share one hue,
CI pins each action true.
Public paths mark the way.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: static export configuration, branding asset relocation, and bootstrap setup checklist updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@reach2saksham reach2saksham added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 31, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 9: Update the TODO heading in AGENTS.md to use the hyphenated phrase
“project-specific context,” preserving the rest of the wording unchanged.

In `@COPYRIGHT.md`:
- Line 1: Add a top-level Markdown heading before the copyright notice in
COPYRIGHT.md, such as “Copyright”, so the document begins with an H1 while
preserving the existing notice unchanged.

In `@public/.well-known/ai-plugin.json`:
- Line 16: Update the contact_email value in ai-plugin.json to use the project’s
TODO placeholder or remove the field until project contact details are
configured, matching the other identity placeholders and avoiding the exposed
real address.

In `@public/brand/Brand.md`:
- Around line 28-31: Add a blank line after the “### 2. Favicons & Icons”
heading in Brand.md, before the first bullet list item, to satisfy markdownlint
MD022.

In `@README.md`:
- Line 100: Update the “Dual Theme System” description in README.md to hyphenate
the compound adjective as “system-preferred themes,” leaving the rest of the
wording unchanged.
- Line 351: Update the Search Crawler Rules checklist text in README.md to use
the exact robots.txt placeholder format “TODO 'project.aossie.org'”, keeping the
documented value consistent with public/robots.txt.
- Around line 88-89: Update the React Server Components checklist item in
README.md to match src/app/[locale]/page.tsx: either remove the page’s "use
client" directive and move the localized page and JSON-LD generation into a
Server Component while retaining only LanguageSwitcher and ThemeToggle as Client
Components, or uncheck/remove the inaccurate checklist claim.
- Around line 343-361: Add a blank line after each subsection heading in the
README content, including “Project Identity & Header Details,” “Domain Names &
Search Engine Crawlers,” “Branding Guidelines & Assets,” “SEO & i18n
Localization Metadata,” and “Mobile & AI Platform Configurations,” before their
following bullet lists to satisfy MD022.

In `@src/app/`[locale]/layout.tsx:
- Around line 22-29: Update generateMetadata to validate locale against
routing.locales before calling generateLocaleMetadata, using the existing typed
includes check; call notFound() for unsupported locales, and preserve the
current metadata generation for supported locales.

In `@src/app/`[locale]/page.tsx:
- Around line 22-23: Update the JSON-LD metadata entries in the page to use the
existing "heading" and "metaDescription" translation keys, matching the keys
used by the page and src/i18n/metadata.ts; preserve any TODO marker in the
translated values rather than adding it to the key names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f3539f8f-e4d2-445c-962c-6163f7106575

📥 Commits

Reviewing files that changed from the base of the PR and between 40faba9 and 3c25445.

⛔ Files ignored due to path filters (12)
  • brand/logo.svg is excluded by !**/*.svg
  • public/assets/icons/aossie_logo.svg is excluded by !**/*.svg
  • public/assets/icons/favicon.ico is excluded by !**/*.ico
  • public/brand/icons/aossie_logo.svg is excluded by !**/*.svg
  • public/brand/icons/favicon.ico is excluded by !**/*.ico
  • public/brand/icons/stability_nexus_logo.svg is excluded by !**/*.svg
  • public/file.svg is excluded by !**/*.svg
  • public/globe.svg is excluded by !**/*.svg
  • public/next.svg is excluded by !**/*.svg
  • public/stability.svg is excluded by !**/*.svg
  • public/vercel.svg is excluded by !**/*.svg
  • public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (20)
  • .coderabbit.yml
  • .github/workflows/ci.yml
  • AGENTS.md
  • COPYRIGHT.md
  • Contributors.md
  • README.md
  • package.json
  • public/.well-known/ai-plugin.json
  • public/.well-known/assetlinks.json
  • public/brand/Brand.md
  • public/llms.txt
  • public/robots.txt
  • src/app/[locale]/error.tsx
  • src/app/[locale]/globals.css
  • src/app/[locale]/layout.tsx
  • src/app/[locale]/not-found.tsx
  • src/app/[locale]/page.tsx
  • src/components/LanguageSwitcher.tsx
  • src/components/ThemeToggle.tsx
  • src/i18n/metadata.ts

Comment thread AGENTS.md Outdated
Comment thread COPYRIGHT.md
Comment thread public/.well-known/ai-plugin.json
Comment thread public/brand/Brand.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread src/app/[locale]/layout.tsx
Comment thread src/app/[locale]/page.tsx Outdated
@reach2saksham

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@COPYRIGHT.md`:
- Around line 1-2: Insert a blank line between the “# Copyright” heading and the
copyright notice in COPYRIGHT.md so the document satisfies markdownlint MD022.

In `@README.md`:
- Line 345: Update the branding documentation references: in README.md at lines
345-345, replace public/todo-project-logo.svg with the current header asset
under public/brand/icons/; in public/brand/Brand.md at lines 24-24 and 31-31,
change the relative links to icons/todo_project_logo.svg and
icons/todo_project_favicon.ico respectively; and at lines 60-61, update both
relative links to use the icons/... paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 934511c6-bdd6-414d-8542-a2984de469b9

📥 Commits

Reviewing files that changed from the base of the PR and between 3c25445 and e602cd1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • AGENTS.md
  • COPYRIGHT.md
  • README.md
  • public/brand/Brand.md
  • src/app/[locale]/layout.tsx
  • src/app/[locale]/page.tsx

Comment thread COPYRIGHT.md
Comment thread README.md Outdated
@reach2saksham reach2saksham changed the title refactor(branding,docs): relocate brand folder to public/brand and update bootstrap setup checklist refactor(branding,docs): configure static export, relocate brand folder to public/brand and update bootstrap setup checklist Aug 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/app/[locale]/page.tsx (1)

36-40: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Escape JSON-LD before inserting it into the HTML.

JSON.stringify(jsonLd) does not escape <. If a translation or future metadata value contains </script>, the HTML parser can close the script element before the JSON-LD ends. Escape < before assigning dangerouslySetInnerHTML.

Proposed fix
-        dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
+        dangerouslySetInnerHTML={{
+          __html: JSON.stringify(jsonLd).replace(/</g, "\\u003c"),
+        }}

As per path instructions, review for common security vulnerabilities such as XSS.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`[locale]/page.tsx around lines 36 - 40, Escape the serialized
JSON-LD before assigning it to dangerouslySetInnerHTML in the schema-jsonld
script, ensuring every “<” character is encoded so embedded metadata cannot
terminate the script element early. Keep the existing JSON.stringify(jsonLd)
serialization and script structure unchanged.

Source: Path instructions

public/brand/Brand.md (1)

31-32: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the relative links in the brand guide.

public/brand/Brand.md is already inside public/brand/. Therefore, brand/icons/... resolves to public/brand/brand/icons/..., and src/app/... resolves to public/brand/src/app/.... Use icons/... for branding assets and ../../src/app/[locale]/globals.css for the source link.

As per path instructions, public/brand/** must use the official branding logo, favicon, and style specifications from public/brand/.

Also applies to: 40-40, 60-61

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@public/brand/Brand.md` around lines 31 - 32, Update the relative links in
Brand.md and the referenced lines so branding assets use icons/... paths, and
the source stylesheet link uses ../../src/app/[locale]/globals.css. Keep all
links rooted relative to public/brand/ and continue using the official branding
assets and specifications from that directory.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@MAINTAINERS.md`:
- Line 23: Update MAINTAINERS.md so the file ends with exactly one trailing
newline character, without changing its existing content.

In `@next.config.ts`:
- Around line 5-8: Update the Next.js build configuration so the existing
webpack setup is explicitly selected for production builds by changing the build
script to run next build --webpack, or migrate the alias configuration to
Turbopack and remove the webpack configuration. Ensure next build no longer
relies on the incompatible default bundler selection in Next.js 16.

In `@public/.well-known/ai-plugin.json`:
- Around line 12-17: Replace the invalid https://TODO:project.aossie.org
placeholder with https://example.invalid for the OpenAPI, logo, and legal URLs
in public/.well-known/ai-plugin.json (lines 12-17), and for the sitemap URL in
public/robots.txt (line 8); otherwise configure a real domain consistently
before publishing.

In `@README.md`:
- Around line 323-326: Add a blank line between the explanatory sentence under
“Building for Production (Static Export)” and the opening bash code fence to
satisfy markdownlint MD031.
- Line 146: Update the README directory entry for sitemap.ts to describe it as
“Statically generated localized sitemaps” instead of dynamically generated,
matching the module’s force-static configuration.

In `@src/app/`[locale]/layout.tsx:
- Around line 48-54: Reorder the locale validation in the layout so the
routing.locales.includes check and notFound() execute before
setRequestLocale(locale). Keep supported locales flowing into request-state
registration and subsequent message loading, while rejecting unsupported values
first.

In `@src/app/page.tsx`:
- Around line 1-5: The root route’s redirect to /en conflicts with sitemap,
metadata, and documentation that treat the base URL as English. Align the
default-locale URL contract by either adding a real unprefixed English route
while preserving the current redirect behavior, or updating sitemap generation,
metadata URL construction, and README examples to consistently use /en; do not
redirect the root to itself.

In `@src/i18n/metadata.ts`:
- Around line 10-12: Use one validated NEXT_PUBLIC_SITE_URL-derived base URL for
all static metadata: update src/i18n/metadata.ts lines 10-12 to validate or
require the environment value before constructing locale URLs, update
src/app/[locale]/page.tsx lines 27-28 to derive publisher URLs from that same
base URL, and update src/app/sitemap.ts lines 8-12 to reuse it and align the
instruction comment with the chosen fallback.

---

Outside diff comments:
In `@public/brand/Brand.md`:
- Around line 31-32: Update the relative links in Brand.md and the referenced
lines so branding assets use icons/... paths, and the source stylesheet link
uses ../../src/app/[locale]/globals.css. Keep all links rooted relative to
public/brand/ and continue using the official branding assets and specifications
from that directory.

In `@src/app/`[locale]/page.tsx:
- Around line 36-40: Escape the serialized JSON-LD before assigning it to
dangerouslySetInnerHTML in the schema-jsonld script, ensuring every “<”
character is encoded so embedded metadata cannot terminate the script element
early. Keep the existing JSON.stringify(jsonLd) serialization and script
structure unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cc01b0e3-3ac0-4956-882a-758b28a6c22b

📥 Commits

Reviewing files that changed from the base of the PR and between e602cd1 and aea0870.

⛔ Files ignored due to path filters (1)
  • public/favicon.ico is excluded by !**/*.ico
📒 Files selected for processing (15)
  • AGENTS.md
  • Contributors.md
  • MAINTAINERS.md
  • README.md
  • next.config.ts
  • public/.well-known/ai-plugin.json
  • public/brand/Brand.md
  • public/llms.txt
  • public/robots.txt
  • src/app/[locale]/layout.tsx
  • src/app/[locale]/page.tsx
  • src/app/page.tsx
  • src/app/sitemap.ts
  • src/i18n/metadata.ts
  • src/proxy.ts
💤 Files with no reviewable changes (2)
  • Contributors.md
  • src/proxy.ts

Comment thread MAINTAINERS.md
Comment thread next.config.ts
Comment thread public/.well-known/ai-plugin.json
Comment thread README.md Outdated
Comment thread README.md
Comment thread src/app/[locale]/layout.tsx Outdated
Comment thread src/app/page.tsx
Comment thread src/i18n/metadata.ts Outdated
@reach2saksham

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@reach2saksham

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/app/sitemap.ts (1)

10-12: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Keep the fallback-domain instruction consistent with the configured placeholder.

The instruction says to replace https://project.aossie.org, but the fallback is https://TODO:project.aossie.org. A maintainer who follows the instruction literally can leave the TODO host in the generated sitemap. Use the exact fallback literal in the instruction or make NEXT_PUBLIC_SITE_URL mandatory for production.

Proposed fix
- * 2. Replace the fallback domain 'https://project.aossie.org' below with your project's target production domain.
+ * 2. Replace the fallback domain 'https://TODO:project.aossie.org' below with your project's target production domain.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/sitemap.ts` around lines 10 - 12, Update the documentation comment
above rawBaseUrl to reference the exact fallback literal
https://TODO:project.aossie.org, or make NEXT_PUBLIC_SITE_URL mandatory in
production; keep the instruction and configured fallback consistent.
src/app/[locale]/layout.tsx (1)

22-24: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Disable runtime dynamic param resolution for the locale route.

next.config.ts uses output: "export", but src/app/[locale]/layout.tsx leaves dynamicParams at its default true. That lets unmatched locale params use runtime hydration, which conflicts with static export. Set dynamicParams = false so only generateStaticParams() values are exported and other locales return 404.

Proposed fix
+export const dynamicParams = false;
+
 export function generateStaticParams() {
   return routing.locales.map((locale) => ({ locale }));
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`[locale]/layout.tsx around lines 22 - 24, Set the locale route’s
dynamicParams configuration to false alongside generateStaticParams, ensuring
only locales returned by generateStaticParams are generated and unmatched locale
values return 404 during static export.

Source: MCP tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 321-322: Update the README’s root URL description to state that
the application defaults to /en rather than detecting browser language
preferences, and direct users to the LanguageSwitcher component to choose
another locale.

---

Outside diff comments:
In `@src/app/`[locale]/layout.tsx:
- Around line 22-24: Set the locale route’s dynamicParams configuration to false
alongside generateStaticParams, ensuring only locales returned by
generateStaticParams are generated and unmatched locale values return 404 during
static export.

In `@src/app/sitemap.ts`:
- Around line 10-12: Update the documentation comment above rawBaseUrl to
reference the exact fallback literal https://TODO:project.aossie.org, or make
NEXT_PUBLIC_SITE_URL mandatory in production; keep the instruction and
configured fallback consistent.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5319e1f7-3bd1-42f2-af35-2ae8dc0b0385

📥 Commits

Reviewing files that changed from the base of the PR and between aea0870 and df07802.

📒 Files selected for processing (6)
  • README.md
  • next.config.ts
  • src/app/[locale]/layout.tsx
  • src/app/sitemap.ts
  • src/i18n/metadata.ts
  • src/i18n/routing.ts
💤 Files with no reviewable changes (1)
  • next.config.ts

Comment thread README.md
Comment on lines +321 to +322
Open [http://localhost:3000](http://localhost:3000) to view it. The application will automatically detect your browser's language preferences and route you to `/hi` for Hindi or `/en` for English (the default locale).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -P 'navigator\.language|accept-language|localeDetection|LanguageSwitcher|redirect' src || true

Repository: AOSSIE-Org/Template-Repo-NextJS

Length of output: 813


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- README context ---\n'
sed -n '300,330p' README.md || true

printf '\n--- package/next-related files ---\n'
git ls-files | rg '(^package\.json$|^next\.config|middleware\.(ts|js)$|routing|messages|navigation|README\.md$)' || true

printf '\n--- relevant source files ---\n'
for f in src/i18n/navigation.ts src/app/page.tsx src/app/[locale]/page.tsx src/components/LanguageSwitcher.tsx; do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    sed -n '1,220p' "$f"
  fi
done

printf '\n--- routing/config searches ---\n'
rg -n -P 'localeDetection|middleware|i18n|defaultLanguage|next-intl|nextIntl|routing|redirectToLocale|redirect=|localeCookie|navigator\.language|accept-language' . || true

Repository: AOSSIE-Org/Template-Repo-NextJS

Length of output: 260


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- package/next-related files ---'
git ls-files | rg '(^package\.json$|^next\.config|middleware\.(ts|js)$|routing|messages|navigation|README\.md$)' || true

printf '\n%s\n' '--- relevant source files ---'
for f in src/i18n/navigation.ts src/app/page.tsx "src/app/[locale]/page.tsx" src/components/LanguageSwitcher.tsx; do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    sed -n '1,220p' "$f"
  fi
done

printf '\n%s\n' '--- README context ---'
sed -n '300,330p' README.md || true

printf '\n%s\n' '--- routing/config searches ---'
rg -n -P 'localeDetection|middleware|i18n|defaultLanguage|next-intl|nextIntl|routing|redirectToLocale|redirect=|localeCookie|navigator\.language|accept-language' . || true

Repository: AOSSIE-Org/Template-Repo-NextJS

Length of output: 11580


Correct the browser-language detection claim.

src/app/page.tsx redirects the root to the configured defaultLanguage (/en), and the project has no request-time middleware/client-side accept-language or navigator.language detector. Update README lines 321-322 to say /en is the default and direct users to LanguageSwitcher to select another locale.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 321 - 322, Update the README’s root URL description
to state that the application defaults to /en rather than detecting browser
language preferences, and direct users to the LanguageSwitcher component to
choose another locale.

Source: MCP tools

@Zahnentferner
Zahnentferner merged commit 14b11f7 into AOSSIE-Org:main Aug 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants