Skip to content

feat!: rewrite site from scratch with updated ui - #59

Merged
calebephrem merged 4 commits into
mainfrom
dev
Aug 28, 2026
Merged

feat!: rewrite site from scratch with updated ui#59
calebephrem merged 4 commits into
mainfrom
dev

Conversation

@calebephrem

@calebephrem calebephrem commented Aug 28, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Completely rewrites the website from scratch with completely new ui and code structure

Closes

List any issues that are linked to this pull request (e.g., Closes #123).

Type of change(s)

  • Bug fix
  • New feature
  • Documentation update
  • Style / UI change
  • Refactor (no functional change)
  • Performance improvement
  • Other

Checklist

  • I've tested this change locally and it works as expected
  • bun run lint or npm run lint completes without warnings or errors
  • bun run build or npm run build completes successfully
  • My commit messages follow Conventional Commits (e.g. feat: ..., fix: ..., chore: ...)
  • I've updated relevant documentation (README, comments, etc.) if needed
  • I've removed any temporary debugging code (e.g. console.log)

Screenshots / recordings (if applicable)

image image image image

Anything else the reviewer should know?

Took me alot of time :)

@calebephrem calebephrem added docs Improvements or additions to documentation feat New feature fix Bug fix perf performance improvement refactor code restructure labels Aug 28, 2026
@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

This PR has more than 100 files changed, which exceeds our limit for automatic review.

To trigger a single review, invoke the @beetle command.

⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@socket-security

socket-security Bot commented Aug 28, 2026

Copy link
Copy Markdown

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

This PR has more than 100 files changed, which exceeds our limit for automatic review.

To trigger a single review, invoke the @beetle command.

⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary by Beetle

This PR introduces Lenis smooth scrolling to the website by integrating the Lenis library, a modern smooth scrolling solution. The change wraps the entire application layout with the ReactLenis component, enabling smooth, physics-based scrolling behavior across all pages. This is a focused enhancement that improves user experience by providing fluid scroll animations without affecting the core functionality of the application.

📁 File Changes Summary (Consolidated across all commits):

File Status Changes Description
app/layout.tsx Modified +10/-7 Added ReactLenis import and wrapped the root layout with <ReactLenis root> component to enable smooth scrolling across the entire application. The component now provides physics-based scroll behavior for all pages.
package.json Modified +1/-0 Added lenis dependency (^1.3.26) to project dependencies for smooth scrolling functionality.
bun.lock Modified +3/-0 Updated lock file with Lenis package resolution and peer dependencies (@nuxt/kit, react, vue).

Total Changes: 3 files changed, +14 additions, -7 deletions

🎯 Key Changes:

  • Lenis Integration: Added the Lenis library (v1.3.26) as a production dependency for smooth scrolling capabilities
  • Root Layout Wrapper: Wrapped the entire application's root layout with <ReactLenis root> component, making smooth scrolling available globally across all pages
  • Minimal Footprint: The change is surgical and non-invasive—only modifying the layout wrapper without touching any business logic or component internals
  • React Integration: Utilized the official React binding (lenis/react) for seamless integration with the Next.js/React architecture

📊 Impact Assessment:

  • Security: ✅ No security implications. Lenis is a well-established, open-source library with no authentication or data handling. No new attack surface introduced.
  • Performance: ⚠️ Minor performance consideration. Lenis adds smooth scrolling via JavaScript animations, which may have a slight impact on scroll performance on lower-end devices. However, Lenis is optimized for performance and uses requestAnimationFrame for efficient animations. The root prop ensures it hijacks native scrolling at the document level. Potential benefit: improved perceived performance through smoother UX.
  • Maintainability: ✅ Excellent. The integration is clean and follows React best practices. The <ReactLenis root> wrapper is a single, declarative component that requires no additional configuration or maintenance. Future updates to Lenis can be managed through standard dependency updates.
  • Testing: ⚠️ Testing considerations. Scroll-related tests may need adjustment if they rely on native scroll behavior. E2E tests should verify smooth scrolling works as expected. Unit tests for scroll-dependent components should account for the Lenis animation timing. No breaking changes to existing test infrastructure.
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

✅ You're good to merge this PR! No issues found. Great job!

Settings
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary by Beetle

This PR optimizes the application's router performance and theme store hydration by making three key improvements: (1) integrating Lenis smooth scrolling library with proper CSS imports and configuration, (2) restructuring the React layout hierarchy to move ReactLenis inside the body element and enable automatic RAF (requestAnimationFrame) mode, and (3) refactoring the theme store to use direct state access instead of hook destructuring, eliminate unnecessary dependency tracking, and implement requestAnimationFrame for DOM updates to prevent layout thrashing. These changes collectively improve initial page load performance, reduce hydration mismatches, and optimize theme application timing.

