create-awarizon-app 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/index.js +154 -0
  2. package/package.json +39 -0
  3. package/templates/expo/.env +1 -0
  4. package/templates/expo/.env.example +3 -0
  5. package/templates/expo/_gitignore +5 -0
  6. package/templates/expo/app/(tabs)/_layout.tsx +24 -0
  7. package/templates/expo/app/(tabs)/index.tsx +79 -0
  8. package/templates/expo/app/_layout.tsx +24 -0
  9. package/templates/expo/app.json +36 -0
  10. package/templates/expo/package.json +35 -0
  11. package/templates/expo/tsconfig.json +8 -0
  12. package/templates/expo-js/.env +1 -0
  13. package/templates/expo-js/.env.example +3 -0
  14. package/templates/expo-js/_gitignore +5 -0
  15. package/templates/expo-js/app/(tabs)/_layout.jsx +24 -0
  16. package/templates/expo-js/app/(tabs)/index.jsx +81 -0
  17. package/templates/expo-js/app/_layout.jsx +24 -0
  18. package/templates/expo-js/app.json +33 -0
  19. package/templates/expo-js/babel.config.js +6 -0
  20. package/templates/expo-js/jsconfig.json +12 -0
  21. package/templates/expo-js/package.json +33 -0
  22. package/templates/nextjs/.env.example +11 -0
  23. package/templates/nextjs/.env.local +4 -0
  24. package/templates/nextjs/_gitignore +6 -0
  25. package/templates/nextjs/app/globals.css +30 -0
  26. package/templates/nextjs/app/layout.tsx +29 -0
  27. package/templates/nextjs/app/page.tsx +168 -0
  28. package/templates/nextjs/components/ui/Badge.tsx +32 -0
  29. package/templates/nextjs/components/ui/Button.tsx +43 -0
  30. package/templates/nextjs/components/ui/Card.tsx +15 -0
  31. package/templates/nextjs/components/ui/Skeleton.tsx +7 -0
  32. package/templates/nextjs/components/ui/StatCard.tsx +24 -0
  33. package/templates/nextjs/lib/awarizon.ts +8 -0
  34. package/templates/nextjs/lib/utils.ts +3 -0
  35. package/templates/nextjs/next.config.ts +7 -0
  36. package/templates/nextjs/package.json +29 -0
  37. package/templates/nextjs/postcss.config.js +6 -0
  38. package/templates/nextjs/tailwind.config.ts +19 -0
  39. package/templates/nextjs/tsconfig.json +21 -0
  40. package/templates/nextjs-js/.env.example +11 -0
  41. package/templates/nextjs-js/.env.local +4 -0
  42. package/templates/nextjs-js/_gitignore +5 -0
  43. package/templates/nextjs-js/app/globals.css +30 -0
  44. package/templates/nextjs-js/app/layout.jsx +29 -0
  45. package/templates/nextjs-js/app/page.jsx +141 -0
  46. package/templates/nextjs-js/components/ui/Badge.jsx +24 -0
  47. package/templates/nextjs-js/components/ui/Button.jsx +25 -0
  48. package/templates/nextjs-js/components/ui/Card.jsx +9 -0
  49. package/templates/nextjs-js/components/ui/Skeleton.jsx +7 -0
  50. package/templates/nextjs-js/components/ui/StatCard.jsx +16 -0
  51. package/templates/nextjs-js/jsconfig.json +21 -0
  52. package/templates/nextjs-js/lib/awarizon.js +7 -0
  53. package/templates/nextjs-js/lib/utils.js +3 -0
  54. package/templates/nextjs-js/next.config.js +6 -0
  55. package/templates/nextjs-js/package.json +25 -0
  56. package/templates/nextjs-js/postcss.config.js +6 -0
  57. package/templates/nextjs-js/tailwind.config.js +16 -0
  58. package/templates/react/.env +1 -0
  59. package/templates/react/.env.example +7 -0
  60. package/templates/react/_gitignore +3 -0
  61. package/templates/react/index.html +12 -0
  62. package/templates/react/package.json +28 -0
  63. package/templates/react/postcss.config.js +6 -0
  64. package/templates/react/src/App.tsx +166 -0
  65. package/templates/react/src/components/ui/Badge.tsx +32 -0
  66. package/templates/react/src/components/ui/Button.tsx +43 -0
  67. package/templates/react/src/components/ui/Card.tsx +15 -0
  68. package/templates/react/src/components/ui/Skeleton.tsx +7 -0
  69. package/templates/react/src/components/ui/StatCard.tsx +24 -0
  70. package/templates/react/src/index.css +30 -0
  71. package/templates/react/src/lib/utils.ts +3 -0
  72. package/templates/react/src/main.tsx +22 -0
  73. package/templates/react/tailwind.config.js +15 -0
  74. package/templates/react/tsconfig.app.json +20 -0
  75. package/templates/react/tsconfig.json +7 -0
  76. package/templates/react/tsconfig.node.json +15 -0
  77. package/templates/react/vite.config.ts +6 -0
  78. package/templates/react-js/.env +1 -0
  79. package/templates/react-js/.env.example +7 -0
  80. package/templates/react-js/_gitignore +3 -0
  81. package/templates/react-js/index.html +12 -0
  82. package/templates/react-js/jsconfig.json +14 -0
  83. package/templates/react-js/package.json +25 -0
  84. package/templates/react-js/postcss.config.js +6 -0
  85. package/templates/react-js/src/App.jsx +139 -0
  86. package/templates/react-js/src/components/ui/Badge.jsx +24 -0
  87. package/templates/react-js/src/components/ui/Button.jsx +25 -0
  88. package/templates/react-js/src/components/ui/Card.jsx +9 -0
  89. package/templates/react-js/src/components/ui/Skeleton.jsx +7 -0
  90. package/templates/react-js/src/components/ui/StatCard.jsx +16 -0
  91. package/templates/react-js/src/index.css +30 -0
  92. package/templates/react-js/src/lib/utils.js +3 -0
  93. package/templates/react-js/src/main.jsx +22 -0
  94. package/templates/react-js/tailwind.config.js +15 -0
  95. package/templates/react-js/vite.config.js +6 -0
@@ -0,0 +1,11 @@
1
+ # Get your API key at https://awarizon.com/dashboard/api-keys
2
+
3
+ # Server-side only (API routes, Server Components)
4
+ AWARIZON_API_KEY={{API_KEY}}
5
+
6
+ # Client-side (browser, Client Components)
7
+ NEXT_PUBLIC_AWARIZON_API_KEY={{API_KEY}}
8
+
9
+ # Optional: enable WalletConnect for mobile wallet support (ConnectButton)
10
+ # Get a free project ID at https://cloud.walletconnect.com
11
+ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
@@ -0,0 +1,4 @@
1
+ # Get your API key at https://awarizon.com/dashboard/api-keys
2
+
3
+ AWARIZON_API_KEY={{API_KEY}}
4
+ NEXT_PUBLIC_AWARIZON_API_KEY={{API_KEY}}
@@ -0,0 +1,6 @@
1
+ .env.local
2
+ .env
3
+ node_modules/
4
+ .next/
5
+ out/
6
+ dist/
@@ -0,0 +1,30 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ * {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ body {
11
+ @apply bg-zinc-950 text-zinc-100 antialiased;
12
+ }
13
+
14
+ ::selection {
15
+ @apply bg-yellow-400/20 text-yellow-200;
16
+ }
17
+
18
+ ::-webkit-scrollbar {
19
+ width: 6px;
20
+ height: 6px;
21
+ }
22
+
23
+ ::-webkit-scrollbar-track {
24
+ @apply bg-zinc-950;
25
+ }
26
+
27
+ ::-webkit-scrollbar-thumb {
28
+ @apply bg-zinc-700 rounded-full;
29
+ }
30
+ }
@@ -0,0 +1,29 @@
1
+ import type { Metadata } from 'next'
2
+ import { AwarizonProvider } from '@awarizon/react'
3
+ import './globals.css'
4
+
5
+ export const metadata: Metadata = {
6
+ title: '{{ProjectName}}',
7
+ description: 'Built with the Awarizon Web3 SDK',
8
+ }
9
+
10
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
11
+ return (
12
+ <html lang="en">
13
+ <body>
14
+ {/*
15
+ AwarizonProvider makes the SDK available to all Client Components.
16
+ chain: the EVM network to connect to (base, ethereum, polygon, etc.)
17
+ apiKey: your Awarizon API key — get one at awarizon.com/dashboard/api-keys
18
+ */}
19
+ <AwarizonProvider
20
+ chain="base"
21
+ apiKey={process.env.NEXT_PUBLIC_AWARIZON_API_KEY!}
22
+ walletConnectProjectId={process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID}
23
+ >
24
+ {children}
25
+ </AwarizonProvider>
26
+ </body>
27
+ </html>
28
+ )
29
+ }
@@ -0,0 +1,168 @@
1
+ 'use client'
2
+
3
+ import { useReadContract, ConnectButton } from '@awarizon/react'
4
+ import { ERC20_ABI } from '@awarizon/web3'
5
+ import { Badge } from '@/components/ui/Badge'
6
+ import { Button } from '@/components/ui/Button'
7
+ import { Card } from '@/components/ui/Card'
8
+ import { Skeleton } from '@/components/ui/Skeleton'
9
+ import { StatCard } from '@/components/ui/StatCard'
10
+
11
+ const USDC_BASE = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
12
+
13
+ function DataRow({ label, value, loading }: { label: string; value?: string; loading: boolean }) {
14
+ return (
15
+ <div className="flex items-center justify-between py-3 border-b border-zinc-800/50 last:border-0">
16
+ <code className="text-[11px] text-yellow-400/70 font-mono">{label}</code>
17
+ {loading
18
+ ? <Skeleton className="h-3.5 w-28" />
19
+ : <span className="font-mono text-xs text-zinc-300">{value ?? '—'}</span>}
20
+ </div>
21
+ )
22
+ }
23
+
24
+ export default function Home() {
25
+ const { data: name, isLoading: l1 } = useReadContract({ address: USDC_BASE, abi: ERC20_ABI, method: 'name' })
26
+ const { data: symbol, isLoading: l2 } = useReadContract({ address: USDC_BASE, abi: ERC20_ABI, method: 'symbol' })
27
+ const { data: decimals, isLoading: l3 } = useReadContract({ address: USDC_BASE, abi: ERC20_ABI, method: 'decimals' })
28
+ const { data: totalSupply, isLoading: l4 } = useReadContract({ address: USDC_BASE, abi: ERC20_ABI, method: 'totalSupply' })
29
+
30
+ const formatted =
31
+ totalSupply !== undefined && decimals !== undefined
32
+ ? (Number(totalSupply as bigint) / 10 ** Number(decimals as bigint))
33
+ .toLocaleString(undefined, { maximumFractionDigits: 2 })
34
+ : undefined
35
+
36
+ const synced = !l1 && !l2 && !l3 && !l4
37
+
38
+ return (
39
+ <div className="min-h-screen bg-zinc-950 text-zinc-100">
40
+
41
+ {/* ── Header ─────────────────────────────────────── */}
42
+ <header className="sticky top-0 z-10 border-b border-zinc-800/60 bg-zinc-950/80 backdrop-blur-sm px-6 py-4">
43
+ <div className="max-w-4xl mx-auto flex items-center justify-between">
44
+ <div className="flex items-center gap-2.5">
45
+ <div className="w-5 h-5 rounded-[4px] bg-yellow-400" />
46
+ <span className="font-mono text-[11px] tracking-[0.2em] text-zinc-400 uppercase">
47
+ {{project-name}}
48
+ </span>
49
+ </div>
50
+ <div className="flex items-center gap-3">
51
+ <Badge variant="outline">Base</Badge>
52
+ <Badge variant={synced ? 'success' : 'loading'}>
53
+ {synced ? '● Live' : '○ Loading'}
54
+ </Badge>
55
+ <ConnectButton />
56
+ </div>
57
+ </div>
58
+ </header>
59
+
60
+ <main className="max-w-4xl mx-auto px-6 py-12">
61
+
62
+ {/* ── Hero ───────────────────────────────────────── */}
63
+ <div className="mb-10">
64
+ <Badge variant="outline" className="mb-5">Awarizon Web3 SDK · Next.js</Badge>
65
+ <h1 className="text-4xl font-bold tracking-tight text-white mb-3">{{ProjectName}}</h1>
66
+ <p className="text-zinc-400 text-base max-w-lg leading-relaxed">
67
+ Live on-chain reads from Base — no backend required. Built with{' '}
68
+ <code className="font-mono text-[11px] text-yellow-400/80">@awarizon/react</code>.
69
+ </p>
70
+ </div>
71
+
72
+ {/* ── Data grid ──────────────────────────────────── */}
73
+ <div className="grid md:grid-cols-3 gap-4 mb-4">
74
+
75
+ {/* Contract reader — spans 2 cols */}
76
+ <Card className="md:col-span-2">
77
+ <div className="flex items-start justify-between mb-4">
78
+ <div>
79
+ <p className="font-mono text-[9px] tracking-widest text-zinc-600 uppercase mb-1.5">
80
+ Contract · Live Read
81
+ </p>
82
+ <code className="font-mono text-xs text-zinc-500">
83
+ 0x8335…2913 · Base
84
+ </code>
85
+ </div>
86
+ <Badge variant={synced ? 'success' : 'loading'}>
87
+ {synced ? 'Synced' : 'Fetching…'}
88
+ </Badge>
89
+ </div>
90
+ <DataRow label="name()" value={name as string} loading={l1} />
91
+ <DataRow label="symbol()" value={symbol as string} loading={l2} />
92
+ <DataRow label="decimals()" value={String(decimals ?? '')} loading={l3} />
93
+ <DataRow label="totalSupply()" value={formatted} loading={l4} />
94
+ </Card>
95
+
96
+ {/* Stat column */}
97
+ <div className="flex flex-col gap-4">
98
+ <StatCard
99
+ label="Total Supply"
100
+ value={formatted}
101
+ loading={l4}
102
+ sub="USDC · formatted"
103
+ className="flex-1"
104
+ />
105
+ <StatCard
106
+ label="Token"
107
+ value={symbol as string}
108
+ loading={l2}
109
+ sub="Base mainnet"
110
+ className="flex-1"
111
+ />
112
+ </div>
113
+ </div>
114
+
115
+ {/* ── Network info ────────────────────────────────── */}
116
+ <div className="grid sm:grid-cols-3 gap-4 mb-4">
117
+ {[
118
+ { label: 'Network', value: 'Base Mainnet' },
119
+ { label: 'Chain ID', value: '8453' },
120
+ { label: 'SDK', value: '@awarizon/react' },
121
+ ].map(({ label, value }) => (
122
+ <div
123
+ key={label}
124
+ className="bg-zinc-900/50 border border-zinc-800/40 rounded-xl px-5 py-4 flex items-center justify-between"
125
+ >
126
+ <span className="font-mono text-[10px] text-zinc-600 uppercase tracking-widest">{label}</span>
127
+ <code className="font-mono text-xs text-zinc-400">{value}</code>
128
+ </div>
129
+ ))}
130
+ </div>
131
+
132
+ {/* ── Next steps ──────────────────────────────────── */}
133
+ <Card>
134
+ <p className="font-mono text-[9px] tracking-widest text-zinc-600 uppercase mb-4">
135
+ Next Steps
136
+ </p>
137
+ <ul className="space-y-3 mb-6">
138
+ {[
139
+ ['01', 'Replace USDC_BASE with your contract address'],
140
+ ['02', 'Swap ERC20_ABI for your contract ABI'],
141
+ ['03', 'Change chain="base" in app/layout.tsx to your target network'],
142
+ ['04', 'Use useWriteContract() for send transactions'],
143
+ ['05', 'Add walletConnectProjectId to AwarizonProvider for mobile wallet support'],
144
+ ].map(([n, s]) => (
145
+ <li key={n} className="flex items-start gap-3">
146
+ <span className="font-mono text-[10px] text-yellow-400/50 mt-0.5 shrink-0 select-none">{n}</span>
147
+ <span className="text-sm text-zinc-400 leading-relaxed">{s}</span>
148
+ </li>
149
+ ))}
150
+ </ul>
151
+ <div className="flex flex-wrap gap-2">
152
+ <Button href="https://awarizon.com/docs" target="_blank" rel="noreferrer">
153
+ Read the docs →
154
+ </Button>
155
+ <Button
156
+ href="https://awarizon.com/dashboard"
157
+ target="_blank"
158
+ rel="noreferrer"
159
+ variant="secondary"
160
+ >
161
+ Dashboard
162
+ </Button>
163
+ </div>
164
+ </Card>
165
+ </main>
166
+ </div>
167
+ )
168
+ }
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react'
2
+ import { cn } from '@/lib/utils'
3
+
4
+ type BadgeVariant = 'default' | 'success' | 'loading' | 'warning' | 'outline'
5
+
6
+ interface BadgeProps {
7
+ children: ReactNode
8
+ variant?: BadgeVariant
9
+ className?: string
10
+ }
11
+
12
+ const variants: Record<BadgeVariant, string> = {
13
+ default: 'bg-zinc-800 text-zinc-400',
14
+ success: 'bg-emerald-500/10 text-emerald-400 border border-emerald-500/20',
15
+ loading: 'bg-yellow-500/10 text-yellow-400 border border-yellow-500/20',
16
+ warning: 'bg-amber-500/10 text-amber-400 border border-amber-500/20',
17
+ outline: 'border border-zinc-700 text-zinc-400',
18
+ }
19
+
20
+ export function Badge({ children, variant = 'default', className }: BadgeProps) {
21
+ return (
22
+ <span
23
+ className={cn(
24
+ 'inline-flex items-center font-mono text-[10px] tracking-widest px-2 py-1 rounded-md uppercase',
25
+ variants[variant],
26
+ className,
27
+ )}
28
+ >
29
+ {children}
30
+ </span>
31
+ )
32
+ }
@@ -0,0 +1,43 @@
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react'
2
+ import { cn } from '@/lib/utils'
3
+
4
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost'
5
+
6
+ const variants: Record<ButtonVariant, string> = {
7
+ primary: 'bg-yellow-400 text-black hover:bg-yellow-300 active:bg-yellow-500',
8
+ secondary: 'bg-zinc-800 text-zinc-200 border border-zinc-700 hover:bg-zinc-700 hover:text-white',
9
+ ghost: 'text-zinc-400 hover:text-white',
10
+ }
11
+
12
+ const base = 'inline-flex items-center gap-1.5 font-mono text-[11px] tracking-widest px-4 py-2.5 rounded-lg transition-colors cursor-pointer'
13
+
14
+ interface AsAnchorProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
15
+ href: string
16
+ variant?: ButtonVariant
17
+ children: ReactNode
18
+ }
19
+
20
+ interface AsButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
21
+ href?: never
22
+ variant?: ButtonVariant
23
+ children: ReactNode
24
+ }
25
+
26
+ type ButtonProps = AsAnchorProps | AsButtonProps
27
+
28
+ export function Button({ variant = 'primary', className, children, ...props }: ButtonProps) {
29
+ if ('href' in props && props.href !== undefined) {
30
+ const { href, ...rest } = props as AsAnchorProps
31
+ return (
32
+ <a href={href} className={cn(base, variants[variant], className)} {...rest}>
33
+ {children}
34
+ </a>
35
+ )
36
+ }
37
+ const { ...rest } = props as AsButtonProps
38
+ return (
39
+ <button type="button" className={cn(base, variants[variant], className)} {...rest}>
40
+ {children}
41
+ </button>
42
+ )
43
+ }
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react'
2
+ import { cn } from '@/lib/utils'
3
+
4
+ interface CardProps {
5
+ children: ReactNode
6
+ className?: string
7
+ }
8
+
9
+ export function Card({ children, className }: CardProps) {
10
+ return (
11
+ <div className={cn('bg-zinc-900 border border-zinc-800/60 rounded-xl p-5', className)}>
12
+ {children}
13
+ </div>
14
+ )
15
+ }
@@ -0,0 +1,7 @@
1
+ import { cn } from '@/lib/utils'
2
+
3
+ export function Skeleton({ className }: { className?: string }) {
4
+ return (
5
+ <div className={cn('animate-pulse rounded-md bg-zinc-800', className)} />
6
+ )
7
+ }
@@ -0,0 +1,24 @@
1
+ import { cn } from '@/lib/utils'
2
+ import { Skeleton } from './Skeleton'
3
+
4
+ interface StatCardProps {
5
+ label: string
6
+ value?: string
7
+ sub?: string
8
+ loading?: boolean
9
+ className?: string
10
+ }
11
+
12
+ export function StatCard({ label, value, sub, loading, className }: StatCardProps) {
13
+ return (
14
+ <div className={cn('bg-zinc-900 border border-zinc-800/60 rounded-xl p-5 flex flex-col', className)}>
15
+ <p className="font-mono text-[9px] tracking-widest text-zinc-600 uppercase mb-3">{label}</p>
16
+ {loading
17
+ ? <Skeleton className="h-7 w-3/4" />
18
+ : <p className="font-mono text-xl font-semibold text-white truncate">{value ?? '—'}</p>}
19
+ {sub && (
20
+ <p className="font-mono text-[10px] text-zinc-600 mt-2">{sub}</p>
21
+ )}
22
+ </div>
23
+ )
24
+ }
@@ -0,0 +1,8 @@
1
+ import { AwarizonWeb3 } from '@awarizon/web3'
2
+
3
+ // Server-side SDK instance (Server Components, API routes, server actions)
4
+ // Uses the secret key — never exposed to the browser
5
+ export const awz = new AwarizonWeb3({
6
+ chain: 'base',
7
+ apiKey: process.env.AWARIZON_API_KEY!,
8
+ })
@@ -0,0 +1,3 @@
1
+ export function cn(...classes: (string | undefined | null | false)[]) {
2
+ return classes.filter(Boolean).join(' ')
3
+ }
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from 'next'
2
+
3
+ const config: NextConfig = {
4
+ reactStrictMode: true,
5
+ }
6
+
7
+ export default config
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "{{project-name}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "@awarizon/react": "latest",
13
+ "@awarizon/web3": "latest",
14
+ "next": "14.2.5",
15
+ "react": "^18",
16
+ "react-dom": "^18"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^20",
20
+ "@types/react": "^18",
21
+ "@types/react-dom": "^18",
22
+ "typescript": "^5",
23
+ "eslint": "^8",
24
+ "eslint-config-next": "14.2.5",
25
+ "autoprefixer": "^10.4.19",
26
+ "postcss": "^8.4.38",
27
+ "tailwindcss": "^3.4.4"
28
+ }
29
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -0,0 +1,19 @@
1
+ import type { Config } from 'tailwindcss'
2
+
3
+ const config: Config = {
4
+ content: [
5
+ './app/**/*.{ts,tsx}',
6
+ './components/**/*.{ts,tsx}',
7
+ './lib/**/*.{ts,tsx}',
8
+ ],
9
+ theme: {
10
+ extend: {
11
+ colors: {
12
+ accent: '#FFE500',
13
+ },
14
+ },
15
+ },
16
+ plugins: [],
17
+ }
18
+
19
+ export default config
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": { "@/*": ["./*"] }
18
+ },
19
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
20
+ "exclude": ["node_modules"]
21
+ }
@@ -0,0 +1,11 @@
1
+ # Get your API key at https://awarizon.com/dashboard/api-keys
2
+
3
+ # Server-side only (API routes, Server Components)
4
+ AWARIZON_API_KEY={{API_KEY}}
5
+
6
+ # Client-side (browser, Client Components)
7
+ NEXT_PUBLIC_AWARIZON_API_KEY={{API_KEY}}
8
+
9
+ # Optional: enable WalletConnect for mobile wallet support (ConnectButton)
10
+ # Get a free project ID at https://cloud.walletconnect.com
11
+ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
@@ -0,0 +1,4 @@
1
+ # Get your API key at https://awarizon.com/dashboard/api-keys
2
+
3
+ AWARIZON_API_KEY={{API_KEY}}
4
+ NEXT_PUBLIC_AWARIZON_API_KEY={{API_KEY}}
@@ -0,0 +1,5 @@
1
+ .next/
2
+ node_modules/
3
+ .env.local
4
+ .env
5
+ dist/
@@ -0,0 +1,30 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ * {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ body {
11
+ @apply bg-zinc-950 text-zinc-100 antialiased;
12
+ }
13
+
14
+ ::selection {
15
+ @apply bg-yellow-400/20 text-yellow-200;
16
+ }
17
+
18
+ ::-webkit-scrollbar {
19
+ width: 6px;
20
+ height: 6px;
21
+ }
22
+
23
+ ::-webkit-scrollbar-track {
24
+ @apply bg-zinc-950;
25
+ }
26
+
27
+ ::-webkit-scrollbar-thumb {
28
+ @apply bg-zinc-700 rounded-full;
29
+ }
30
+ }
@@ -0,0 +1,29 @@
1
+ import { AwarizonProvider } from '@awarizon/react'
2
+ import './globals.css'
3
+
4
+ /** @type {import('next').Metadata} */
5
+ export const metadata = {
6
+ title: '{{ProjectName}}',
7
+ description: 'Built with the Awarizon Web3 SDK',
8
+ }
9
+
10
+ export default function RootLayout({ children }) {
11
+ return (
12
+ <html lang="en">
13
+ <body>
14
+ {/*
15
+ AwarizonProvider makes the SDK available to all Client Components.
16
+ chain: the EVM network to connect to (base, ethereum, polygon, etc.)
17
+ apiKey: your Awarizon API key — get one at awarizon.com/dashboard/api-keys
18
+ */}
19
+ <AwarizonProvider
20
+ chain="base"
21
+ apiKey={process.env.NEXT_PUBLIC_AWARIZON_API_KEY}
22
+ walletConnectProjectId={process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID}
23
+ >
24
+ {children}
25
+ </AwarizonProvider>
26
+ </body>
27
+ </html>
28
+ )
29
+ }