regplatformm-multi-platform-registration
```markdown
What this skill does
```markdown
---
name: regplatformm-multi-platform-registration
description: Multi-platform account batch registration system supporting OpenAI, Grok, Kiro, Gemini with task engine, HuggingFace worker nodes, Cloudflare routing, credits system, and admin management
triggers:
- set up regplatform registration system
- configure batch account registration
- deploy HuggingFace worker spaces
- set up OpenAI Grok Kiro account registration
- configure Cloudflare worker routing for registration
- manage HF space worker nodes
- set up credits and user management for regplatform
- integrate regplatform with external systems
---
# RegPlatformm — Multi-Platform Account Batch Registration System
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
RegPlatform is a production-ready multi-platform account batch registration system built in Go. It supports automated account registration for OpenAI, Grok, Kiro, and Gemini via a distributed worker architecture: a Go/Gin backend orchestrates tasks, HuggingFace Space nodes execute registrations, and a Cloudflare Worker handles load balancing and routing.
## Architecture
```
Browser → Nginx → Vue 3 SPA
→ Go Backend (:8000)
├── TaskEngine (worker pool, scheduling)
├── HFSpaceService (elastic node management)
├── WebSocket (real-time logs)
└── PostgreSQL
↓
CF Worker (path-prefix routing)
├── /openai/* → HFNP pool
├── /grok/* → HFGS pool
├── /kiro/* → HFKR pool
└── /ts/* → HFTS pool
```
## Tech Stack
- **Backend**: Go 1.25, Gin, GORM, PostgreSQL 16
- **Frontend**: Vue 3, Vite, Pinia, TailwindCSS
- **CI/CD**: GitHub Actions → GHCR Docker + GitHub Release
- **Deployment**: Docker Compose + HuggingFace Spaces (worker nodes)
- **Routing**: Cloudflare Worker (path-prefix load balancing)
## Installation & Setup
### Prerequisites
- Go 1.25+
- Node.js 18+
- PostgreSQL 16+
- Docker & Docker Compose
- HuggingFace account(s) with API tokens
- Cloudflare Worker account
### 1. Clone and Configure
```bash
git clone https://github.com/xiaolajiaoyyds/regplatformm.git
cd regplatformm
cp .env.example .env
```
### 2. Environment Variables (.env)
```env
# Required
DATABASE_URL=postgres://user:password@localhost:5432/regplatform
JWT_SECRET=your-secret-key-at-least-32-chars
# Optional
PORT=8000
GIN_MODE=release
DEV_MODE=false
ADMIN_USERNAME=your_admin_username
SSO_SECRET=optional_sso_secret
REDIS_URL=redis://localhost:6379
JWT_EXPIRE_HOURS=72
CORS_ORIGINS=https://yourdomain.com,https://app.yourdomain.com
```
### 3. Local Development
```bash
# Backend
go mod tidy
go run cmd/server/main.go
# Frontend (separate terminal)
cd web
npm install
npm run dev
```
### 4. Production Docker Deployment
```bash
docker-compose -f docker-compose.prod.yml up -d
```
### 5. First-Time Setup
1. Visit `http://localhost:8000`
2. Register first account — **automatically becomes admin**
3. Go to admin panel → System Settings to configure services
## Project Structure
```
regplatformm/
├── 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/ # Business logic (TaskEngine, HFSpaceService)
│ ├── 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
├── Dockerfile
├── docker-compose.yml
└── docker-compose.prod.yml
```
## API Reference
### Authentication Endpoints (Public)
```go
// Register — rate limited 3/min per IP
POST /api/auth/register
// Body: { "username": "user", "password": "Password1" }
// Password: min 8 chars, uppercase + lowercase + digit required
// First registered user auto-assigned admin (Role=100, IsAdmin=true)
// Login — rate limited 10/min per IP
POST /api/auth/login
// Body: { "username": "user", "password": "Password1" }
// Returns: JWT token
// SSO (optional, requires SSO_SECRET env var)
GET /api/auth/sso
// Dev login (DEV_MODE=true only)
GET /api/auth/dev-login
```
### Auth Token Passing
JWT token can be passed three ways:
```
Cookie: token=<jwt>
Header: X-Auth-Token: <jwt>
Header: Authorization: Bearer <jwt>
```
### User Endpoints (Authenticated)
```go
GET /api/auth/me // Current user info
GET /api/init // Batch initialization load
POST /api/tasks // Create registration task
POST /api/tasks/:id/start // Start task
POST /api/tasks/:id/stop // Stop task
GET /api/tasks/current // Current running task
GET /api/results // Registration results list
GET /api/results/:taskId/export // Export results
GET /api/credits/balance // Credit balance
POST /api/credits/redeem // Redeem credit code
GET /api/proxies // List proxies
POST /api/proxies // Add proxy
PUT /api/proxies/:id // Update proxy
DELETE /api/proxies/:id // Delete proxy
```
### Admin Endpoints (Admin Role Required)
```go
GET /api/admin/users // User list
POST /api/admin/credits/recharge // Recharge user credits
GET /api/admin/settings // Get system settings
POST /api/admin/settings // Update system settings
GET /api/admin/hf/overview // HF Space overview
POST /api/admin/hf/spaces/deploy // Batch deploy spaces
POST /api/admin/hf/spaces/health // Health check
POST /api/admin/hf/autoscale // Elastic scaling
POST /api/admin/hf/sync-cf // Sync CF Worker env vars
```
### Real-Time Endpoints
```go
GET /ws/logs/:taskId/stream // SSE real-time logs
GET /ws/logs/:taskId // WebSocket logs
```
## Configuration: Admin System Settings
Configure in the admin panel (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_url` | OpenAI registration service URL |
| `grok_reg_url` | Grok registration service URL |
| `kiro_reg_url` | Kiro registration service URL |
| `default_proxy` | Default proxy address |
| `new_user_bonus` | Credits granted to new users |
| `max_threads_per_user` | Max concurrent threads per user |
| `max_target_per_task` | Max targets per task |
## Supported Platforms
| Platform | Method | HF Space | Release Tag |
|----------|--------|----------|-------------|
| OpenAI | Go HTTP (Sentinel PoW + PKCE OAuth + Auth0) | HFNP | `inference-runtime-latest` |
| Grok | Go HTTP (gRPC-web + Turnstile + Server Actions) | HFGS | `stream-worker-latest` |
| Kiro | Python (AWS Cognito + Camoufox) | HFKR | `browser-agent-latest` |
| Gemini | Python (Camoufox browser automation) | HFGM | `gemini-agent-latest` |
| TurRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.