📁 File Changes Summary (Consolidated across all commits):

File Status Changes Description
app/globals.css Modified +13/-0 Added Lenis smooth scrolling library CSS import and configured scrollbar behavior with scrollbar-gutter: stable for layout stability. Includes Lenis-specific styles for smooth scroll behavior and height management.
app/layout.tsx Modified +6/-5 Restructured React component hierarchy: moved ReactLenis wrapper inside the body element (from wrapping the entire html), enabled autoRaf: true option for automatic requestAnimationFrame handling, fixed fira.variable class name, and added commented test page markup.
components/site/Theme.tsx Modified +2/-4 Refactored theme initialization to use direct Zustand state access (useTheme.getState().loadTheme()) instead of hook destructuring, removed unnecessary loadTheme dependency from useEffect, and simplified component logic.
states/theme.ts Modified +19/-8 Enhanced theme store with improved hydration logic: added window check for SSR safety, implemented requestAnimationFrame for DOM updates to prevent layout thrashing, improved theme validation logic, fixed localStorage key usage consistency, and optimized state updates to only trigger when theme actually changes.

Total Changes: 4 files changed, +40 additions, -17 deletions

🗺️ Walkthrough:

graph TD
A["App Initialization"] --> B["Layout.tsx"]
B --> C["ReactLenis Setup autoRaf: true"]
C --> D["Body Element"]
D --> E["Theme Component"]
E --> F["useTheme.getState() Direct State Access"]
F --> G["loadTheme Function"]
G --> H["Window Check SSR Safe"]
H --> I["requestAnimationFrame"]
I --> J["Set data-theme Attribute"]
J --> K["Update Zustand State"]
K --> L["Lenis Smooth Scroll Active"]
M["globals.css"] -.-> L
M --> N["Lenis CSS Import"]
N --> O["Scrollbar Gutter Stable"]
Loading

🎯 Key Changes:

  • Lenis Integration: Added Lenis smooth scrolling library with proper CSS imports (@import "lenis/dist/lenis.css") and configured scrollbar behavior with scrollbar-gutter: stable to prevent layout shift during scroll initialization.
  • Layout Hierarchy Optimization: Moved ReactLenis wrapper from wrapping the entire HTML element to inside the body element, enabling autoRaf: true option for automatic requestAnimationFrame handling, which improves performance by letting Lenis manage its own animation frame timing.
  • Theme Hydration Refactoring: Changed from hook-based destructuring (const { loadTheme } = useTheme()) to direct state access (useTheme.getState().loadTheme()), eliminating unnecessary dependency tracking and preventing potential re-render cycles during initialization.
  • SSR-Safe Theme Loading: Added typeof window === "undefined" check in loadTheme() to prevent errors during server-side rendering, ensuring the theme store only attempts DOM manipulation in the browser environment.
  • RequestAnimationFrame for DOM Updates: Wrapped DOM attribute updates in requestAnimationFrame() to batch DOM operations and prevent layout thrashing, improving rendering performance during theme application.
  • Improved Theme Validation: Enhanced theme validation logic to properly handle edge cases, use consistent localStorage key references, and only update Zustand state when the theme actually changes (avoiding unnecessary re-renders).

📊 Impact Assessment:

  • Security: No security implications. The changes maintain existing security posture with added SSR safety checks. The window check prevents potential errors in server environments.
  • Performance: Positive impact. Multiple optimizations: (1) autoRaf: true reduces unnecessary animation frame calculations, (2) requestAnimationFrame batches DOM updates preventing layout thrashing, (3) direct state access eliminates hook overhead during initialization, (4) conditional state updates prevent unnecessary re-renders, (5) scrollbar-gutter: stable prevents layout shift during scroll initialization.
  • Maintainability: Improved. The code is more explicit and easier to reason about: direct state access is clearer than hook destructuring in initialization contexts, SSR checks are explicit, and the theme logic is more straightforward. However, the commented test page markup should be removed before merging.
  • Testing: Requires attention. Key areas to test: (1) theme persistence across page reloads, (2) SSR rendering without errors, (3) smooth scroll behavior with Lenis, (4) no layout shift on initial load due to scrollbar-gutter: stable, (5) theme toggle functionality, (6) hydration mismatch prevention between server and client. Consider adding tests for edge cases like missing localStorage or invalid theme values.
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

✅ You're good to merge this PR! No issues found. Great job!

Settings
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary by Beetle

