This is a React + Vite template pre-configured with Okto SDK for building chain abstracted decentralized applications. It provides a solid foundation for creating Web3-enabled applications with best practices and essential tooling.
- ⚡️ React + Vite for lightning-fast development
- 🔐 Okto SDK integration for seamless Web3 functionality
- 📱 Responsive Design out of the box
Before you begin, ensure you have the following installed:
- Node.js 18.x or later and npm/pnpm/yarn
- Okto API Keys:
VITE_CLIENT_PRIVATE_KEYandVITE_CLIENT_SWA. Obtain these from the Okto Developer Dashboard. - Google OAuth Credentials
-
Clone this template:
git clone https://github.com/okto-hq/okto-sdkv2-react-template-app.git cd okto-sdkv2-react-template-app -
Install dependencies:
npm install
-
Set up your environment variables:
cp .env.sample .env
Edit
.envand add your Okto API credentials:# The Okto environment "sandbox" or "production" VITE_OKTO_ENVIRONMENT= "sandbox" # Get the below values from Okto Developer Dashboard. Learn how here- https://docsv2.okto.tech/docs/developer-admin-dashboard VITE_OKTO_CLIENT_PRIVATE_KEY= "YOUR_CLIENT_PRIVATE_KEY" VITE_OKTO_CLIENT_SWA= "YOUR_CLIENT_SWA" # Only needed if google authentication is used VITE_GOOGLE_CLIENT_ID= "YOUR_GOOGLE_CLIENT_ID" -
Start the development server:
npm run dev
-
Open http://localhost:5173 with your browser to see your application.
This template can be deployed to any static hosting service. Some popular options include:
Follow the respective platform's documentation for deployment instructions.
Contributions are welcome! Please take a moment to review our CONTRIBUTING.md guidelines before submitting any Pull Requests. Your contributions are invaluable to the Okto community.