refactor(branding,docs): configure static export, relocate brand folder to public/brand and update bootstrap setup checklist - #12
Conversation
…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
WalkthroughThe 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. ChangesTemplate foundation and application updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (12)
brand/logo.svgis excluded by!**/*.svgpublic/assets/icons/aossie_logo.svgis excluded by!**/*.svgpublic/assets/icons/favicon.icois excluded by!**/*.icopublic/brand/icons/aossie_logo.svgis excluded by!**/*.svgpublic/brand/icons/favicon.icois excluded by!**/*.icopublic/brand/icons/stability_nexus_logo.svgis excluded by!**/*.svgpublic/file.svgis excluded by!**/*.svgpublic/globe.svgis excluded by!**/*.svgpublic/next.svgis excluded by!**/*.svgpublic/stability.svgis excluded by!**/*.svgpublic/vercel.svgis excluded by!**/*.svgpublic/window.svgis excluded by!**/*.svg
📒 Files selected for processing (20)
.coderabbit.yml.github/workflows/ci.ymlAGENTS.mdCOPYRIGHT.mdContributors.mdREADME.mdpackage.jsonpublic/.well-known/ai-plugin.jsonpublic/.well-known/assetlinks.jsonpublic/brand/Brand.mdpublic/llms.txtpublic/robots.txtsrc/app/[locale]/error.tsxsrc/app/[locale]/globals.csssrc/app/[locale]/layout.tsxsrc/app/[locale]/not-found.tsxsrc/app/[locale]/page.tsxsrc/components/LanguageSwitcher.tsxsrc/components/ThemeToggle.tsxsrc/i18n/metadata.ts
Updated color entries and paths for branding assets.
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
.github/workflows/ci.ymlAGENTS.mdCOPYRIGHT.mdREADME.mdpublic/brand/Brand.mdsrc/app/[locale]/layout.tsxsrc/app/[locale]/page.tsx
There was a problem hiding this comment.
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 winEscape 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 assigningdangerouslySetInnerHTML.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 winFix the relative links in the brand guide.
public/brand/Brand.mdis already insidepublic/brand/. Therefore,brand/icons/...resolves topublic/brand/brand/icons/..., andsrc/app/...resolves topublic/brand/src/app/.... Useicons/...for branding assets and../../src/app/[locale]/globals.cssfor the source link.As per path instructions,
public/brand/**must use the official branding logo, favicon, and style specifications frompublic/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
⛔ Files ignored due to path filters (1)
public/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (15)
AGENTS.mdContributors.mdMAINTAINERS.mdREADME.mdnext.config.tspublic/.well-known/ai-plugin.jsonpublic/brand/Brand.mdpublic/llms.txtpublic/robots.txtsrc/app/[locale]/layout.tsxsrc/app/[locale]/page.tsxsrc/app/page.tsxsrc/app/sitemap.tssrc/i18n/metadata.tssrc/proxy.ts
💤 Files with no reviewable changes (2)
- Contributors.md
- src/proxy.ts
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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 winKeep the fallback-domain instruction consistent with the configured placeholder.
The instruction says to replace
https://project.aossie.org, but the fallback ishttps://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 makeNEXT_PUBLIC_SITE_URLmandatory 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 winDisable runtime dynamic param resolution for the locale route.
next.config.tsusesoutput: "export", butsrc/app/[locale]/layout.tsxleavesdynamicParamsat its defaulttrue. That lets unmatched locale params use runtime hydration, which conflicts with static export. SetdynamicParams = falseso onlygenerateStaticParams()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
📒 Files selected for processing (6)
README.mdnext.config.tssrc/app/[locale]/layout.tsxsrc/app/sitemap.tssrc/i18n/metadata.tssrc/i18n/routing.ts
💤 Files with no reviewable changes (1)
- next.config.ts
| 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). | ||
|
|
There was a problem hiding this comment.
📐 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 || trueRepository: 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' . || trueRepository: 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' . || trueRepository: 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
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 inREADME.mdto cover allTODOplaceholders.Changes Introduced
1. Branding Asset Relocation & Path Updates
brand/intopublic/brand/and merged vector/favicon icons intopublic/brand/icons/.README.md,AGENTS.md,public/brand/Brand.md,public/llms.txt, and.coderabbit.yml.layout.tsx,page.tsx,src/i18n/metadata.ts, andpublic/.well-known/ai-plugin.json.2. Architecture & Code Quality Enhancements
../../) to@/*path aliases (@/i18n/*,@/components/*) acrosslayout.tsx,not-found.tsx,page.tsx,LanguageSwitcher.tsx, andThemeToggle.tsx.Noto_Sans_Devanagariinlayout.tsxand mapped--font-devanagariinglobals.cssfor proper Hindi rendering.layout.tsxwith dynamicgenerateMetadatadelegating togenerateLocaleMetadata(locale, 'Home').ThemeToggle.tsxwith semantic theme tokens (text-icon-sun,text-icon-moon,text-icon-system).type="button"to buttons inerror.tsxandThemeToggle.tsx.3. Documentation & Bootstrap Checklist Updates
README.mdto state that React Server Components are used by default, introducing Client Components only where required.README.mdto documentlocalePrefix: 'as-needed'(/for default English,/hifor Hindi).README.mdto cover allTODOplaceholders (AGENTS.md,llms.txt,robots.txt,assetlinks.json,ai-plugin.json,page.tsxJSON-LD,Contributors.md).4. Pure Client-Side Static Export & GitHub Pages Hosting
Static Export Configuration (
next.config.ts):output: 'export'andimages: { unoptimized: true }to output static HTML/CSS/JS bundles into./outfor GitHub Pages."next-intl/config"on Windows environments by using relative POSIX path aliases.Root Routing & Middleware Cleanup:
src/app/page.tsxwith a server redirect to default locale (/en), ensuring anout/index.htmlis generated for static web servers.src/proxy.ts(edge middleware), as Next.js static exports strictly require client-side/static routing without server middleware.Localized SSG & Static Rendering (
[locale]):generateStaticParams()andsetRequestLocale(locale)insrc/app/[locale]/layout.tsxto pre-render static paths for all supported locales (/en,/hi).generateStaticParamsexport frompage.tsxto prevent segment parameter warnings during dev server rendering.DX, Metadata & Asset Fixes:
<Script>with standard HTML<script type="application/ld+json">insrc/app/[locale]/page.tsxto eliminate React 19 client rendering warnings.favicon.icoinpublic/favicon.icoand addedicons: { icon: '/brand/icons/favicon.ico' }insrc/i18n/metadata.ts.export const dynamic = 'force-static'insrc/app/sitemap.ts.README.mdbuild guide to detail GitHub Pages./outstatic export and updatedAGENTS.mdwith static export rules.Verification Checklist
npm run buildcompleted successfully without any compilation errors.npm run lintcompleted with 0 errors or warnings.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:
I have used the following AI models and tools: TODO
Checklist
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores