Features X/Twitter OAuth2.0 authentication and API integration
A starter template for building applications with Grok-Beta XAI. Includes authentication setup with X/Twitter OAuth2.0 and basic API integration patterns.
- 🧠 Grok-Beta XAI Integration - Ready-to-use API setup
- 🔒 X Auth - Preconfigured X/Twitter OAuth 2.0 with NextAuth.js
- ⚡ API Routes - Structured API endpoints for Grok-Beta
- 🎯 TypeScript - Full type safety and modern development experience
- 📝 Examples - Basic implementation patterns and usage samples
- Framework: Next.js 15
- Authentication: NextAuth.js
- API Integration: Grok-Beta XAI
- Language: TypeScript
- Clone and install:
git clone https://github.com/yourusername/grok-beta-boilerplate.git cd grok-beta-boilerplate npm install- Configure environment variables:
# Auth Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key # X/Twitter OAuth TWITTER_CLIENT_ID=your-x-client-id TWITTER_CLIENT_SECRET=your-x-client-secret # Grok-Beta API GROK_API_KEY=your-grok-beta-api-key- Start development:
npm run dev├── src/ # Source code directory │ ├── app/ # Main application files │ │ ├── api/ # API routes │ │ │ └── auth/ # Authentication API route │ │ ├── layout.tsx # Application layout component │ │ ├── page.tsx # Main page component │ │ └── providers.tsx # Context and provider setups │ ├── components/ # UI components │ │ └── forms/ # Form components like chat-form │ ├── context/ # Context providers (e.g., Chat context) │ ├── hooks/ # Custom React hooks │ ├── styles/ # Styling files (e.g., global styles) │ ├── utils/ # Utility functions (e.g., Axios instance) │ └── middleware.ts # Middleware for handling requests ├── .env.local