2025-12-20 06:12:41 +01:00
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30
2025-12-20 06:12:41 +01:00
2025-12-20 06:12:41 +01:00
2025-12-20 10:32:36 +05:30
2025-12-20 10:32:36 +05:30

420Deals.ch

A premium collective buying platform for CBD in Switzerland.

Setup

Database

  1. Create the database using the provided SQL file:
mysql -u root -p < cbd420.sql
  1. Run the migration to add image support (optional but recommended):
mysql -u root -p cbd420 < migrations/add_image_url.sql
  1. Create a .env.local file in the root directory:
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=cbd420

Installation

npm install

Development

npm run dev

Visit http://localhost:3000 for the main site and http://localhost:3000/admin for the admin panel.

Admin Panel

Access the admin panel at /admin to:

  • Create new drops
  • View all drops
  • Monitor drop progress and sold out status

Creating a Drop

  1. Navigate to /admin
  2. Fill in the form:
    • Product Name: e.g., "Harlequin Collective Drop"
    • Batch Size: Total amount (e.g., 1000)
    • Unit: Custom unit (e.g., g, kg, ml, etc.)
    • Price Per Gram: Price in CHF (e.g., 2.50)
    • Product Image: Optional product image upload (JPEG, PNG, WebP, max 5MB)
  3. Click "Create Drop"

Project Structure

  • app/ - Next.js app directory
    • api/drops/ - API routes for drop management
    • admin/ - Admin panel page
    • components/ - React components
  • lib/db.ts - Database connection pool
  • cbd420.sql - Database schema
Description
No description provided
Readme 317 KiB
Languages
TypeScript 93.1%
HTML 4.4%
CSS 2.4%