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 (make sure to use pnpm for all commands):
pnpm i- Generate web3 code:
pnpm web3:codegen- Copy
.env.sampleto.envand configure the following:
The application uses environment variables for configuration. Copy .env.sample to .env and configure:
NEXT_PUBLIC_DEPLOYMENT_ENV: Controls the application environment- Set to
localfor desktop testing (forces PWA mode) - Set to
gcpfor Google Cloud deployment (standard detection)
- Set to
See Google Cloud Deployment for detailed deployment instructions.
Generate push notification keys:
pnpm webpush:generate-keysConfigure in .env:
WEB_PUSH_EMAIL=mailto:your-email@domain.com
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 (using pnpm):
pnpm db:push # Initialize or update database schema- Optional: Use database studio for visual management:
pnpm db:studio # Opens Drizzle Studio for database managementNote: Always use pnpm for running project commands to ensure consistent package management.
- 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:codegenIf 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 devAccess 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 3000The application is deployed on Google Cloud Platform. For detailed deployment instructions, including environment configuration and setup, see Google Cloud Deployment.
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 Platform for deployment and hosting
- Google Cloud SQL for database
- Drizzle ORM
- Viem and Wagmi for Web3
For deployment instructions, see Google Cloud Deployment.