Skip to content

Add custom 404 page with improved UX and social links: FOR AOSSIE WEBSITE #578

Open
averma2988225-droid wants to merge 1 commit intoAOSSIE-Org:mainfrom
averma2988225-droid:feature/custom-404-page
Open

Add custom 404 page with improved UX and social links: FOR AOSSIE WEBSITE #578
averma2988225-droid wants to merge 1 commit intoAOSSIE-Org:mainfrom
averma2988225-droid:feature/custom-404-page

Conversation

@averma2988225-droid
Copy link

@averma2988225-droid averma2988225-droid commented Feb 13, 2026

#OVERVIEW: A custom 404 (Not Found) page is introduced to deal with invalid and non-existent routes on the entire AOSSIE website, replacing the default Next.js fallback with a branded and navigable error recovery page. #305

#PROBLEM: The current application uses the default Next.js 404 page for invalid routes, which is deficient in the following aspects:

󠁯•󠁏󠁏Lack of project branding
󠁯•󠁏󠁏Lack of recovery navigation
󠁯•󠁏󠁏Lack of contextual information for users accessing the application through broken URLs

This leads to suboptimal user experience and possible loss of users.

#SOULTION
-->1)Created a custom 404 UI module at the following location:
FILE LOCATION 404

2)Incorporated routing functionality at the following location:
Screenshot_222

  1. VISUAL IMAGE OF THE NEW PAGE :
PAGE NOT FOUND img

#TECHNICAL NOTES:-

󠁯•󠁏󠁏Technology: Next.js (App Router)
󠁯•󠁏󠁏Routing convention: not-found.js
󠁯•󠁏󠁏Component organization: Modularized for easier maintainability
󠁯•󠁏󠁏Design and layout: Consistent with the existing site design

#TESTING :-
Locally tested by accessing a non-existent route on the application:
http://localhost:3000/any-non-existent-route

Verified that:

󠁯•󠁏󠁏The custom 404 page is displayed correctly
󠁯•󠁏󠁏The navigation links are functional
󠁯•󠁏󠁏There are no console or build errors

Impact:-
󠁯•󠁏󠁏Enhanced invalid route user experience
󠁯•󠁏󠁏Added guided recovery navigation
󠁯•󠁏󠁏Integrated error handling with AOSSIE branding
󠁯•󠁏󠁏No breaking changes introduced

Summary by CodeRabbit

New Features

  • Introduced a custom 404 error page featuring a prominent "Page not found" message with a home navigation link, responsive footer containing site navigation links, copyright notice, and social/contact icons. This provides a better user experience when accessing non-existent pages while maintaining design consistency across the site.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a custom 404 error page for the Next.js application. A new NotFoundPage component renders a full-page layout with a "Page not found" message, navigation, and footer. The custom 404 route is registered, and the app's footer is conditionally hidden on the 404 page. FontAwesome configuration is also imported and CSS auto-injection is disabled.

Changes

