Spaces:
Configuration error

deepsite-project / README.md
MRRolex's picture
Generate a complete earning app with Next.js (TypeScript), Tailwind CSS, Prisma (Postgres), NextAuth (Google + Email login), Stripe integration, Admin Panel, User Dashboard, Withdraw Request system, Referrals, Professional UI with icons.
506370e verified
|
Raw History Blame Contribute Delete
1.68 kB
# 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
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env.local
  1. Set up database:
npx prisma migrate dev --name init
  1. Run development server:
npm run dev

Environment Variables

Create a .env.local file with the following variables:

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. ```