Files
grimoire/vercel.json
Alejandro 4d90aab83c feat: add Grimoire member system with special NIP-05 usernames (#134)
* feat: add Grimoire member system with special NIP-05 usernames

Implements a member verification system for Grimoire project contributors
with custom usernames and visual badges.

Features:
- Member registry with pubkey to username mapping
- _ (underscore) username for ce3cd5ba...
- verbiricha username for 7fa56f5d...
- Special @grimoire.pro NIP-05 style display
- BookOpen icon badge for verified members
- Integration with UserName and NIP-05 components
- Comprehensive test suite for member utilities

The system prioritizes Grimoire member usernames over regular NIP-05
identifiers and adds visual badges throughout the UI for member recognition.

* chore: update TypeScript build info

* feat: configure NIP-05 verification for grimoire.rocks domain

Updates Grimoire member system to use grimoire.rocks domain and adds
proper NIP-05 verification infrastructure.

Changes:
- Update member NIP-05 identifiers from @grimoire.pro to @grimoire.rocks
- Create public/.well-known/nostr.json with member pubkey mappings
- Configure Vercel to serve nostr.json with proper headers:
  - Content-Type: application/json
  - Access-Control-Allow-Origin: * (required for NIP-05)
  - Cache-Control: public, max-age=3600
- Update rewrites to exclude .well-known paths from SPA routing

This enables NIP-05 verification for:
- _@grimoire.rocks → ce3cd5ba...
- verbiricha@grimoire.rocks → 7fa56f5d...

* refactor: integrate Grimoire member styling into UserName component

Simplifies the member system by removing the separate GrimoireUsername
component and handling everything directly in UserName.

Changes:
- UserName now checks isGrimoireMember and displays special styling
- Grimoire members show with yellow-orange gradient (from-yellow-400 to-orange-500)
- Member username displayed as "username@grimoire.rocks"
- Removed GrimoireUsername and GrimoireBadge components
- Updated nip05 to skip display for Grimoire members (UserName handles it)

This consolidates the logic and creates a cleaner, more maintainable
architecture where UserName is the single source of truth for all
username displays.

* feat: update _ member pubkey and show username only with gradient

Updates Grimoire member system to use the correct nprofile for _ and
displays member usernames without the @grimoire.rocks suffix.

Changes:
- Update _ member pubkey to 60dfe8bda... (from nprofile with relay hints)
- UserName component now shows just the username for Grimoire members
- Yellow-orange gradient styling applied to member usernames
- Updated nostr.json with new _ pubkey
- Fixed all tests to use correct pubkeys

Member usernames now display as:
- "_" with gradient (not "_@grimoire.rocks")
- "verbiricha" with gradient (not "verbiricha@grimoire.rocks")

* feat: update _ member pubkey and add diagonal gradient styling

Updates the _ member pubkey and enhances the visual styling with a more
stylish diagonal gradient effect.

Changes:
- Update _ member pubkey to c8fb0d3a... (new pubkey)
- Change gradient from horizontal to diagonal (bg-gradient-to-br)
- Add middle color stop (via-orange-400) for smoother gradient
- Updated nostr.json with new _ pubkey
- Updated all tests with correct pubkey
- Chat system already uses UserName component (verified)

Member usernames now display with a vibrant yellow-to-orange diagonal
gradient that flows from top-left to bottom-right with smooth transitions.

* refactor: show profile username with theme-aware gradient

Updates UserName component to display the user's actual profile name
instead of the Grimoire username, while still applying gradient styling
to Grimoire members. Also improves gradient colors for better visibility
across all themes.

Changes:
- Always use profile name from getDisplayName (not Grimoire username)
- Grimoire members still get gradient styling applied to their profile name
- Updated gradient colors to darker shades for better contrast:
  - from-yellow-500 (was yellow-400)
  - via-orange-500 (was orange-400)
  - to-orange-600 (was orange-500)
- Removed unused getGrimoireUsername import

The darker gradient colors (#eab308 → #f97316 → #ea580c) provide better
readability on both light and dark themes while maintaining the vibrant
yellow-to-orange diagonal effect.

* chore: simplify and fix tests for production readiness

Removes redundant test file and updates comments for accuracy.

Changes:
- Remove src/lib/nip05.test.ts (tested nprofile decoding not used in implementation)
- Update comments in grimoire-members.ts:
  - Change "@grimoire.pro" references to "@grimoire.rocks"
  - Remove outdated "verification badges" mentions
  - Clarify that members get "gradient styling" not badges

The member system is now cleaner and production-ready with:
- Hardcoded member pubkeys in grimoire-members.ts
- NIP-05 verification served via public/.well-known/nostr.json
- Gradient styling applied to member usernames via UserName component
- Proper test coverage via grimoire-members.test.ts

* chore: remove grimoire-members test file

Removes test file as part of simplifying the codebase for production.
The member system is simple enough that it doesn't require dedicated tests.

* fix: show profile NIP-05 for Grimoire members

Removes the check that was hiding NIP-05 for Grimoire members.
Members now display whatever NIP-05 they have in their profile,
just like everyone else, while still getting gradient username styling.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-18 12:54:50 +01:00

32 lines
587 B
JSON

{
"headers": [
{
"source": "/.well-known/nostr.json",
"headers": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Methods",
"value": "GET, OPTIONS"
},
{
"key": "Cache-Control",
"value": "public, max-age=3600"
}
]
}
],
"rewrites": [
{
"source": "/((?!.well-known).*)",
"destination": "/"
}
]
}