Claude
Skills
Sign in
Back

regplatform-multi-account-registration

Included with Lifetime
$97 forever

```markdown

Writing & Docs

What this skill does

```markdown
---
name: regplatform-multi-account-registration
description: Multi-platform batch account registration system supporting OpenAI, Grok, Kiro, Gemini with task scheduling, HuggingFace worker nodes, Cloudflare routing, credits system, and admin management
triggers:
  - set up regplatform registration system
  - configure batch account registration
  - deploy huggingface worker nodes for registration
  - set up cloudflare worker routing for regplatform
  - configure openai grok kiro account registration
  - manage hf space worker nodes
  - set up credits and user management for regplatform
  - troubleshoot regplatform worker deployment
---

# RegPlatform Multi-Platform Account Registration

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

RegPlatform is a Go-based multi-platform batch account registration system. It orchestrates automated registration across OpenAI, Grok, Kiro, and Gemini via distributed HuggingFace Space worker nodes routed through Cloudflare Workers, with a full admin panel, credits system, JWT auth, and real-time WebSocket log streaming.

---

## Architecture

```
Browser → Nginx (443) → Vue 3 SPA
                          │
                      Go Backend (:8000)
                          │
                    TaskEngine (worker pool)
                          │
                      CF Worker
                     /    |    \    \
               /openai/ /grok/ /kiro/ /ts/
                  │       │      │      │
                HFNP    HFGS   HFKR   HFTS
              (OpenAI) (Grok) (Kiro) (Turnstile)
```

---

## Prerequisites

- Go 1.25+
- Node.js 18+
- PostgreSQL 16+
- Docker & Docker Compose
- HuggingFace account + tokens
- Cloudflare Worker account

---

## Installation & Local Development

### 1. Clone and configure

```bash
git clone https://github.com/your-username/regplatform.git
cd regplatform
cp .env.example .env
```

### 2. Edit `.env`

```env
DATABASE_URL=postgres://user:password@localhost:5432/regplatform
JWT_SECRET=your-32-char-minimum-secret-here
PORT=8000
GIN_MODE=release
DEV_MODE=false
ADMIN_USERNAME=youradminuser
SSO_SECRET=
REDIS_URL=
JWT_EXPIRE_HOURS=72
CORS_ORIGINS=https://yourdomain.com
```

### 3. Start backend

```bash
go mod tidy
go run cmd/server/main.go
```

### 4. Start frontend

```bash
cd web
npm install
npm run dev
```

### 5. Docker (production)

```bash
docker-compose -f docker-compose.prod.yml up -d
```

---

## First-Time Setup

1. Navigate to `http://localhost:8000`
2. Register the first account — it **automatically becomes admin**
3. Log in and go to Admin → System Settings
4. Configure mail services, captcha solvers, and registration URLs

---

## Project Structure

```
regplatform/
├── cmd/
│   ├── server/              # Main server entrypoint
│   ├── openai-worker/       # OpenAI worker binary → HFNP
│   ├── grok-worker/         # Grok worker binary → HFGS
│   └── grpctest/            # gRPC-web debug tool
├── internal/
│   ├── config/              # Viper config loading
│   ├── model/               # GORM data models
│   ├── service/             # TaskEngine, HFSpaceService, etc.
│   ├── worker/              # Platform worker implementations
│   ├── handler/             # HTTP route handlers
│   ├── middleware/          # JWT auth, CORS, rate limiting
│   ├── dto/                 # Request/response structs
│   └── pkg/                 # Internal utilities
├── web/                     # Vue 3 frontend
├── services/
│   ├── aws-builder-id-reg/  # Kiro registration microservice
│   └── turnstile-solver/    # Turnstile solver microservice
├── cloudflare/              # CF Worker source
├── HFNP/                    # OpenAI HF Space template
├── HFGS/                    # Grok HF Space template
├── HFKR/                    # Kiro HF Space template
└── HFTS/                    # Turnstile HF Space template
```

---

## API Reference

### Authentication

```bash
# Register (rate limited: 3/min per IP)
curl -X POST http://localhost:8000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"myuser","password":"MyPass123"}'

# Login
curl -X POST http://localhost:8000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"myuser","password":"MyPass123"}'
# Returns: {"token":"eyJ..."}

# Get current user
curl http://localhost:8000/api/me \
  -H "X-Auth-Token: $TOKEN"
```

