```markdown # EarnX - Next.js Earning Platform A complete earning app with Next.js, Tailwind CSS, Prisma, NextAuth, and Stripe integration. ## Features - Next.js 13 with TypeScript - Tailwind CSS for styling - Prisma ORM with PostgreSQL - NextAuth for authentication (Google + Email) - Stripe integration for payments - Admin dashboard - User dashboard with earning stats - Withdrawal request system - Referral program - Responsive design ## Setup 1. Clone the repository: ```bash git clone https://github.com/yourusername/earnx.git cd earnx ``` 2. Install dependencies: ```bash npm install ``` 3. Set up environment variables: ```bash cp .env.example .env.local ``` 4. Set up database: ```bash npx prisma migrate dev --name init ``` 5. Run development server: ```bash npm run dev ``` ## Environment Variables Create a `.env.local` file with the following variables: ```env DATABASE_URL="postgresql://user:password@localhost:5432/earnx?schema=public" NEXTAUTH_SECRET="your-secret-key" NEXTAUTH_URL="http://localhost:3000" # Google Auth GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # Stripe STRIPE_SECRET_KEY="your-stripe-secret-key" STRIPE_WEBHOOK_SECRET="your-stripe-webhook-secret" NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key" # Email (for email auth) EMAIL_SERVER="smtp://user:pass@smtp.example.com:587" EMAIL_FROM="noreply@example.com" ``` ## Deploy to Vercel 1. Push your code to a GitHub repository 2. Go to Vercel and click "New Project" 3. Import your repository 4. Add all environment variables 5. Click "Deploy" For database, use Vercel Postgres or any other PostgreSQL provider. ```