Privy Agent NextJS Starter
A modern, full-stack web application starter kit that integrates Privy authentication with Solana Agent Kit for building secure and scalable web3 applications.
Features
- ๐ Privy Authentication: Server-side authentication using
@privy-io/server-auth - โ๏ธ 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
- ๐พ Database Integration: Uses Drizzle ORM with PostgreSQL
- ๐จ Modern UI: Styled with Tailwind CSS and Radix UI components
- ๐ Rich Text Editing: Includes CodeMirror and ProseMirror integration
- โ Type Safety: Full TypeScript support
- ๐งช Testing: Configured with Playwright for end-to-end testing
Prerequisites
- Node.js 18+
- pnpm 9.12.3+
- PostgreSQL database
Getting Started
-
Clone the repository
-
Install dependencies:
pnpm install -
Set up your environment variables: Create a
.envfile with the following variables:DATABASE_URL=your_postgres_connection_string PRIVY_APP_ID=your_privy_app_id PRIVY_APP_SECRET=your_privy_app_secret -
Initialize the database:
pnpm db:generate pnpm db:migrate -
Start the development server:
pnpm dev
Available Scripts
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run lintingpnpm format- Format codepnpm test- Run Playwright tests
Database Commands
pnpm db:generate- Generate database schemaspnpm db:migrate- Run database migrationspnpm db:studio- Open Drizzle Studiopnpm db:push- Push schema changespnpm db:check- Check schema changes
Project Structure
โโโ app/ # Next.js app directory
โโโ components/ # React components
โโโ lib/ # Utility functions and libraries
โโโ hooks/ # Custom React hooks
โโโ public/ # Static assets
โโโ tests/ # Playwright tests
โโโ artifacts/ # Build artifacts
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.