Skip to content

MINIOpenSource/CIMS-backend

Repository files navigation

CIMS Backend (Go)

This is the Go implementation of the ClassIsland Management Server (CIMS).

Features

  • Management API: Manage ClassPlans, TimeLayouts, Subjects, Policies, etc.
  • Client API: Serve configuration to ClassIsland clients.
  • gRPC Service: Real-time communication (Register, Commands, Heartbeat).
  • Service Management: Run as a system service (Windows Service, Systemd, Launchd).
  • Single Binary: Easy deployment with SQLite embedded.

Installation

From Source

  1. Install Go 1.22+.
  2. Install protoc (Protocol Buffers compiler).
  3. Clone the repo.
  4. Run:
    make proto
    go mod tidy
    make build

Running

Interactive Mode

./cims_server start

By default, it listens on HTTP :50050 and gRPC :50051.

Service Mode

Install as a system service to start automatically on boot:

# Install the service
sudo ./cims_server service install

# Start the service
sudo ./cims_server service run

# Stop the service
sudo ./cims_server service stop

# Uninstall the service
sudo ./cims_server service uninstall

Note: On Windows, run cmd/powershell as Administrator.

Configuration

  • Database: Defaults to cims.db in the current directory (or service directory). Use --db <path> to override.
  • Ports: Use --port (HTTP) and --grpc-port (gRPC).

Development

  • make proto: Generate Go code from .proto files.
  • make build: Build the binary.
  • internal/model/domain.go: Domain models matching ClassIsland JSON structure.

About

ClassIsland 集控服务器 | 基于 Python 的适用于 ClassIsland 的集控服务器

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •