Skip to content

feat: Implement admin panel, user auth, wallet, and token-based credits #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Muhammad-Midhlaj
Copy link

  • Initializes backend services within the Next.js structure.
  • Integrates user authentication with existing NextAuth.js setup, adding walletBalance and isAdmin fields to the User model.
  • Implements a wallet system with API endpoints for balance viewing and server-side functions for crediting/debiting.
  • Calculates and awards wallet credits based on AI token usage in chat interactions.
  • Creates a basic admin panel for user listing and manual wallet balance adjustments, protected by admin-only authorization.
  • Adds Playwright integration tests for the new wallet and admin API routes.

- Initializes backend services within the Next.js structure.
- Integrates user authentication with existing NextAuth.js setup, adding walletBalance and isAdmin fields to the User model.
- Implements a wallet system with API endpoints for balance viewing and server-side functions for crediting/debiting.
- Calculates and awards wallet credits based on AI token usage in chat interactions.
- Creates a basic admin panel for user listing and manual wallet balance adjustments, protected by admin-only authorization.
- Adds Playwright integration tests for the new wallet and admin API routes.
Copy link

vercel bot commented Jun 25, 2025

@google-labs-jules[bot] is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpg-hstore@​2.3.41001007977100
Addedbcryptjs@​3.0.210010010080100
Addedjsonwebtoken@​9.0.29910010081100
Addedsequelize@​6.37.7981009786100
Addedexpress@​5.1.09810010086100
Addedpg@​8.16.2991009993100

View full report

@yantakus
Copy link

Looks pretty raw. I don't see any place in the UI where users can see their credit balance info. Is it WIP?

For the admin panel, I'd use Payload CMS - it is very easy to integrate into any next.js project, it works with drizzle and automatically creates admin pages based on project's schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants