Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
4dd4a53
Expand CSP media and connect sources
willyogo Oct 17, 2025
3c060b3
Lower frame embed z-index under mobile nav
willyogo Oct 15, 2025
f5feb3c
Ensure frame image stays above card overlays
willyogo Oct 15, 2025
970122d
documentation update
j-paterson Oct 22, 2025
7efc1eb
typo correction
j-paterson Oct 22, 2025
56ee4e3
initial config consolidation
j-paterson Oct 22, 2025
81b48e6
first attempt at sourcing variables from config
j-paterson Oct 22, 2025
5c66b4d
cut out fidget specific data and trimmed config
j-paterson Oct 22, 2025
bd140a5
updated documentation
j-paterson Oct 22, 2025
70fc8af
remove future roadmap
j-paterson Oct 22, 2025
388bcf0
added example config
j-paterson Oct 22, 2025
459fcbd
updated imports
j-paterson Oct 23, 2025
a8741e4
type fix
j-paterson Oct 23, 2025
6d39477
parameter order fixed
j-paterson Oct 23, 2025
fa184e3
unused var cleanup and type safety
j-paterson Oct 23, 2025
b56e6c1
cleaned up unused imports
j-paterson Oct 23, 2025
3e08800
cleaned up unused imports
j-paterson Oct 23, 2025
98e415b
cleaned up unused imports
j-paterson Oct 23, 2025
5838596
restore home page config:
j-paterson Oct 23, 2025
f6ac17c
cleanup
j-paterson Oct 23, 2025
b857728
Close mobile nav after search selection
willyogo Oct 28, 2025
bdd3b08
Add mini app metadata and thumbnail for channel spaces
willyogo Oct 22, 2025
c036f65
Refactor ChannelCard component to ensure consistent flex display for …
sktbrd Oct 23, 2025
89678ae
Fix ImageResponse display flex requirements for channel metadata API
sktbrd Oct 23, 2025
4f9992f
Fix edge runtime compatibility and improve validation in channel meta…
sktbrd Oct 28, 2025
34d061c
Add Top 8 Farcaster friends iframe fidget (#1472)
willyogo Oct 30, 2025
302de59
Update sitemap to reflect current homepage tabs (#1500)
willyogo Oct 30, 2025
37adb29
build(deps-dev): bump @types/node from 24.0.10 to 24.9.1 (#1506)
dependabot[bot] Oct 30, 2025
70e76a8
build(deps): bump @internationalized/date from 3.9.0 to 3.10.0 (#1495)
dependabot[bot] Oct 30, 2025
96d4b2a
build(deps): bump @radix-ui/react-dropdown-menu from 2.1.15 to 2.1.16…
dependabot[bot] Oct 30, 2025
da91be7
build(deps-dev): bump prettier from 3.3.1 to 3.6.2 (#1492)
dependabot[bot] Oct 30, 2025
5f78222
Ensure all token gates check for both nOGs and $SPACE and refresh gat…
willyogo Oct 30, 2025
aa3ebf7
clanker
j-paterson Oct 30, 2025
0e00088
updated to accept clanker as config var
j-paterson Oct 30, 2025
b18f6f6
stricter typing
j-paterson Oct 30, 2025
1b7ea74
better typing across space types
j-paterson Oct 30, 2025
8a24f0d
standardize home page
j-paterson Oct 30, 2025
c356467
assets added
j-paterson Oct 30, 2025
c4ecf8e
update png to jpg
j-paterson Oct 30, 2025
2fd6811
signature fix
j-paterson Oct 30, 2025
6cf09f1
type matching for homebases
j-paterson Oct 30, 2025
6aa0c3b
type fixes in configs
j-paterson Oct 30, 2025
46e9e08
isEditable
j-paterson Oct 30, 2025
5b10eee
dynamic redirect
j-paterson Oct 30, 2025
e94188e
page loads
j-paterson Oct 30, 2025
4c2d83b
updated header
j-paterson Oct 30, 2025
ec7207b
logo size fixed
j-paterson Oct 30, 2025
56b09ee
gathered assets for nouns config
j-paterson Oct 30, 2025
21dc023
version update
j-paterson Oct 30, 2025
4982376
initial navs
j-paterson Oct 30, 2025
99b96f3
working navigation
j-paterson Oct 30, 2025
b897325
type error fix
j-paterson Oct 30, 2025
be6025c
removed hard coded sections of nav
j-paterson Oct 30, 2025
12605af
Normalize space handles for case-insensitive lookups
willyogo Nov 5, 2025
9e55496
Allow Fullstory in CSP and document analytics usage
willyogo Nov 3, 2025
0d9fe5c
build(deps): bump react-stately from 3.39.0 to 3.42.0
dependabot[bot] Nov 3, 2025
59bb7db
build(deps): bump viem from 2.35.1 to 2.38.6
dependabot[bot] Nov 3, 2025
f3d08cd
build(deps-dev): bump vitest from 1.6.1 to 4.0.6
dependabot[bot] Nov 3, 2025
0a1e5fa
build(deps): bump isomorphic-dompurify from 2.28.0 to 2.31.0 (#1527)
dependabot[bot] Nov 6, 2025
41bc2b9
Add mini app tags to brand configs and manifest (#1519)
willyogo Nov 6, 2025
bd6752b
Adjust Top 8 fidget defaults (#1520)
willyogo Nov 6, 2025
1dbd27b
build(deps): bump wagmi from 2.16.3 to 2.19.2 (#1528)
dependabot[bot] Nov 6, 2025
eb5cfed
refactor: remove TabNavigation, integrate MobileNavbar (#1523)
Jhonattan2121 Nov 6, 2025
a378772
Add Luma fidget for Luma embeds (#1535)
willyogo Nov 6, 2025
46b924e
build(deps-dev): bump lint-staged from 15.5.2 to 16.2.6 (#1549)
dependabot[bot] Nov 13, 2025
ff2d004
build(deps): bump @googleapis/youtube from 18.0.0 to 29.0.0 (#1548)
dependabot[bot] Nov 13, 2025
c8b5b33
build(deps): bump @cloudflare/workers-types from 4.20251011.0 to 4.20…
dependabot[bot] Nov 13, 2025
d4a2452
Add Clanker token search results to token API (#1546)
willyogo Nov 13, 2025
e3e7f05
Update token directory API and tests (#1558)
willyogo Nov 13, 2025
ddcc8ef
Update Clanker home tabs to Clank, Social, and Docs and apply baselin…
willyogo Nov 13, 2025
1d08bc9
Add owner address handling to chat fidget (#1537)
willyogo Nov 13, 2025
69a5856
feat: HTML/CSS prompt reimplemented (PR #1486) (#1516)
Jhonattan2121 Nov 16, 2025
006cc01
Add confirmation overlay when dismissing cast modal (#1512)
willyogo Nov 16, 2025
91b6ee2
YouTube Embed Improvements (#1552)
Jhonattan2121 Nov 16, 2025
47a9fcf
opengraph fix revert
j-paterson Nov 17, 2025
d267c09
feat(zora): normalize Zora URLs to /coin and improve embed UI
Jhonattan2121 Nov 16, 2025
4c7fac4
chore(zora): apply review fixes (router match, parser cleanup, access…
Jhonattan2121 Nov 16, 2025
cf911dd
fix: avoid unnecessary reloads for iframe embeds
willyogo Nov 6, 2025
792a270
Fix web embed iframe hook order
willyogo Nov 16, 2025
9ef096f
Stabilize web embed script rendering
willyogo Nov 17, 2025
a0f1177
Refactor CastRow: improve embed logic (#1542)
Jhonattan2121 Nov 17, 2025
30bbf1c
Add Clanker Manager fidget (#1538)
willyogo Nov 17, 2025
a8de847
Handle settlement fetch reverts without logging noise (#1540)
willyogo Nov 17, 2025
91928cf
feat: make brand tooltip configurable (#1543)
willyogo Nov 17, 2025
a53acc8
Add follow controls to directory fidget (#1563)
willyogo Nov 17, 2025
95cfb18
Implement dynamic Explore page directory(s) for all space systems & r…
willyogo Nov 17, 2025
3a94dc6
Update channel tab name for dynamic explore page (#1568)
willyogo Nov 17, 2025
e47c96f
first stab at adding userWallet aware clanker manager to homebase for…
j-paterson Nov 18, 2025
e1532e5
ui fixes (#1573)
j-paterson Nov 18, 2025
9bfc2db
Clanker mods2 (#1574)
j-paterson Nov 18, 2025
9e2cd23
remove explore
j-paterson Nov 18, 2025
005e71e
Add Empire Builder token fidget (#1579)
willyogo Nov 19, 2025
1155a2d
Handle empty contract address in Levr fidget (#1578)
willyogo Nov 19, 2025
75e3160
Add explore tabs configuration and directory data utilities (#1575)
willyogo Nov 19, 2025
aa90d02
add UI colors configuration for cast button styles across systems (#1…
sktbrd Nov 19, 2025
3656019
initial profile space for clanker
j-paterson Nov 19, 2025
ff414bf
3 cols
j-paterson Nov 19, 2025
0d002b0
Spotify Embed Cleanup (#1560)
Jhonattan2121 Nov 19, 2025
58e7d86
Clanker fidget section (#1581)
j-paterson Nov 19, 2025
c570f6c
Removed Lens (#1594)
j-paterson Nov 28, 2025
a7ee857
build(deps): bump @snapshot-labs/snapshot.js from 0.14.9 to 0.14.17 (…
dependabot[bot] Nov 29, 2025
7bfdd80
build(deps): bump @types/express from 4.17.23 to 4.17.25 (#1585)
dependabot[bot] Nov 29, 2025
b0aed4b
build(deps): bump @radix-ui/react-slot from 1.2.3 to 1.2.4 (#1586)
dependabot[bot] Nov 29, 2025
787625f
build(deps): bump sharp from 0.33.5 to 0.34.5 (#1587)
dependabot[bot] Nov 29, 2025
0f2a854
build(deps): bump react-aria from 3.41.1 to 3.44.0 (#1588)
dependabot[bot] Nov 29, 2025
f2c8130
fix(snapshot): resolve GraphQL errors, CSP issues, and image renderin…
Jhonattan2121 Nov 29, 2025
18c58aa
bugfix(Next): Patch NextJS against CVE-2025-66478 (#1609)
Serubin Dec 6, 2025
6ac30a5
planning
j-paterson Nov 30, 2025
75b9c05
builds
j-paterson Nov 30, 2025
c8e1175
consolidate documentation
j-paterson Nov 30, 2025
77e49b6
removed docs archive
j-paterson Nov 30, 2025
c9dc6a8
minor sourcing fix
j-paterson Nov 30, 2025
46ae01b
first stab at remote images compiled at build time
j-paterson Nov 30, 2025
03ae7dd
removing the fallback
j-paterson Nov 30, 2025
0c5cb2d
require > import
j-paterson Dec 2, 2025
bc9464a
removed unused abstractions
j-paterson Dec 2, 2025
b7e8eca
simplified + cleaned up page types
j-paterson Dec 2, 2025
fc1b61c
Updated to have server pass systemConfig to client as props
j-paterson Dec 2, 2025
98c2ec7
consolidated test variable
j-paterson Dec 2, 2025
a6acb40
added mapping
j-paterson Dec 2, 2025
5f48817
clean up duplicate commit
j-paterson Dec 2, 2025
55114d7
fixed function call
j-paterson Dec 2, 2025
fe34030
SignedFile as type
j-paterson Dec 2, 2025
b32a596
return type fix
j-paterson Dec 2, 2025
a981080
query enabled
j-paterson Dec 2, 2025
86e3495
removed old import
j-paterson Dec 2, 2025
247e30b
unused cleanup
j-paterson Dec 2, 2025
6bec437
handling build time errors better
j-paterson Dec 2, 2025
a9327d3
wider domain net for testing
j-paterson Dec 2, 2025
aaaf05d
documentation cleanup
j-paterson Dec 6, 2025
4096ffe
seeding scripts consolidated
j-paterson Dec 6, 2025
132f968
removed asset downloading from next config
j-paterson Dec 6, 2025
2878b9d
consistent casing for db entries
j-paterson Dec 6, 2025
96e77ca
package vuln fixed
j-paterson Dec 6, 2025
7b7077a
awaiting metadata
j-paterson Dec 6, 2025
e336694
docs update
j-paterson Dec 6, 2025
733e335
Linux Development Setup Improvements (#1607)
Jhonattan2121 Dec 17, 2025
177c14c
using unsigned files for tabOrders now
j-paterson Dec 18, 2025
4f7b079
Admin Editor (#1619)
j-paterson Dec 18, 2025
9f270ad
refactor(space): unify tab registration and commit flow
j-paterson Dec 18, 2025
9cb4366
following eror type system
j-paterson Dec 18, 2025
3ee42d3
deletion is local until commitAllSpaceChanges runs
j-paterson Dec 18, 2025
390cd32
refactor(space): implement staged commit pattern for tab operations
j-paterson Dec 19, 2025
aa807a2
type fix
j-paterson Dec 19, 2025
8749a83
type fix
j-paterson Dec 19, 2025
5436bf9
removed auto commits in tabBar and Space
j-paterson Dec 19, 2025
c75ffdd
expand vercel preview to community id categorization
j-paterson Dec 19, 2025
0765d93
Update community_configs fields, map additional fields to elements, i…
willyogo Dec 29, 2025
2d2f42d
Use Neynar metadata for Farcaster embeds
willyogo Dec 30, 2025
6faf563
Wrap recent embed state for lint
willyogo Dec 30, 2025
e0835d9
Improve Neynar embed previews and embeds
willyogo Dec 30, 2025
f442e6c
Move embed removal into previews and tidy frame card
willyogo Dec 30, 2025
57d9c9b
Make cast modal scrollable within viewport
willyogo Dec 30, 2025
3450d5e
Render images without OG card chrome
willyogo Dec 30, 2025
6e0e67a
Improve Farcaster embed validation and caching (#1639)
willyogo Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ APP_MNEMONIC = ''
NEYNAR_API_KEY = ''
SUPABASE_SERVICE_KEY = ''
YOUTUBE_API_KEY = ''
MORALIS_API_KEY = ''

# These are specific to the environment
# and so need to be configured locally
Expand All @@ -47,6 +48,8 @@ NEXT_PUBLIC_SUPABASE_URL = ''
NEXT_PUBLIC_SUPABASE_ANON_KEY = ''
NEXT_PUBLIC_PRIVY_API_KEY = ''
NEXT_PUBLIC_ALCHEMY_API_KEY = '' # Also used for the Nouns Home fidget RPC fallback
# Optional: used for Directory fidget (ERC20 + NFT holders)
NEXT_PUBLIC_MORALIS_API_KEY = ''

# Nouns Home fidget (optional overrides)
# NOUNS_RPC_URL = ''
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.11.0
22.12.0
67 changes: 61 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,50 @@ a protocol for decentralized social apps: https://www.farcaster.xyz
On Mac OS, for example:
```bash
brew install supabase/tap/supabase
```

Install Docker Desktop on macOS:
```bash
brew install --cask docker
open /Applications/Docker.app
```
Wait for Docker Desktop to finish initializing before continuing.

On Linux:
install docker
install supabase
npx supabase init

First, install Homebrew (if not already installed):
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Follow the instructions in your terminal to add Homebrew to your PATH.
Generally, you'll need to run these commands (replace `.bashrc` with your shell configuration file if different):

```bash
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
```

You may also need to install some dependencies first (Debian/Ubuntu):
```bash
sudo apt-get install build-essential procps curl file git
```

Then install Supabase:
```bash
brew install supabase/tap/supabase
```

Install Docker (Debian/Ubuntu):
```bash
sudo apt-get update
sudo apt-get install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker "$USER"
```
Log out/in (or restart your shell) so the new group membership takes effect.
For other distros, follow the [official Docker Engine docs](https://docs.docker.com/engine/install/).

Make sure Docker is installed and running before continuing.
4. Install dependencies
```bash
yarn install
Expand All @@ -47,13 +86,29 @@ a protocol for decentralized social apps: https://www.farcaster.xyz
```
The script will attempt to start Supabase automatically if Docker is running; otherwise it will skip this step.

9. Run the test suite
9. **Seed the local database**
After Supabase is running and migrations are applied, seed the database:
```bash
# Run migrations and seed SQL (if not already done)
supabase db reset

# Seed community configs and navPage spaces
yarn seed
```

This will:
- Upload Nouns assets to ImgBB (if `NEXT_PUBLIC_IMGBB_API_KEY` is set)
- Create navPage space registrations
- Seed community configs (nouns, example, clanker)
- Upload navPage space configs to Supabase Storage

10. Run the test suite
```bash
yarn test
```

9. cp .env.development.local .env.local
10. yarn build
11. cp .env.development.local .env.local
12. yarn build

## Contributing and making Fidgets

Expand Down
254 changes: 254 additions & 0 deletions docs/ARCHITECTURE/AUTHENTICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
# Authentication System

The Nounspace authentication system combines Privy for wallet-based authentication with Farcaster for social identity, creating a seamless Web3 social experience.

## Architecture Overview

The authentication system consists of several key components:

- **Privy Integration** - Primary authentication provider
- **Farcaster Integration** - Social identity and protocol access
- **Identity Management** - Multi-identity support with cryptographic keys
- **Authenticator System** - Modular authentication methods

## Core Components

### 1. Privy Integration

Privy handles the primary authentication flow:

```typescript
// Privy store manages user state
interface PrivyState {
privyUser?: PrivyUser | null;
}

interface PrivyActions {
setPrivyUser: (user: PrivyUser | null) => void;
}
```

**Key Features:**
- Wallet connection (MetaMask, WalletConnect, etc.)
- Social login options
- User session management
- Multi-wallet support

### 2. Farcaster Integration

Farcaster provides social identity and protocol access:

```typescript
// Farcaster store manages FID linking
type FarcasterActions = {
getFidsForCurrentIdentity: () => Promise<void>;
registerFidForCurrentIdentity: (
fid: number,
signingKey: string,
signMessage: (messageHash: Uint8Array) => Promise<Uint8Array>,
) => Promise<void>;
setFidsForCurrentIdentity: (fids: number[]) => void;
addFidToCurrentIdentity: (fid: number) => void;
};
```

**Key Features:**
- FID (Farcaster ID) linking to identities
- Cryptographic signature verification
- Social graph access
- Cast and interaction capabilities

### 3. Identity Management

The system supports multiple identities per user:

```typescript
export type AccountStore = IdentityStore &
AuthenticatorStore &
PreKeyStore &
FarcasterStore &
PrivyStore & {
reset: () => void;
hasNogs: boolean;
setHasNogs: (v: boolean) => void;
};
```

**Identity Features:**
- Multiple space identities
- Cryptographic key management
- Identity switching
- Secure key storage

### 4. Authenticator System

Modular authentication methods for different services:

```typescript
// Authenticator manager handles method calls
const authenticatorManager = useMemo<AuthenticatorManager>(() => ({
callMethod: async (
{ requestingFidgetId, authenticatorId, methodName, isLookup = false },
...args
): Promise<AuthenticatorManagerResponse> => {
// Handle authenticator method calls
},
getInitializedAuthenticators: () => {
// Return available authenticators
}
}));
```

## Authentication Flow

### 1. Initial Setup

1. **User connects wallet** via Privy
2. **Identity creation** with cryptographic keys
3. **Farcaster linking** (optional)
4. **Authenticator setup** for services

### 2. Farcaster Integration

```typescript
// Register FID for current identity
const registerFidForCurrentIdentity = async (
fid: number,
signingKey: string,
signMessage: (messageHash: Uint8Array) => Promise<Uint8Array>,
) => {
const request: Omit<FidLinkToIdentityRequest, "signature"> = {
fid,
identityPublicKey: get().account.currentSpaceIdentityPublicKey!,
timestamp: moment().toISOString(),
signingPublicKey: signingKey,
};

const signedRequest: FidLinkToIdentityRequest = {
...request,
signature: bytesToHex(await signMessage(hashObject(request))),
};

// Submit to backend
const { data } = await axiosBackend.post<FidLinkToIdentityResponse>(
"/api/fid-link",
signedRequest,
);
};
```

### 3. Identity Management

```typescript
// Identity store manages multiple identities
interface IdentityStore {
spaceIdentities: SpaceIdentity[];
currentSpaceIdentityPublicKey: string | null;
getCurrentIdentity: () => SpaceIdentity | null;
getCurrentIdentityIndex: () => number;
setCurrentSpaceIdentityPublicKey: (key: string | null) => void;
}
```

## Security Considerations

### 1. Cryptographic Security

- **Key Generation**: Secure random key generation
- **Key Storage**: Encrypted local storage
- **Signature Verification**: Cryptographic signature validation
- **Key Rotation**: Support for key updates

### 2. Privacy Protection

- **Local Storage**: Sensitive data stored locally
- **Encryption**: Keys encrypted with user wallet
- **No Central Storage**: No centralized key storage

### 3. Access Control

- **Permission System**: Fidget-level permissions
- **Method Authorization**: Authenticator method access control
- **Identity Verification**: Cryptographic identity verification

## API Integration

### FID Linking

```typescript
// Link Farcaster FID to identity
POST /api/fid-link
{
"fid": number,
"identityPublicKey": string,
"timestamp": string,
"signingPublicKey": string,
"signature": string
}
```

### Identity Management

```typescript
// Get FIDs for identity
GET /api/fid-link?identityPublicKey={key}
```

## Development Patterns

### 1. Adding New Authenticators

```typescript
// Create authenticator in src/authenticators/
export const newAuthenticator = (config: AuthenticatorConfig) => ({
methods: {
methodName: async (params) => {
// Implementation
}
}
});
```

### 2. Using Authenticators in Fidgets

```typescript
// Access authenticator in fidget
const { callMethod } = useAuthenticatorManager();

const result = await callMethod({
requestingFidgetId: 'my-fidget',
authenticatorId: 'farcaster:signers',
methodName: 'getUserInfo'
});
```

### 3. Permission Management

```typescript
// Check permissions before calling methods
const hasPermission = authenticatorConfig[authenticatorId]
.permissions[requestingFidgetId]?.includes(methodName);
```

## Troubleshooting

### Common Issues

1. **Authentication Failures**: Check Privy configuration
2. **FID Linking Issues**: Verify Farcaster integration
3. **Permission Denied**: Check authenticator permissions
4. **Key Management**: Ensure proper key storage

### Debug Tools

- Use React DevTools to inspect store state
- Check browser console for authentication errors
- Verify environment variables are set correctly
- Test with different wallet providers

## Future Considerations

- Enhanced permission system
- Multi-chain identity support
- Advanced key management
- Social recovery mechanisms
Loading