Files
heranran 5deeee3f71 fix(opencode): 完善 Lite Web 文件搜索与 Skill Hub 适配 (#188)
* refactor(opencode): align Lite runtime with latest implementation

* Skill hub优化和opencode lite web版本

* chore(repo): remove accidentally tracked OpenCode source snapshot

* fix(opencode): preserve Lite runtime helpers after main sync

* fix(opencode): restore Lite runtime selection defaults

---------

Co-authored-by: heshengran <heshengran@ieisystem.com>
2026-08-21 09:15:32 +08:00
..
2026-03-20 19:06:48 +08:00
2026-08-18 14:47:09 +08:00
2026-03-20 19:06:48 +08:00
2026-03-20 19:06:48 +08:00
2026-03-20 19:06:48 +08:00

ClawReef Backend

ClawReef virtual desktop management platform backend API.

Tech Stack

  • Golang 1.21+
  • Gin 1.9+
  • upper/db 4.x
  • MySQL 8.0+
  • JWT Authentication

Quick Start

Prerequisites

  • Go 1.21 or higher
  • MySQL 8.0+
  • Docker (optional)

Development Setup

  1. Install dependencies

    make deps
    
  2. Start MySQL with Docker

    make docker-up
    
  3. Run database migration

    make migrate
    
  4. Start the server

    make run
    

API Endpoints

Server runs on port 9001.

Authentication

  • POST /api/v1/auth/register - User registration
  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/refresh - Refresh token
  • POST /api/v1/auth/logout - User logout
  • GET /api/v1/auth/me - Get current user

Default Admin Account

  • Username: admin
  • Password: admin123

Project Structure

backend/
├── cmd/server/          # Application entry point
├── internal/
│   ├── config/          # Configuration
│   ├── db/              # Database connection & migrations
│   ├── models/          # Data models
│   ├── repository/      # Data access layer
│   ├── services/        # Business logic
│   ├── handlers/        # HTTP handlers
│   ├── middleware/      # HTTP middleware
│   └── utils/           # Utilities
├── deployments/         # Docker & K8s configs
└── configs/             # Configuration files

Make Commands

  • make build - Build the binary
  • make run - Run the server
  • make test - Run tests
  • make fmt - Format code
  • make lint - Run linter
  • make docker-up - Start MySQL container
  • make migrate - Run database migrations