Password requirements: ≥8 chars, uppercase + lowercase + digit.

Token can be passed as:
- Cookie
- `X-Auth-Token: <token>` header
- `Authorization: Bearer <token>` header

### Task Management

```bash
# Create a registration task
curl -X POST http://localhost:8000/api/tasks \
  -H "X-Auth-Token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "openai",
    "count": 10,
    "proxy_id": 1
  }'

# Start task
curl -X POST http://localhost:8000/api/tasks/123/start \
  -H "X-Auth-Token: $TOKEN"

# Stop task
curl -X POST http://localhost:8000/api/tasks/123/stop \
  -H "X-Auth-Token: $TOKEN"

# Get current running task
curl http://localhost:8000/api/tasks/current \
  -H "X-Auth-Token: $TOKEN"
```

### Results

```bash
# List results
curl http://localhost:8000/api/results \
  -H "X-Auth-Token: $TOKEN"

# Export results for a task
curl http://localhost:8000/api/results/123/export \
  -H "X-Auth-Token: $TOKEN" \
  -o results.csv
```

### Credits

```bash
# Check balance
curl http://localhost:8000/api/credits/balance \
  -H "X-Auth-Token: $TOKEN"

# Redeem a code
curl -X POST http://localhost:8000/api/credits/redeem \
  -H "X-Auth-Token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"REDEEM-CODE-HERE"}'
```

### Proxy Management

```bash
# Add proxy
curl -X POST http://localhost:8000/api/proxies \
  -H "X-Auth-Token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"http://user:pass@host:port","name":"proxy1"}'

# List proxies
curl http://localhost:8000/api/proxies \
  -H "X-Auth-Token: $TOKEN"

# Delete proxy
curl -X DELETE http://localhost:8000/api/proxies/1 \
  -H "X-Auth-Token: $TOKEN"
```

### Admin Endpoints

```bash
# List users
curl http://localhost:8000/api/admin/users \
  -H "X-Auth-Token: $ADMIN_TOKEN"

# Recharge credits for user
curl -X POST http://localhost:8000/api/admin/credits/recharge \
  -H "X-Auth-Token: $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_id":2,"amount":1000}'

# Get/set system settings
curl http://localhost:8000/api/admin/settings \
  -H "X-Auth-Token: $ADMIN_TOKEN"

curl -X POST http://localhost:8000/api/admin/settings \
  -H "X-Auth-Token: $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key":"new_user_bonus","value":"100"}'

# HF Space overview
curl http://localhost:8000/api/admin/hf/overview \
  -H "X-Auth-Token: $ADMIN_TOKEN"

# Deploy HF Spaces
curl -X POST http://localhost:8000/api/admin/hf/spaces/deploy \
  -H "X-Auth-Token: $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"openai","count":3}'

# Run health check
curl -X POST http://localhost:8000/api/admin/hf/spaces/health \
  -H "X-Auth-Token: $ADMIN_TOKEN"

# Autoscale spaces
curl -X POST http://localhost:8000/api/admin/hf/autoscale \
  -H "X-Auth-Token: $ADMIN_TOKEN"

# Sync CF Worker env vars
curl -X POST http://localhost:8000/api/admin/hf/sync-cf \
  -H "X-Auth-Token: $ADMIN_TOKEN"
```

### Real-Time Logs

```bash
# SSE stream
curl -N http://localhost:8000/ws/logs/123/stream \
  -H "X-Auth-Token: $TOKEN"

# WebSocket (use wscat or browser)
wscat -c "ws://localhost:8000/ws/logs/123" \
  -H "X-Auth-Token: $TOKEN"
```

---

## System Settings Reference

Configure these in Admin → System Settings (persisted to DB):

| Key | Description |
|-----|-------------|
| `yydsmail_base_url` | YYDS Mail temp email API URL |
| `gptmail_api_key` | GPTMail API key |
| `gptmail_base_url` | GPTMail service URL |
| `turnstile_solver_url` | Turnstile solver service URL |
| `cf_bypass_solver_url` | CF bypass solver URL |
| `yescaptcha_key` | YesCaptcha API key |
| `openai_reg_

Related in Writing & Docs