Skip to content

Portfolio: shared field rules, username rules and reserved names #42

Closed

Description

@procoder-ji

Part of #40. Depends on #41.

Scope

Create one source of rules that both runtimes use, the same way shared/practice/questions.json works.

  • Fields and limits: name, headline, about, skills, projects (title, link, tech, description), education, experience, achievements, and links (GitHub, LinkedIn, website, email). Set a maximum length for each text field and a maximum number of projects and entries.
  • Links: https only, plus mailto: for email. Follow the approach of sanitizeUrl in src/lib/markdown.ts.
  • Username: lowercase letters, digits and single hyphens, 3 to 30 characters.
  • Reserved names: www, api, app, admin, mail, docs, blog, login, support, help, procoderji, satyam, and existing route names such as u, learn, practice, account.
  • Blocked words that suggest phishing, such as paytm, bank, login, verify, password.
  • A TypeScript validator in src/features/portfolio/ and a .NET validator in the backend, tested against the same fixtures.

Done when

  • npm test and dotnet test backend/ProCoderJi.slnx --configuration Release cover valid and invalid portfolios and usernames.
  • The limits are documented for contributors.

Activity

  1. added this to the Portfolio Phase 1 milestone on Nov 10, 2026
  2. Coding-Professional commented on Nov 10, 2026

    @Coding-Professional
    Collaborator

    Starting on this. Plan: put the rules and test fixtures in shared/portfolio/, add a TypeScript validator under src/features/portfolio/ and a .NET validator under backend/, and run both against the same fixtures, following how shared/practice/questions.json is shared today. I will take field limits from ADR 0002 and list the exact numbers in the pull request so they can be adjusted in review.

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

Metadata

Metadata

Labels

enhancementNew feature or requestportfolioStudent portfolio feature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions