Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
NEXT_PUBLIC_API_KEY=
NEXT_PUBLIC_MIX_PANEL_TOKEN=
VITE_API_KEY=
VITE_MIX_PANEL_TOKEN=
VITE_ENABLE_REFERRAL_CHECK=
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
checks:
name: Lint and build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install mise
run: |
curl https://mise.run | MISE_VERSION=v2026.5.6 sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"
mise install

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

# dependencies
/node_modules
.pnpm-store/

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/dist

# misc
.DS_Store
Expand All @@ -21,6 +19,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
Expand All @@ -30,7 +29,6 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts

.env

Expand All @@ -41,4 +39,4 @@ next-env.d.ts
!.yarn/releases
!.yarn/sdks
!.yarn/versions
certificates
certificates
69 changes: 35 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
**This** is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# StakeKit Safe App

## Getting Started
The standalone StakeKit dApp, a [Vite](https://vite.dev/)-powered React SPA that
embeds the `@stakekit/widget`.

### Installation
## Prerequisites

Use correct node version
Tool versions are pinned via [mise](https://mise.jdx.dev/). Install the toolchain
(Node.js + pnpm) with:

```bash
nvm use
mise install
```

Install dependencies
## Getting Started

Install dependencies:

```bash
npm install
# or
yarn install
# or
pnpm install
```

### Run development app
Set up environment variables:

```bash
cp .env.example .env
```

Run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:3002](http://localhost:3002) with your browser to see the
result.

### Run production app
## Scripts

Create production build
- `pnpm dev` — Start the Vite development server on port 3002
- `pnpm build` — Build the production bundle into `dist/`
- `pnpm start` — Preview the production build locally
- `pnpm lint` — Run Biome and TypeScript checks
- `pnpm lint:fix` — Apply Biome lint/format fixes
- `pnpm format` — Check Biome formatting
- `pnpm format:fix` — Fix Biome formatting

```bash
npm run build
# or
yarn build
# or
pnpm build
```
## Environment variables

Start the app
| Variable | Description |
| ---------------------------- | ------------------------------------ |
| `VITE_API_KEY` | StakeKit API key |
| `VITE_MIX_PANEL_TOKEN` | Mixpanel token (optional) |
| `VITE_ENABLE_REFERRAL_CHECK` | Enable referral check (`true`/unset) |

```bash
npm run start
# or
yarn start
# or
pnpm start
```
## Deployment

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
The app is a static Vite SPA deployed via AWS Amplify (see `amplify.yml`).
28 changes: 28 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 1
frontend:
phases:
preBuild:
commands:
- curl https://mise.run | MISE_VERSION=v2026.5.6 sh
- export PATH="$HOME/.local/bin:$PATH"
- export PATH="$HOME/.local/share/mise/shims:$PATH"
- mise install
- pnpm install --frozen-lockfile
- echo "VITE_API_KEY=$VITE_API_KEY" >> .env
- echo "VITE_MIX_PANEL_TOKEN=$VITE_MIX_PANEL_TOKEN" >> .env
- echo "VITE_ENABLE_REFERRAL_CHECK=$VITE_ENABLE_REFERRAL_CHECK" >> .env

build:
commands:
- pnpm build

artifacts:
baseDirectory: dist
files:
- "**/*"

customHeaders:
- pattern: "**"
headers:
- key: "Access-Control-Allow-Origin"
value: "*"
78 changes: 46 additions & 32 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", ".next", "public"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off",
"useLiteralKeys": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
"$schema": "node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"includes": [
"**",
"!node_modules",
"!dist",
"!public",
"!**/*.svg",
"!tsconfig.json"
]
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"complexity": {
"noForEach": "off",
"useLiteralKeys": "off"
},
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "error"
},
"style": {
"useImportType": "error"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5",
"semicolons": "asNeeded"
}
}
}
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StakeKit</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap"
rel="stylesheet"
/>
<style>
:root {
--sk-font-roboto: "Roboto Flex";
--sk-font-garamond: "EB Garamond";
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
37 changes: 37 additions & 0 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
node = "24.15.0"
"npm:pnpm" = "10.33.2"
31 changes: 0 additions & 31 deletions next.config.js

This file was deleted.

Loading
Loading