Skip to content

wu-clan/lykn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lykn

跨语言项目授权平台。管理 license 的签发与验证。

Admin 管理界面

项目结构

  • backend/ — Go 管理平台后端
  • sdk/python/ — Python 验证 SDK
  • sdk/go/ — Go 验证 SDK
  • frontend/ — 前端(Antdv Next)

Backend 开发

  1. 复制 backend/config/config.yaml.examplebackend/config/config.yaml
  2. 启动 PostgreSQL,或使用 docker-compose up postgres
  3. 进入 backend/ 目录运行 make run
  4. 默认用户:admin / admin123(仅开发环境,启动后请立即修改)

常用命令:

cd backend
make help
make test
make build
make demo

make demo 会重新生成跨语言测试 fixture:tests/fixtures/public.pemtests/fixtures/license.lic 和完整的 tests/fixtures/license.json

Frontend 开发

  1. 复制 frontend/.env.examplefrontend/.env
  2. 进入 frontend/ 目录运行 pnpm dev
  3. frontend/.env 必须提供 VITE_API_BASE,代码不会为该变量设置默认值;跨域由后端 CORS 处理

Docker Compose

当前 compose 只覆盖后端链路,故意不包含 frontend/

docker-compose up -d --build
docker-compose logs -f server
docker-compose down -v

默认服务:

  • postgrespostgres:16
  • server:Go 管理后端,监听 http://127.0.0.1:8080

本地 make run 使用 backend/config/config.yaml。Compose 使用 backend/config/config.compose.yaml,后端所有配置都从 YAML 读取。

About

The Shape-shifting Defense for Your Code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors