Privy Agent Tanstack Starter
Modern web application with Privy wallet integration for Solana Agent Kit
A modern web application built with TanStack Router, React, and Solana integration, featuring authentication via Privy and AI capabilities.
Features
Authentication
Secure user authentication powered by Privy’s embedded wallet solution
Solana Integration
Built with Solana Agent Kit for blockchain interactions and transactions
AI Capabilities
OpenAI integration for intelligent features and natural language interactions
Modern UI
Built with Radix UI components and Tailwind CSS for a sleek user experience
Type Safety
Full TypeScript support throughout the application codebase
Database Integration
PostgreSQL with Drizzle ORM for efficient data management
Tech Stack
Category | Technologies |
---|---|
Frontend | React 19, TanStack Router |
Authentication | Privy |
Blockchain | Solana Web3.js, Solana Agent Kit |
Styling | Tailwind CSS, Radix UI |
Database | PostgreSQL, Drizzle ORM |
AI | OpenAI SDK |
Development | TypeScript, Biome, Vinxi |
Installation
Clone the repository
Install dependencies
Set up environment variables
Create a .env
file in the root directory with the following variables:
Run database migrations
Development
Start the development server:
The application will be available at http://localhost:3000
.
Linting and Formatting
Command | Description |
---|---|
pnpm lint | Run linting |
pnpm lint:fix | Fix linting issues |
Database Management
Command | Description |
---|---|
pnpm db:generate | Generate migrations |
pnpm db:migrate | Run migrations |
pnpm db:studio | Open database studio |
pnpm db:push | Push schema changes |
pnpm db:pull | Pull schema changes |
pnpm db:check | Check schema |
pnpm db:up | Update schema |
Project Structure
Privy Integration
This starter uses Privy to provide a seamless embedded wallet experience. Privy offers several advantages for Solana Agent Kit applications:
- Simplified Authentication: Email, social, and wallet-based auth
- Human-in-the-loop Transactions: Users confirm all transactions
- Multi-device Support: Access from multiple devices
- Non-custodial: Users maintain control of their keys
- Social Recovery Options: Easy key recovery methods
Key Benefits
User-friendly Authentication
Privy provides a streamlined authentication experience that supports multiple methods including email, social logins, and existing wallets. This makes your application accessible to both crypto novices and experienced users.
Human-in-the-loop Security
All transactions require explicit user approval, ensuring that users maintain control over their assets while still allowing for an AI-assisted experience.
Database Integration
This starter includes a complete database setup with PostgreSQL and Drizzle ORM, allowing you to:
- Store user preferences and settings
- Save conversation history
- Track transaction history
- Implement custom features requiring persistent data
Type-safe Routing
The TanStack Router integration provides type-safe routing throughout the application, reducing errors and improving developer experience.
This is a starter template and may not include all features or optimizations for production use (e.g the use of the OpenAI API key on the client). Please review and modify as necessary for your specific use case.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.