Skip to content

justdanielndev/hackclub-shop2

Repository files navigation

Hack Club Shop

POC for the official Hack Club shop.

It won't be live for a while (at least not with me as the main developer), I wanted to share the code so others could build on it. The shop is built using Next.js, and it's designed to be easy to set up and customize.

The reason why this repo might have less commits than what you'd expect is that development was previously done in a repo owned by Rushmore (HQ member), and this is a new repo owned by me :D


Cool stuff the shop has

  • Products can be balance_only, points_only, or mixed
  • Some items let a user choose how many points to spend and automatically reduce the credit cost
  • Users generate a claim code, donate via HCB, and redeem that payment into their shop balance
  • YSWS Submitted projects can be reviewed by admins and award points based on approved hours
  • Hack Club OAuth authentication via NextAuth
  • Product catalog with product variants and payment-mode-specific pricing
  • Cart and checkout flows for credits, points, and mixed payments
  • User balance and points ledgers
  • Coupon creation and validation
  • Admin dashboard for:
    • admins and roles
    • product management
    • coupons
    • user credit and point adjustments
    • project review
    • store stats and order review
  • Slack integrations for notifications and interaction workflows
  • Airtable project submission storage
  • Upstash Redis storage for products, balances, points, orders, coupons, and admin metadata

Concepts and all that

Credits

Credits are the cash-like balance used for dollar-priced portions of checkout.

Points

Points are a second balance, earned through approved projects.

Payment modes

  • balance_only: item can only be bought with credits
  • points_only: item can only be bought with points
  • mixed: item supports both, and the user can choose how many points to spend

To install this:

Clone the repo:

git clone https://github.com/justdanielndev/hackclub-shop2.git  

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages