Skip to content

Commit fe93a05

Browse files
authored
Merge pull request #4680 from jbx-protocol/go-to-prod
go to prod
2 parents 33f4e10 + 155357e commit fe93a05

470 files changed

Lines changed: 3623 additions & 2224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SITEMAP.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Juice Interface Sitemap & Route Structure
2+
3+
## 🗺️ Route Hierarchy
4+
5+
### 🏠 Static Routes
6+
7+
```
8+
/ # Home page
9+
├── /about # About page
10+
├── /projects # Projects discovery page
11+
├── /activity # Activity feed
12+
├── /create # Create new project
13+
├── /contact # Contact form
14+
├── /legal # Legal information
15+
├── /privacy # Privacy policy
16+
└── /experimental/flags # Feature flags (experimental)
17+
```
18+
19+
### 📖 Success Stories
20+
```
21+
/success-stories/
22+
├── constitutiondao # ConstitutionDAO case study
23+
├── moondao # MoonDAO case study
24+
├── sharkdao # SharkDAO case study
25+
└── studiodao # StudioDAO case study
26+
```
27+
28+
### 👤 Account Routes
29+
```
30+
/account/
31+
└── [addressOrEnsName]/ # Dynamic: User profile by address or ENS
32+
├── (index) # View profile
33+
└── edit # Edit profile
34+
```
35+
36+
### 🎯 Project Routes (by Handle)
37+
```
38+
/p/
39+
└── [handle]/ # Dynamic: Project by handle
40+
├── (index) # Project dashboard
41+
└── safe/ # Safe (multi-sig) interface
42+
```
43+
44+
### 📊 V2/V3 Project Routes
45+
```
46+
/v2/p/
47+
└── [projectId]/ # Dynamic: V2/V3 project by ID
48+
├── (index) # Project dashboard
49+
├── safe/ # Safe interface
50+
├── contracts/ # Contract information
51+
└── settings/ # Settings dashboard
52+
└── [settingsPage] # Dynamic settings pages
53+
```
54+
55+
### 🚀 V4 Project Routes
56+
```
57+
/v4/
58+
└── [jbUrn]/ # Dynamic: V4 project URN format (chainId:projectId)
59+
├── (index) # Project dashboard
60+
└── settings/ # Settings dashboard
61+
├── (index) # Settings overview
62+
└── [settingsPage] # Dynamic settings pages
63+
```
64+
65+
### 🆕 V5 Project Routes
66+
```
67+
/v5/
68+
└── [jbUrn]/ # Dynamic: V5 project URN format (chainId:projectId)
69+
├── (index) # Project dashboard
70+
└── settings/ # Settings dashboard
71+
├── (index) # Settings overview
72+
└── [settingsPage] # Dynamic settings pages
73+
```
74+
75+
## 🔌 API Routes Structure
76+
77+
### Authentication & Account
78+
```
79+
/api/
80+
├── auth/
81+
│ ├── challenge-message # Get auth challenge
82+
│ └── wallet-sign-in # Wallet authentication
83+
├── account/
84+
│ ├── [address] # Get account details
85+
│ ├── update-details # Update account info
86+
│ └── update-email # Update email
87+
```
88+
89+
### Juicebox Core APIs
90+
```
91+
/api/juicebox/
92+
├── project/
93+
│ └── [projectHandle] # Get project by handle
94+
├── projectHandle/
95+
│ └── [projectId] # Get handle by project ID
96+
├── prices/
97+
│ └── ethusd # ETH/USD price feed
98+
├── jb-721-delegate/
99+
│ └── [dataSourceAddress] # NFT delegate info
100+
├── pv/[pv]/project/[projectId]/
101+
│ ├── logo # Project logo
102+
│ └── refreshMetadata # Refresh metadata
103+
└── v4/
104+
├── project/[projectId]/
105+
│ └── sucker-pairs # Sucker pairs info
106+
└── terminal/[terminalAddress]/
107+
└── jb-terminal-store # Terminal store data
108+
```
109+
110+
### Projects Discovery
111+
```
112+
/api/projects/
113+
├── (index) # List projects
114+
├── health # Health check
115+
├── tag-counts # Tag statistics
116+
├── trending # Trending projects
117+
├── update # Update project data
118+
└── update-retry-ipfs # Retry IPFS updates
119+
```
120+
121+
### Utility APIs
122+
```
123+
/api/
124+
├── ens/resolve/[address] # Resolve ENS names
125+
├── ipfs/
126+
│ ├── [cid] # Get IPFS content
127+
│ └── pinJSON # Pin JSON to IPFS
128+
├── image/[url] # Image proxy
129+
├── discord/contact # Discord notifications
130+
├── ofac/validate/[address] # OFAC compliance check
131+
└── nextjs/revalidate-project # Revalidate cache
132+
```
133+
134+
### Event Webhooks
135+
```
136+
/api/events/
137+
├── on-pay # Payment events
138+
├── on-payout-distributed # Payout events
139+
└── on-user-update # User update events
140+
```
141+
142+
## 🔗 URL Formats
143+
144+
### Project URN Format (v4/v5)
145+
```
146+
/v4/{chain}:{projectId}
147+
/v5/{chain}:{projectId}
148+
149+
Examples:
150+
- /v4/ethereum:123 # Ethereum mainnet project 123
151+
- /v5/sepolia:456 # Sepolia testnet project 456
152+
- /v4/optimism:789 # Optimism project 789
153+
```
154+
155+
### Supported Chains
156+
- `ethereum` (mainnet)
157+
- `sepolia` (testnet)
158+
- `optimism`
159+
- `optimism-sepolia`
160+
- `base`
161+
- `base-sepolia`
162+
- `arbitrum`
163+
- `arbitrum-sepolia`
164+
165+
## 🔄 Route Versioning
166+
167+
The app supports multiple protocol versions:
168+
169+
1. **V2/V3**: Legacy projects at `/v2/p/[projectId]`
170+
2. **V4**: Current stable at `/v4/[jbUrn]`
171+
3. **V5**: Latest version at `/v5/[jbUrn]`
172+
4. **Handle-based**: Version-agnostic at `/p/[handle]`
173+
174+
## 📝 Settings Pages
175+
176+
Common settings pages (available for v2/v3, v4, and v5):
177+
- General settings
178+
- Funding cycle configuration
179+
- Token settings
180+
- NFT rewards
181+
- Payouts & reserved tokens
182+
- Transfer ownership
183+
- Archive project
184+
185+
## 🌐 Sitemap Access
186+
187+
The sitemap.xml is automatically generated and available at:
188+
```
189+
https://juicebox.money/sitemap.xml
190+
```
191+
192+
## 🔍 Navigation Patterns
193+
194+
1. **Project Discovery**: `/projects``/v4/[jbUrn]` or `/v5/[jbUrn]`
195+
2. **Direct Access**: Use handle (`/p/[handle]`) or URN (`/v4/[jbUrn]`)
196+
3. **Settings Flow**: Project page → Settings → Specific setting page
197+
4. **Account Flow**: `/account/[address]``/account/[address]/edit`
198+
199+
## 🎯 Key User Journeys
200+
201+
1. **Create Project**: Home → `/create` → Deploy → `/v5/[jbUrn]`
202+
2. **Discover Projects**: Home → `/projects` → Filter/Search → Project page
203+
3. **Manage Project**: Project page → Settings → Configure → Save
204+
4. **View Activity**: `/activity` → Transaction details
205+
5. **User Profile**: `/account/[address]` → View projects/contributions

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"build": "NEXT_PUBLIC_VERSION=$(git rev-parse --short HEAD) next build",
1212
"analyze": "ANALYZE=true yarn build",
1313
"codegen-v1": "graphql-code-generator --config codegen.yml -r dotenv/config && node ./scripts/graphql-codegen-override-pv.js",
14-
"codegen": "yarn codegen-v1 && yarn codegen-v4",
15-
"codegen-v4": "graphql-code-generator --config src/packages/v4/graphql/codegen.yml -r dotenv/config",
14+
"codegen": "yarn codegen-v1 && yarn codegen-v4v5",
15+
"codegen-v4v5": "graphql-code-generator --config src/packages/v4v5/graphql/codegen.yml -r dotenv/config",
1616
"css:compile": "lessc ./node_modules/antd/dist/antd.less ./src/styles/antd.css --js",
1717
"predev": "yarn css:compile && yarn i18n:compile && yarn codegen",
1818
"dev": "next dev",
@@ -55,9 +55,9 @@
5555
},
5656
"dependencies": {
5757
"@apollo/client": "^3.10.8",
58-
"@getpara/ethers-v5-integration": "2.0.0-alpha.52",
59-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.52",
60-
"@getpara/react-sdk-lite": "2.0.0-alpha.52",
58+
"@getpara/ethers-v5-integration": "2.0.0-alpha.59",
59+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.59",
60+
"@getpara/react-sdk-lite": "2.0.0-alpha.59",
6161
"@headlessui/react": "^1.7.18",
6262
"@heroicons/react": "^2.1.4",
6363
"@jbx-protocol/contracts-v1": "2.0.0",
@@ -112,8 +112,8 @@
112112
"graphql": "^16.8.1",
113113
"he": "^1.2.0",
114114
"jsonwebtoken": "^9.0.0",
115-
"juice-sdk-core": "^1.8.7-beta",
116-
"juice-sdk-react": "^1.9.14-beta",
115+
"juice-sdk-core": "2.1.1",
116+
"juice-sdk-react": "5.0.2",
117117
"juicebox-metadata-helper": "0.1.7",
118118
"less": "4.1.2",
119119
"lodash": "^4.17.21",

src/components/AccountDashboard/AccountDashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import WalletContributionCard from 'components/WalletContributionCard'
1313
import { PV_V4 } from 'constants/pv'
1414
import { BigNumber } from 'ethers'
1515
import { useWalletContributionsQuery } from 'generated/graphql'
16-
import { useWalletContributionsQuery as useV4WalletContributionsQuery } from 'generated/v4/graphql'
16+
import { useWalletContributionsQuery as useV4V5WalletContributionsQuery } from 'generated/v4v5/graphql'
1717
import { useDBProjectsAggregateQuery } from 'hooks/useDBProjects'
1818
import useMobile from 'hooks/useMobile'
1919
import {
@@ -64,7 +64,7 @@ function ContributedList({ address }: { address: string }) {
6464
},
6565
})
6666

