Skip to content

Commit a2afea9

Browse files
authored
Release 1.0.0 (#28)
2 parents 10635f6 + 485ec0a commit a2afea9

Some content is hidden

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

73 files changed

+3237
-3929
lines changed

.env.example

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
# Environment variables
22

33
# Required: Set the base URL of the application. Mostly used for the SEO tags. No trailing slash.
4-
NEXT_PUBLIC_BASE_URL=
4+
NEXT_PUBLIC_BASE_URL=http://localhost:3005
55

66
# ------ Dev ------
77

88
# Optional: Set the dev mode ("true" or "false"). Default to "false".
99
NEXT_PUBLIC_DEV_MODE=false
1010

11+
# ------ Telemetry ------
12+
13+
# Optional: Set the log level ("error", "warn", "info", "debug"). Default to "info".
14+
NEXT_PUBLIC_LOG_LEVEL=info
15+
1116
# ------ Verida Network ------
1217

1318
# Optional: Set the Verida Network ("myrtle", "banksia", "devnet", "local"). Default to "banksia".
1419
NEXT_PUBLIC_VERIDA_NETWORK=banksia
1520

16-
# Optional: Set the Verida RPC URL. Default to the SDK default public RPC URL. Strongly suggested to set a custom paid one for reliability. Production deployments should set this.
17-
NEXT_PUBLIC_VERIDA_RPC_URL=
21+
# Required: Set the Verida DID for this application. Required for Verida auth.
22+
NEXT_PUBLIC_VERIDA_APP_DID=
1823

1924
# Data connector server URL
2025
NEXT_PUBLIC_DCS_URL=
2126

2227
# Endpoint to initiate auth consent for API token with Verida Vault
23-
NEXT_PUBLIC_VAULT_AUTH_ENDPOINT=
28+
NEXT_PUBLIC_VAULT_AUTH_ENDPOINT=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Run the development server:
2424
yarn run dev
2525
```
2626

27-
The application will be available at [http://localhost:3000](http://localhost:3000)
27+
The application will be available at [http://localhost:3005](http://localhost:3005)

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const config = [
2525
rules: {
2626
"@typescript-eslint/no-explicit-any": "warn",
2727
"@typescript-eslint/no-unused-vars": "warn",
28+
"@typescript-eslint/no-empty-object-type": "off",
2829
"no-console": "warn",
2930
"prettier/prettier": "warn",
3031
},

next.config.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@ const nextConfig: NextConfig = {
55
// TODO: Enable the check again. This is now to disable next.js checking node_modules type errors on building the app
66
ignoreBuildErrors: true,
77
},
8-
webpack: (config, { isServer }) => {
8+
webpack: (config) => {
99
config.node = {
1010
__dirname: true,
1111
}
1212

13-
config.module.rules.push({
14-
test: /\.(woff|woff2|eot|ttf|otf)$/,
15-
use: {
16-
loader: "file-loader",
17-
options: {
18-
name: "[name].[ext]",
19-
publicPath: "/_next/static/fonts/",
20-
outputPath: `${isServer ? "../" : ""}static/fonts/`,
21-
},
22-
},
23-
})
24-
2513
return config
2614
},
2715
images: {

package.json

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "react-app-template",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"version": "npx genversion --es6 --double ./src/config/version.ts",
77
"postinstall": "yarn run version",
88
"predev": "yarn run version",
9-
"dev": "next dev",
9+
"dev": "next dev -p 3005",
1010
"prebuild": "yarn run version",
1111
"build": "next build",
1212
"prestart": "yarn run version",
@@ -20,58 +20,58 @@
2020
"fix": "yarn run fix:format && yarn run fix:lint"
2121
},
2222
"dependencies": {
23-
"@headlessui/react": "^2.2.0",
24-
"@radix-ui/react-alert-dialog": "^1.1.5",
25-
"@radix-ui/react-avatar": "^1.1.2",
26-
"@radix-ui/react-checkbox": "^1.1.3",
27-
"@radix-ui/react-context-menu": "^2.2.5",
23+
"@radix-ui/react-accordion": "^1.2.10",
24+
"@radix-ui/react-alert-dialog": "^1.1.13",
25+
"@radix-ui/react-avatar": "^1.1.9",
26+
"@radix-ui/react-checkbox": "^1.3.1",
27+
"@radix-ui/react-context-menu": "^2.2.14",
2828
"@radix-ui/react-dialog": "^1.1.5",
29-
"@radix-ui/react-dropdown-menu": "^2.1.5",
30-
"@radix-ui/react-label": "^2.1.1",
31-
"@radix-ui/react-popover": "^1.1.5",
32-
"@radix-ui/react-select": "^2.1.5",
33-
"@radix-ui/react-separator": "^1.1.1",
29+
"@radix-ui/react-dropdown-menu": "^2.1.14",
30+
"@radix-ui/react-label": "^2.1.6",
31+
"@radix-ui/react-popover": "^1.1.13",
32+
"@radix-ui/react-select": "^2.2.4",
33+
"@radix-ui/react-separator": "^1.1.6",
3434
"@radix-ui/react-slot": "^1.1.1",
35-
"@radix-ui/react-switch": "^1.1.2",
36-
"@radix-ui/react-tooltip": "^1.1.7",
37-
"@verida/types": "^4.4.0",
38-
"@verida/web-helpers": "^4.4.1",
35+
"@radix-ui/react-switch": "^1.2.4",
36+
"@radix-ui/react-tooltip": "^1.2.6",
37+
"@tanstack/query-sync-storage-persister": "^5.75.5",
38+
"@tanstack/react-query": "^5.75.5",
39+
"@tanstack/react-query-persist-client": "^5.75.5",
3940
"class-variance-authority": "^0.7.1",
4041
"clsx": "^2.1.1",
4142
"genversion": "^3.2.0",
42-
"lucide-react": "^0.474.0",
43-
"next": "^15.1.6",
44-
"next-themes": "^0.4.4",
45-
"nuqs": "^2.3.1",
46-
"react": "^19.0.0",
47-
"react-dom": "^19.0.0",
43+
"lucide-react": "^0.507.0",
44+
"next": "^15.3.2",
45+
"next-themes": "^0.4.6",
46+
"nuqs": "^2.4.3",
47+
"react": "^19.1.0",
48+
"react-dom": "^19.1.0",
4849
"react-markdown": "^9.0.3",
4950
"tailwind-merge": "^2.6.0",
5051
"tailwindcss-animate": "^1.0.7",
51-
"usehooks-ts": "^3.1.0",
52+
"usehooks-ts": "^3.1.1",
5253
"zod": "^3.24.1"
5354
},
5455
"devDependencies": {
55-
"@eslint/eslintrc": "^3.2.0",
56+
"@eslint/eslintrc": "^3.3.1",
5657
"@tailwindcss/container-queries": "^0.1.1",
5758
"@tailwindcss/forms": "^0.5.10",
59+
"@tanstack/react-query-devtools": "^5.75.5",
5860
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
59-
"@types/node": "^22.12.0",
60-
"@types/react": "^19.0.8",
61-
"@types/react-dom": "^19.0.3",
62-
"autoprefixer": "^10.4.20",
63-
"eslint": "^9.19.0",
64-
"eslint-config-next": "^15.1.6",
65-
"eslint-config-prettier": "^10.0.1",
66-
"eslint-plugin-prettier": "^5.2.3",
61+
"@types/node": "^22.15.14",
62+
"@types/react": "^19.1.3",
63+
"@types/react-dom": "^19.1.3",
64+
"@verida/types": "^4.4.1",
65+
"autoprefixer": "^10.4.21",
66+
"eslint": "^9.26.0",
67+
"eslint-config-next": "^15.3.2",
68+
"eslint-config-prettier": "^10.1.3",
69+
"eslint-plugin-prettier": "^5.4.0",
6770
"file-loader": "^6.2.0",
68-
"postcss": "^8.5.1",
69-
"prettier": "^3.4.2",
71+
"postcss": "^8.5.3",
72+
"prettier": "^3.5.3",
7073
"prettier-plugin-tailwindcss": "^0.6.11",
7174
"tailwindcss": "^3.4.17",
72-
"typescript": "^5.7.3"
73-
},
74-
"resolutions": {
75-
"qrcode-with-logos": "1.0.3"
75+
"typescript": "^5.8.3"
7676
}
7777
}

public/fonts/Sora-Regular.ttf

-56.3 KB
Binary file not shown.
-16.3 KB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function CreditsLoading() {
2+
return <div>Loading...</div>
3+
}
4+
CreditsLoading.displayName = "CreditsLoading"

src/app/(connected)/credits/page.tsx

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
"use client"
22

3-
import { useEffect, useState } from "react"
3+
import { useCallback, useEffect, useState } from "react"
44

55
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
66
import { Button } from "@/components/ui/button"
77
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
8-
// shadcn/ui components (adjust imports to match your actual setup)
98
import { Input } from "@/components/ui/input"
109
import { Label } from "@/components/ui/label"
10+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1111
import { getAccount, getVdaPrice, submitDeposit } from "@/features/dcs/api"
1212
import type { BillingAccount } from "@/features/dcs/interfaces"
1313
import { accountBalance, accountCredits } from "@/features/dcs/utils"
14-
import { useVerida } from "@/features/verida/hooks/use-verida"
1514

1615
// Regex for validating Ethereum/Polygon addresses
1716
const ethAddressRegex = /^0x[a-fA-F0-9]{40}$/
1817

1918
export default function CreditsPage() {
20-
const { getAccountSessionToken, webUserInstanceRef } = useVerida()
21-
2219
// Track current step (1 or 2)
2320
const [step, setStep] = useState<number>(1)
2421

@@ -83,54 +80,56 @@ export default function CreditsPage() {
8380
}
8481

8582
// If we get here, we have transactionHash
86-
const sessionToken = await getAccountSessionToken()
87-
const veridaAccount = webUserInstanceRef.current.getAccount()
83+
// const sessionToken = await getAccountSessionToken()
8884

8985
try {
90-
await submitDeposit(
91-
veridaAccount,
92-
sessionToken,
93-
walletAddress,
94-
tokenAmount,
95-
transactionHash
96-
)
86+
// await submitDeposit(
87+
// veridaAccount,
88+
// sessionToken,
89+
// walletAddress,
90+
// tokenAmount,
91+
// transactionHash
92+
// )
9793

9894
// Reload account so new credits are displayed
99-
await loadAccount()
95+
// await loadAccount()
10096

10197
// Reset the form
10298
setWalletAddress("")
10399
setTokenAmount("")
104100
setTransactionHash("")
105101
handleBack()
106-
} catch (err: any) {
107-
setSubmitError(`${err.message}`)
102+
} catch (error) {
103+
setSubmitError(
104+
error instanceof Error ? error.message : "An unknown error occurred"
105+
)
108106
}
109107
}
110108

111-
async function loadAccount() {
112-
const sessionToken = await getAccountSessionToken()
113-
const account = await getAccount(sessionToken)
109+
// const loadAccount = useCallback(async () => {
110+
// // const sessionToken = await getAccountSessionToken()
111+
// const account = await getAccount(sessionToken)
114112

115-
if (account) {
116-
setAccount(account)
117-
const credits = await accountCredits(sessionToken, account)
118-
console.log(credits)
119-
if (credits) {
120-
setCredits(credits)
121-
}
122-
}
123-
}
113+
// if (account) {
114+
// setAccount(account)
115+
// const credits = await accountCredits(sessionToken, account)
116+
// // eslint-disable-next-line no-console -- TODO: Replace with Logger
117+
// console.log(credits)
118+
// if (credits) {
119+
// setCredits(credits)
120+
// }
121+
// }
122+
// }, [])
124123

125124
// A function that does something on mount
126-
async function onLoad() {
127-
await loadAccount()
128-
}
125+
const onLoad = useCallback(async () => {
126+
// await loadAccount()
127+
}, [])
129128

130129
// Run the function once, when the component mounts
131130
useEffect(() => {
132131
onLoad()
133-
}, [])
132+
}, [onLoad])
134133

135134
return (
136135
<div className="p-6">
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function DashboardLoading() {
2+
return <div>Loading...</div>
3+
}
4+
DashboardLoading.displayName = "DashboardLoading"

0 commit comments

Comments
 (0)