Privy Server wallet NextJS Starter
Modern Next.js 15 starter with Privy authentication and Solana Agent Kit
A modern, full-stack web application starter kit that integrates Privy Server wallet authentication with Solana Agent Kit for building secure and scalable web3 applications.
Features
Privy Authentication
Server-side authentication using @privy-io/server-auth
for secure user management
Solana Integration
Built-in Solana wallet and token management using solana-agent-kit
Next.js 15
Built on the latest Next.js framework with App Router for optimal performance
Database Integration
Uses Drizzle ORM with PostgreSQL for type-safe database operations
Modern UI
Styled with Tailwind CSS and Radix UI components for a polished look
Rich Text Editing
Includes CodeMirror and ProseMirror integration for enhanced editing
Type Safety
Full TypeScript support throughout the entire codebase
Testing
Configured with Playwright for comprehensive end-to-end testing
Prerequisites
- Node.js 18+
- pnpm 9.12.3+
- PostgreSQL database
Getting Started
Create a new project using gitpick
Install dependencies
Set up environment variables
Create a .env
file with the following variables:
Initialize the database
Start the development server
Your application will be available at http://localhost:3000
Available Scripts
Command | Description |
---|---|
pnpm dev | Start development server |
pnpm build | Build for production |
pnpm start | Start production server |
pnpm lint | Run linting |
pnpm format | Format code |
pnpm test | Run Playwright tests |
Database Commands
Command | Description |
---|---|
pnpm db:generate | Generate database schemas |
pnpm db:migrate | Run database migrations |
pnpm db:studio | Open Drizzle Studio |
pnpm db:push | Push schema changes |
pnpm db:check | Check schema changes |
Project Structure
Key Integrations
Privy Authentication
This starter uses Privy for authentication, providing:
- Social login (Google, Twitter, etc.)
- Email and phone authentication
- Wallet-based authentication
- Server-side session management
Solana Agent Kit Integration
The starter comes with Solana Agent Kit pre-configured, allowing users to:
- View token balances
- Send and receive tokens
- Interact with Solana programs
- Use AI-powered blockchain interactions
Database Setup
This starter uses Drizzle ORM with PostgreSQL. The schema is defined in lib/db/schema.ts
:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the terms of the license included in the LICENSE file.