67-
const { data: v4Participants } = useV4WalletContributionsQuery({
67+
const { data: v4Participants } = useV4V5WalletContributionsQuery({
6868
client: bendystrawClient,
6969
variables: {
7070
address,

src/components/ActivityListAnyV.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Trans } from '@lingui/macro'
22
import { Divider } from 'antd'
33
import Loading from 'components/Loading'
44
import { ProjectEventsQuery } from 'generated/graphql'
5-
import { useActivityEventsQuery } from 'generated/v4/graphql'
5+
import { useActivityEventsQuery } from 'generated/v4v5/graphql'
66
import { useProjectEvents } from 'hooks/useProjectEvents'
77
import { bendystrawClient } from 'lib/apollo/bendystrawClient'
8-
import { ActivityEvent } from 'packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4ActivityPanel/activityEventElems/ActivityElement'
8+
import { ActivityEvent } from 'packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/activityEventElems/ActivityElement'
99
import {
1010
AnyEvent,
1111
transformEventData,
12-
} from 'packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4ActivityPanel/utils/transformEventsData'
13-
import { translateEventDataToPresenter } from 'packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4ActivityPanel/V4ActivityList'
12+
} from 'packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData'
13+
import { translateEventDataToPresenter } from 'packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList'
1414
import { useMemo } from 'react'
1515
import { AnyProjectEvent } from './activityEventElems/AnyProjectEvent'
1616

src/components/Home/HomepageProjectCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { useProjectMetadata } from 'hooks/useProjectMetadata'
88
import { JBChainId } from 'juice-sdk-react'
99
import { SubgraphQueryProject } from 'models/subgraphProjects'
1010
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
11-
import { ChainLogo } from 'packages/v4/components/ChainLogo'
12-
import { v4ProjectRoute } from 'packages/v4/utils/routes'
11+
import { ChainLogo } from 'packages/v4v5/components/ChainLogo'
12+
import { v4ProjectRoute } from 'packages/v4v5/utils/routes'
1313

1414
function Statistic({
1515
name,

src/components/NftRewards/NftPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ProjectMetadataContext } from 'contexts/ProjectMetadataContext'
77
import useMobile from 'hooks/useMobile'
88
import { NftRewardTier } from 'models/nftRewards'
99
import { DEFAULT_NFT_MAX_SUPPLY } from 'packages/v2v3/constants/nftRewards'
10-
import { RemainingSupplyWithTooltip } from 'packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4NftRewardsPanel/NftReward/RemainingSupplyWithTooltip'
10+
import { RemainingSupplyWithTooltip } from 'packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/NftReward/RemainingSupplyWithTooltip'
1111
import { useContext } from 'react'
1212

1313
export function NftPreview({

src/components/ProjectCard.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as constants from '@ethersproject/constants'
22
import { BookmarkIcon as BookmarkIconSolid } from '@heroicons/react/24/solid'
33
import { Skeleton } from 'antd'
4-
import { PV_V2, PV_V4 } from 'constants/pv'
4+
import { PV_V2, PV_V4, PV_V5 } from 'constants/pv'
55
import { useProjectHandleText } from 'hooks/useProjectHandleText'
66
import { useProjectMetadata } from 'hooks/useProjectMetadata'
77
import { useSubtitle } from 'hooks/useSubtitle'
88
import { DBProjectsAggregate } from 'models/dbProject'
99
import Link from 'next/link'
1010
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
11-
import { ChainLogo } from 'packages/v4/components/ChainLogo'
12-
import { v4ProjectRoute } from 'packages/v4/utils/routes'
11+
import { ChainLogo } from 'packages/v4v5/components/ChainLogo'
12+
import { v4ProjectRoute, v5ProjectRoute } from 'packages/v4v5/utils/routes'
1313
import { isHardArchived } from 'utils/archived'
1414
import { formatDate } from 'utils/format/formatDate'
1515
import { ArchivedBadge } from './ArchivedBadge'
@@ -64,6 +64,11 @@ export default function ProjectCard({
6464
projectId,
6565
chainId,
6666
})
67+
: pv === PV_V5
68+
? v5ProjectRoute({
69+
projectId,
70+
chainId,
71+
})
6772
: pv === PV_V2
6873
? v2v3ProjectRoute({
6974
projectId,

src/components/ProjectPageSEO.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,14 @@ export const V4ProjectSEO: React.FC<{
4949
<ProjectPageSEO metadata={metadata} url={`${SiteBaseUrl}v4/p/${urn}`} />
5050
)
5151
}
52+
53+
export const V5ProjectSEO: React.FC<{
54+
metadata?: ProjectMetadata
55+
chainId: JBChainId
56+
projectId: number
57+
}> = ({ metadata, chainId, projectId }) => {
58+
const urn = toJbUrn(chainId, BigInt(projectId))
59+
return (
60+
<ProjectPageSEO metadata={metadata} url={`${SiteBaseUrl}v5/p/${urn}`} />
61+
)
62+
}

src/components/Projects/ProjectsFilterAndSort.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export default function ProjectsFilterAndSort({
2828
includeV4,
2929
setIncludeV4,
3030

31+
includeV5,
32+
setIncludeV5,
33+
3134
showArchived,
3235
setShowArchived,
3336
searchTags,
@@ -46,6 +49,9 @@ export default function ProjectsFilterAndSort({
4649
includeV4: boolean
4750
setIncludeV4: CheckboxOnChange
4851

52+
includeV5: boolean
53+
setIncludeV5: CheckboxOnChange
54+
4955
showArchived: boolean
5056
setShowArchived: CheckboxOnChange
5157
searchTags: ProjectTagName[]
@@ -173,6 +179,11 @@ export default function ProjectsFilterAndSort({
173179
checked={includeV4}
174180
onChange={setIncludeV4}
175181
/>
182+
<FilterCheckboxItem
183+
label={t`V5`}
184+
checked={includeV5}
185+
onChange={setIncludeV5}
186+
/>
176187
<FilterCheckboxItem
177188
label={t`Archived`}
178189
checked={showArchived}

0 commit comments

Comments
 (0)