Skip to content

feat(plt-998): create coding best practices Next.js website#1

Open
kurodo3[bot] wants to merge 2 commits intodevfrom
feat/plt-998-coding-best-practices
Open

feat(plt-998): create coding best practices Next.js website#1
kurodo3[bot] wants to merge 2 commits intodevfrom
feat/plt-998-coding-best-practices

Conversation

@kurodo3
Copy link
Copy Markdown
Contributor

@kurodo3 kurodo3 Bot commented Mar 18, 2026

Summary

  • Implements a static Next.js 14 (TypeScript) website for PLT-998
  • Covers 6 engineering topics: Clean Code, SOLID Principles, Git Workflow, Testing, Code Review, and Performance — totalling 24 principles with good/bad code examples
  • Includes responsive CSS modules, shared Navbar/Footer, 404 page, and dynamic slug-based routing for each category
  • Fixes setupFilesAfterFramework typo in jest.config.js → corrected to setupFilesAfterEnv

Pages

Route Description
/ Hero section + category grid
/practices Full listing of all 6 categories
/practices/[slug] Detail page per category (6 static pages)
/about About page

Test plan

  • npm test → 7 tests, all passing, no warnings
  • npm run build → 12 static pages generated successfully, 0 errors
  • npm run lint → no ESLint errors

Closes PLT-998

🤖 Generated with Claude Code

Implements a static Next.js 14 site covering six core engineering topics:
Clean Code, SOLID Principles, Git Workflow, Testing, Code Review, and
Performance. Each topic has a dedicated page with principles, descriptions,
and good/bad code examples. Includes responsive CSS modules, a shared
Navbar/Footer, a 404 page, and a Jest test suite (7 tests, all passing).

Fixes: PLT-998

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread README.md
@@ -0,0 +1,40 @@
# Coding Best Practices
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Include information about Nauticalab as can be found in https://nauticalab.org

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you respond to this?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bump on this point

@@ -0,0 +1,54 @@
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice test system!

@eywalker eywalker self-requested a review March 18, 2026 11:30
expect(categories.length).toBeGreaterThan(0);
});

it("every category has required fields", () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What is this for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — added a 4-line comment above the test (commit f76ef68) explaining its purpose:

Guards against incomplete data entries in practices.ts — ensures every Category object has all fields (slug, title, icon, description, color, and a non-empty principles array) that the UI components depend on at runtime, so a missing field won't silently cause a broken page.

In short, TypeScript's structural typing still allows a field to be an empty string or undefined if it isn't caught at the data-entry level, so this test acts as a data-integrity guard for the practices.ts content file.

…test

Add an inline comment explaining that the test guards against incomplete
data entries in practices.ts, ensuring all UI-required fields are present
at runtime before they can cause a silently broken page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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