This PR restructures the resources catalog by reorganizing language/technology categories and updating resource metadata. The changes consolidate related technologies (e.g., "SQL" → "Database"), enhance resource language tags for better discoverability, and add a new design resource (Reicon). Additionally, minor code cleanup and CSS improvements are included to remove unused variables and improve focus state handling.

📁 File Changes Summary (Consolidated across all commits):

File Status Changes Description
content/site/resources.ts Modified +62/-19 Restructured language categories by consolidating "SQL" → "Database", reorganizing language list order, updating 15+ resource language tags for better categorization, adding new Reicon design resource, and marking additional resources as featured (FreeCodeCamp, roadmap.sh)
app/globals.css Modified +6/-0 Added focus outline removal for button, input, and textarea elements to improve UI consistency and remove default browser focus styles
app/articles/[slug]/page.tsx Modified +1/-1 Removed unused arr parameter from authors array map function to clean up code

Total Changes: 3 files changed, +69 additions, -20 deletions

🎯 Key Changes:

  • Language Category Restructuring: Renamed "SQL" to "Database" across 6 resources (SQLZoo, PostgreSQL docs, Use the Index Luke, Prisma, MongoDB) to better reflect broader database concepts beyond just SQL
  • Enhanced Resource Tagging: Updated 15+ resources with more comprehensive language tags (e.g., The Odin Project now includes Ruby, HTML, CSS; FreeCodeCamp expanded to include TypeScript, React; LeetCode expanded to 15 languages)
  • Language List Reorganization: Moved "Design" earlier in the languages array and replaced "SQL" with "Database" for better logical grouping
  • New Resource Addition: Added Reicon (open-source vector icons/illustrations for React, Vue, Svelte, Flutter, Figma) tagged with "Design"
  • Featured Resource Updates: Marked FreeCodeCamp and roadmap.sh as featured resources to increase visibility
  • Code Quality: Removed unused arr parameter from authors mapping function and improved CSS focus state handling for form elements

📊 Impact Assessment:

  • Security: No security implications. Changes are purely organizational and metadata-related with no authentication, authorization, or data handling modifications.
  • Performance: Minimal performance impact. The changes involve static data restructuring in a TypeScript configuration file. The CSS focus outline removal may provide negligible performance improvement by reducing browser repaints on focus events.
  • Maintainability: Positive impact. The consolidation of "SQL" → "Database" improves semantic clarity and makes the resource categorization more intuitive. Removing unused function parameters reduces code clutter. However, the expanded language tags on resources increase the size of the resources array slightly, which could be mitigated with future optimization if needed.
  • Testing: No test coverage implications. These are configuration and styling changes that don't introduce new logic requiring unit tests. Manual verification of resource display and language filtering would be recommended to ensure tags render correctly in the UI.
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

Comment thread app/globals.css Outdated
Comment on lines +137 to +141
button,
input,
textarea:focus {
outline: none;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing focus outlines from interactive elements (button, input, textarea) creates a critical accessibility issue. Focus indicators are essential for keyboard navigation and users relying on assistive technologies. This violates WCAG 2.1 Level AA standards (2.4.7 Focus Visible).
Additionally, the selector textarea:focus is inconsistent with button and input (which have no :focus pseudo-class), meaning the outline removal behavior differs across these elements.

Confidence: 5/5

Suggested Fix

Instead of removing focus outlines entirely, consider applying a custom focus style that maintains visibility:

Suggested change
button,
input,
textarea:focus {
outline: none;
}
button,
input,
textarea {
&:focus {
outline: 2px solid var(--accent);
outline-offset: 2px;
}

Or, if you must remove the default outline, replace it with a visible alternative (e.g., box-shadow or border):

Suggested change
button,
input,
textarea:focus {
outline: none;
}
button,
input,
textarea {
&:focus {
outline: none;
box-shadow: 0 0 0 2px var(--accent);
}
Prompt for AI

Copy this prompt to your AI IDE to fix this issue locally:

In app/globals.css around line 137, the CSS rule removes focus outlines from button, input, and textarea elements, which creates an accessibility violation. Replace the outline: none rule with a custom focus style that provides visible focus indicators (e.g., using outline with a custom color, box-shadow, or border), ensuring keyboard navigation remains visible for all users. Make sure the focus style is consistent across all three element types.

📍 This suggestion applies to lines 137-141

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

This PR has more than 100 files changed, which exceeds our limit for automatic review.

To trigger a single review, invoke the @beetle command.

⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

This PR has more than 100 files changed, which exceeds our limit for automatic review.

To trigger a single review, invoke the @beetle command.

⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@devhub-bot

devhub-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@calebephrem
calebephrem merged commit 5e098cd into main Aug 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation feat New feature fix Bug fix perf performance improvement refactor code restructure

Projects

None yet

1 participant