A modern web application built with TanStack Router, React, and Solana integration, featuring authentication via Crossmint and AI capabilities.

Features

Authentication

Secure wallet authentication powered by Crossmint’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

Frontend

  • React 19
  • TanStack Router for type-safe routing
  • Radix UI components
  • Tailwind CSS for styling

Authentication

  • Crossmint embedded wallet

Blockchain

  • Solana Web3.js
  • Solana Agent Kit

Backend & Data

  • PostgreSQL
  • Drizzle ORM

AI Integration

  • OpenAI SDK

Development Tools

  • TypeScript
  • Biome for linting and formatting
  • Vinxi

Installation

1

Clone the repository

npx gitpick sendaifun/solana-agent-kit/examples/embedded-wallets/crossmint-sak-v2
cd crossmint-sak-v2
2

Install dependencies

pnpm install
3

Set up environment variables

Create a .env file in the root directory with the following variables:

VITE_CROSSMINT_SECRET=your_crossmint_secret
VITE_RPC_URL=your_solana_rpc_url
4

Run database migrations

pnpm db:generate
pnpm db:migrate

Development

Start the development server:

pnpm dev

The application will be available at http://localhost:3000.

Database Management

CommandDescription
pnpm db:generateGenerate migrations
pnpm db:migrateRun migrations
pnpm db:studioOpen database studio
pnpm db:pushPush schema changes
pnpm db:pullPull schema changes
pnpm db:checkCheck schema
pnpm db:upUpdate schema

Project Structure

src/
├── components/     # React components
├── functions/     # Server-side functions
├── hooks/         # Custom React hooks
├── lib/           # Library code and utilities
├── routes/        # Application routes
├── styles/        # Global styles
└── utils/         # Utility functions

Crossmint Integration

The application uses Crossmint to provide a seamless embedded wallet experience for users. This integration allows users to:

  • Create wallets without leaving the application
  • Sign transactions securely
  • Manage their Solana assets
  • Interact with the Solana blockchain through Agent Kit

Key Features

Secure Authentication

The Crossmint integration provides a secure authentication flow that doesn’t require users to manage private keys directly.

Wallet Creation

Users can create a new Solana wallet through Crossmint’s embedded wallet solution with just a few clicks.

Transaction Signing

The application handles transaction signing through Crossmint’s secure interface, providing a seamless experience.

AI-Powered Assistance

The integration of OpenAI with Solana Agent Kit allows for natural language interactions with the blockchain.

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.

Credits