A mobile-focused Progressive Web Application (PWA) with embedded wallet functionality, push notifications, and secure authentication.
- Mobile-focused PWA with service worker support
- Push notifications for iOS (>=16.4) and Android
- Embedded non-custodial wallet via mobile passkey (with opt-in iCloud recovery)
- Web2 Auth/Social integration layer
- Support for EVM chains
- Automatic PWA updates with user prompts
- User management with Clerk: social auth (Twitter, Discord), username, or phone number
- Mobile-first design using Tailwind with Konsta UI components
- Node.js with pnpm package manager
- Google Cloud account with SQL instance
- Clerk account for authentication
- Turnkey account for wallet infrastructure
- Clone the repository:
git clone https://github.com/GravitonINC/KEKwallet.git
cd KEKwallet
- Install dependencies:
pnpm i
- Copy
.env.sample
to.env
and configure the following:
Generate push notification keys:
pnpm webpush:generate-keys
Configure in .env
:
WEB_PUSH_EMAIL=mailto:[email protected]
WEB_PUSH_SUBJECT=your-production-domain
WEB_PUSH_PRIVATE_KEY=generated-private-key
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY=generated-public-key
- Create a Turnkey Organization and get your Organization ID
- Configure Turnkey:
pnpm turnkey:install
pnpm turnkey:create:api-key
pnpm turnkey:create:private-key
- Add to
.env
:
TURNKEY_ORGANIZATION_ID=your-org-id
TURNKEY_API_PUBLIC_KEY=generated-public-key
TURNKEY_API_PRIVATE_KEY=generated-private-key
See Database Documentation for detailed setup instructions.
- Configure your database connection string in
.env
:
DATABASE_URL=mysql://user:password@instance-connection-name/kekwallet?ssl=true
- Push the database schema:
pnpm db:push
- Optional: Use database studio for visual management:
pnpm db:studio
- Set up a Clerk application
- Add to
.env
:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-publishable-key
CLERK_SECRET_KEY=your-secret-key
Generate web3 code:
pnpm web3:codegen
If you're using anything on Ethereum, be sure to add your RPC to the .env
The application uses Hyperliquid's official API endpoints with built-in rate limiting:
- Mainnet: https://api.hyperliquid.xyz
- Testnet: https://api.hyperliquid-testnet.xyz
Configure the environment using HYPERLIQUID_TESTNET in your .env file.
Start the development server:
pnpm dev
Access the application at http://localhost:3000
Two options for mobile device testing:
- Use local IP if on same network
- Use ngrok for secure tunnel:
ngrok http 3000
app/
: Next.js application routes and pagespages/
: Legacy page routes and API endpointsshared/
: Shared utilities and database configurationhooks/
: Custom React hooksworker/
: Service worker implementation
- Next.js 13 (Page and App Router support)
- Turnkey for passkey non-custodial wallets
- Clerk for authentication
- Tailwind CSS with Konsta UI
- Google Cloud SQL for database
- Drizzle ORM
- Viem and Wagmi for Web3