Cohort / File(s) Summary
404 Page Implementation
src/pages/404.jsx, src/components/404.page/NotFoundPage.jsx
Adds a custom 404 page route that renders a NotFoundPage component with centered 404 card, home link, footer with internal navigation links, copyright notice, and social/contact icons. Uses Container and SectionHeading components with FontAwesome icons.
App Configuration & Footer Visibility
src/pages/_app.jsx
Imports FontAwesome config, disables auto CSS injection via config.autoAddCss = false, and adds conditional Footer rendering to hide it when router.pathname === '/404'.
Footer Whitespace Cleanup
src/components/Footer.jsx
Removes an empty whitespace line after currentYear declaration; no functional changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A 404 page hops into place,
With logo links and footer grace,
No more lost souls in digital space,
Home awaits with a friendly face! 🏠✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding a custom 404 page with improved UX and social links for the AOSSIE website, which is directly supported by the file changes and PR objectives.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/components/404.page/NotFoundPage.jsx`:
- Around line 38-52: External social links are inconsistent: NotFoundPage.jsx
uses external links with target="_blank" and rel="noreferrer" but Footer.jsx's
external Link elements do not. Update the external anchor/Link elements in
Footer.jsx (the Footer component's social link elements) to include
target="_blank" and rel="noreferrer" so behavior matches NotFoundPage.jsx;
ensure you add these attributes to the same Link/anchor elements that render
external hrefs (the social link elements) and keep internal links unchanged.
- Around line 57-167: The footer in NotFoundPage.jsx duplicates Footer.jsx
(links, icons, styles) causing drift; extract the repeated markup into a shared
component (e.g., FooterLinks or SocialIcons) and replace the duplicated block
inside NotFoundPage.jsx (the Container.Outer footer block with Link +
FontAwesomeIcon items) with that shared component; parameterize props for icon
size, color classes, and external-link attributes (target/rel) so Footer.jsx and
NotFoundPage.jsx can render consistent links while allowing layout differences.
🧹 Nitpick comments (1)
src/pages/_app.jsx (1)

38-38: Conditional footer hiding works but is fragile if more custom-footer pages are added.

This is fine for a single route, but if additional pages need the same treatment, consider a per-page layout pattern (e.g., Component.hideFooter) instead of growing the condition.

Comment on lines +38 to +52
<div className="mt-6 flex justify-center">
<Link
href="/"
aria-label="Back to AOSSIE home"
className="rounded-2xl border border-zinc-300/80 bg-white/70 p-4 shadow-sm transition hover:border-[#00843D] dark:border-zinc-700 dark:bg-zinc-800/70 dark:hover:border-yellow-400"
>
<Image
src="/logo1.png"
width={90}
height={90}
alt="AOSSIE Logo"
className="mx-auto"
priority
/>
</Link>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

External links in the main Footer lack target="_blank" and rel="noreferrer" — inconsistency.

The external social links in Footer.jsx (Lines 41-52) do not set target="_blank" or rel="noreferrer", while the same links here do. This should be consistent — external links should generally open in a new tab with rel="noreferrer" for security (window.opener protection). Whichever convention is chosen, apply it uniformly.

🤖 Prompt for AI Agents
In `@src/components/404.page/NotFoundPage.jsx` around lines 38 - 52, External
social links are inconsistent: NotFoundPage.jsx uses external links with
target="_blank" and rel="noreferrer" but Footer.jsx's external Link elements do
not. Update the external anchor/Link elements in Footer.jsx (the Footer
component's social link elements) to include target="_blank" and
rel="noreferrer" so behavior matches NotFoundPage.jsx; ensure you add these
attributes to the same Link/anchor elements that render external hrefs (the
social link elements) and keep internal links unchanged.

Comment on lines +57 to +167
{/* Footer */}
<Container.Outer>
<div className="w-full px-4 pb-4 pt-4 sm:px-6 lg:px-8">

{/* Footer Row */}
<div className="flex w-full flex-col gap-y-3 text-center md:flex-row md:items-center md:justify-between md:text-left">

{/* Left Links */}
<div className="flex justify-center gap-4 text-xs font-semibold font-mono text-zinc-800 dark:text-zinc-200 sm:text-sm md:justify-start">
<Link
href="/about"
className="transition hover:text-[#00843D] dark:hover:text-yellow-400"
>
About
</Link>

<Link
href="/projects"
className="transition hover:text-[#00843D] dark:hover:text-yellow-400"
>
Projects
</Link>

<Link
href="/ideas"
className="transition hover:text-[#00843D] dark:hover:text-yellow-400"
>
Ideas
</Link>

<Link
href="/apply"
className="transition hover:text-[#00843D] dark:hover:text-yellow-400"
>
Apply
</Link>
</div>

{/* Copyright — centered */}
<p className="text-[10px] font-mono text-zinc-400 dark:text-zinc-500 sm:text-xs">
&copy; 2016-{new Date().getFullYear()} AOSSIE. All rights reserved.
</p>

{/* Icons */}
<div className="flex items-center justify-center gap-5 md:justify-end">
<Link
aria-label="Contact by Mail"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="mailto:aossie.oss@gmail.com"
>
<FontAwesomeIcon icon={faEnvelope} size="sm" />
</Link>
<Link
aria-label="Follow on GitLab"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://gitlab.com/aossie"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faGitlab} size="sm" />
</Link>
<Link
aria-label="Follow on GitHub"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://github.com/AOSSIE-Org"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faGithub} size="sm" />
</Link>
<Link
aria-label="Join on Discord"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://discord.gg/hjUhu33uAn"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faDiscord} size="sm" />
</Link>
<Link
aria-label="Follow on Twitter"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://twitter.com/aossie_org"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faTwitter} size="sm" />
</Link>
<Link
aria-label="Follow on LinkedIn"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://www.linkedin.com/company/aossie"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faLinkedin} size="sm" />
</Link>
<Link
aria-label="Subscribe on YouTube"
className="text-zinc-300 transition hover:text-[#00843D] dark:text-zinc-300 dark:hover:text-yellow-400"
href="https://www.youtube.com/@aossie"
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon={faYoutube} size="sm" />
</Link>
</div>

</div>
</div>
</Container.Outer>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Footer content is duplicated from Footer.jsx — this will drift.

The entire footer section (nav links, copyright, social icons) is a near-copy of src/components/Footer.jsx with several silent differences:

  • Extra social links here (LinkedIn, YouTube) that are absent from the global Footer.
  • Different icon sizes (sm here vs xl in Footer).
  • Different base text colors (zinc-300 here vs zinc-400 in Footer).
  • target="_blank" / rel="noreferrer" on external links here but missing from Footer.

Any future update to footer links or branding will need to be applied in two places. Consider extracting a shared FooterLinks / SocialIcons component that both footers consume, parameterized for size/layout differences.

🤖 Prompt for AI Agents
In `@src/components/404.page/NotFoundPage.jsx` around lines 57 - 167, The footer
in NotFoundPage.jsx duplicates Footer.jsx (links, icons, styles) causing drift;
extract the repeated markup into a shared component (e.g., FooterLinks or
SocialIcons) and replace the duplicated block inside NotFoundPage.jsx (the
Container.Outer footer block with Link + FontAwesomeIcon items) with that shared
component; parameterize props for icon size, color classes, and external-link
attributes (target/rel) so Footer.jsx and NotFoundPage.jsx can render consistent
links while allowing layout differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant