MRRolex commited on
Commit
2aea3e6
·
verified ·
1 Parent(s): d4b0f8a

Generate a complete production-ready web app project named "earnpro" with the following spec:

Browse files

- Tech stack: Next.js (TypeScript, app router), Tailwind CSS, Prisma (Postgres), NextAuth (Email + Google), Stripe (Payments & Connect), Heroicons, React Query (or SWR) for data fetching, and Serverless API routes (Next.js app/api) for backend logic.
- Includes: professional responsive UI (landing, auth, user dashboard, earnings feed, wallet/balance, withdraw request, referrals, settings), an Admin panel (role-based) with user/transaction management, PWA support, SEO meta, localization (i18n), and icons.
- Provide a clear project file structure, package.json, tailwind config, prisma schema, .env.example, and README with setup & deploy steps.
- Implement core backend endpoints (app/api) with TypeScript: /api/auth (NextAuth), /api/earnings (POST to record earning), /api/withdraw (POST to request withdraw), /api/stripe/webhook (webhook handler), /api/admin/users (protected).
- Database models: User, Transaction, Earning, Withdrawal, Referral. Use cents/integers for money, use uuid PKs.
- Include sample frontend pages/components: Landing, SignIn, Dashboard (show balance + earnings list + chart), Withdraw modal (with validation), Referral invite, Notifications toast, Admin user list.
- Include security: input validation, role checks, rate-limiting placeholders, server-side session checks, CORS config, and guidance to set proper env secrets.
- Add a sample GitHub Actions CI file (run lint, test, prisma migrate) and Vercel deployment notes (env vars to set).
- Output: a ZIP-style project tree and important file contents inline (package.json, tailwind.config, prisma/schema.prisma, app/api route handlers, lib/prisma client, next-auth config, a sample React Dashboard component using Heroicons).
- At end: give step-by-step commands to run locally, seed DB, test Stripe (test keys), and deploy to Vercel with required env names.

Do not stop until the full scaffold and README steps are provided. Output code in TypeScript and keep comments minimal but useful.

Files changed (1) hide show
  1. README.md +8 -5
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Deepsite Project
3
- emoji: 🚀
4
- colorFrom: purple
5
- colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: DeepSite Project
3
+ colorFrom: yellow
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).