Privy App Kit - React Native
A mobile chat application that enables interaction with Solana blockchain through natural language conversation. Built with React Native, Expo, and integrated with AI for Solana transaction capabilities.
Demo
Features
- Embedded wallet authentication with Privy (Google, Apple, Email)
- Chat interface for natural language interaction with Solana blockchain
- Solana transaction capabilities through AI assistant
- Chat history management
- User profile management
Demo
Prerequisites
- Node.js (v16+)
- MongoDB
- OpenAI API Key
- Helius API Key (for Solana RPC access)
Setup Instructions
-
Clone the repository:
git clone https://github.com/yourusername/privy-sak-react-native.git cd privy-sak-react-native -
Install dependencies:
yarn install -
Configure environment variables:
- Copy
.env.local.exampleto.env.localin root and.env.exampleto.envin server directories - Fill in the required API keys and configuration
- Copy
app.example.jsontoapp.jsonand update with your app's information
- Copy
-
Start the server:
cd server yarn dev -
Run the app on iOS (Client):
npx expo run:ios
Note: This app cannot be run with Expo Go as some polyfills used in the project are not compatible with Expo Go. You must use the development build with npx expo run:ios or npx expo run:android.
Environment Variables
The following environment variables are required:
OPENAI_API_KEY: Your OpenAI API key for AI functionalityMONGODB_URI: MongoDB connection string (local by default)HELIUS_STAKED_URL: Helius RPC URL with API key (Not necessary staked)PORT: Server port (default: 3001)
Project Structure
-
src/: React Native app source codescreens/: App screenscomponents/: Reusable componentshooks/: Custom React hookswalletProviders/: Privy Embedded wallet integrationnavigation/: Navigation setupassets/: Images, colors, iconslib/: Utility functions and API interactionsstate/: Redux state management
-
server/: Backend APIcontrollers/: API endpoint controllersmodels/: MongoDB modelsroutes/: API routesmiddleware/: Custom middlewaredb/: Database connection