Step 1 of 9

Step 1: Sign Up Page

The buyer starts by creating an account on the signup page.

📍 Page Location

URL: /signup

📸 Visual Representation of the Page

Step 1: Sign Up Page
Your Registration Journey:
1. Sign Up → 2. KYC Docs → 3. Wallet Setup → 4. Dashboard

🎨 Detailed Visual Description

User sees a clean signup form with email, password, and role selection fields. The form includes a 4-step journey indicator showing: Sign Up → KYC Docs → Wallet Setup → Dashboard.

Key Visual Elements:

  • Email validation
  • Password strength requirements
  • Role selector (Buyer/Supplier/Trader/Insurer)
  • 4-step progress indicator

⚙️ Backend Process

API Endpoint: POST /api/auth/register

Process Flow:
1. Validates email format and checks if email already exists
2. Hashes password using bcrypt (10 rounds)
3. Normalizes role to lowercase for validation
4. Creates user record in database.users Map
5. Generates JWT token with 7-day expiration
6. Sets initial KYC status to "pending"
7. Returns token and user data (without password)

Database Operations:

  • Table: database.users
  • Action: Create new user record
  • Fields: id, email, hashedPassword, role, kycStatus: "pending", verified: false, createdAt

➡️ Next Action

User is redirected to /dashboard/kyc with token in URL