NexAd is a CPA (Cost-Per-Action) and watch-to-earn platform where users can earn Pepe tokens πΈ by watching advertisements πΊ and completing surveys π. Users can also claim free Pepe tokens via an on-site faucet π§. Advertisers can host their ads by paying in Pepe tokens, which are then distributed as rewards π.
This project is a complete example of integrating crypto payments πΈ with web advertising services. Whether you're aiming to build a crypto-driven advertising platform or explore web development with blockchain integration, NexAd provides a solid foundation π οΈ.
- Watch-to-Earn: Users earn Pepe tokens πΈ by watching ads π₯ or completing surveys π.
- Crypto Faucet: Claim free Pepe tokens π° through a built-in faucet π§.
- Advert Hosting: Advertisers can create ads, set budgets, and pay in Pepe tokens π₯.
- User Authentication: Secure login π, sign-up π, and email verification π§.
- PepeCLI Wallet Integration: Full integration for crypto transactions using Pepe tokens π³.
NexAd is built using the following technologies:
Technology | Description | Icon |
---|---|---|
Frontend | React + Tailwind CSS for responsive UI development. | |
Backend | Node.js for server-side logic and APIs. | |
Wallet Integration | PepeCLI Wallet for handling cryptocurrency transactions. | |
Email Handling | MailTrap for development email testing. |
-
Navigate to the
backend
directory:cd backend
-
Create a
.env
file in thebackend
directory. Your.env
file should look like this:MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<db_name>?retryWrites=true&w=majority&appName=<app_name> PORT=5000 JWT_SECRET=yourJWTSecretKey NODE_ENV=production MAILTRAP_TOKEN=yourMailTrapToken CAPTCHA_SECRET=yourHCaptchaSecret CLIENT_URL=http://localhost:5173
-
Run the build script π οΈ:
npm run build
-
To run the backend and serve the frontend in production mode π:
npm run start
-
For development mode (backend only) π¨βπ», run:
npm run dev
-
Navigate to the
frontend
directory:cd frontend
-
Install the frontend dependencies π¦:
npm install
-
Run the frontend in development mode π:
npm run dev
-
Faucet Claim:
POST /api/crypto/faucet
- Request Body:
{ wallet: "wallet_address", token: "hCaptcha_token" }
-
Faucet Dashboard:
POST /api/crypto/faucet-dashboard
- Request Body:
{ wallet: "wallet_address" }
- Create an Advertisement:
POST /api/crypto/create-advert
- Request Body:
{ name: "ad_name", description: "ad_description", url: "ad_image_url", payout: "pepe_per_view", viewers: "desired_viewer_count", duration: "ad_duration" }
-
Check Authentication Status:
GET /api/auth/check-auth
-
Sign Up:
POST /api/auth/signup
- Request Body:
{ email: "user_email", password: "user_password", name: "user_name" }
-
Log In:
POST /api/auth/login
- Request Body:
{ email: "user_email", password: "user_password" }
-
Log Out:
POST /api/auth/logout
-
Email Verification:
POST /api/auth/verify-email
- Request Body:
{ code: "verification_code" }
-
Forgot Password:
POST /api/auth/forgot-password
- Request Body:
{ email: "user_email" }
-
Reset Password:
POST /api/auth/reset-password/:token
- Request Parameters:
{ token: "reset_token" }
- Request Body:
{ password: "new_password" }
For any questions or issues, feel free to open an issue on GitHub π or contact the project maintainers π¨βπ».