the web console of Fedlearner.
- Concepts
- api: the website REST API
- components: common react components used for pages
- libs: common libs such as LRU cache and Kubenetes client
- middlewares: common middlewares of REST API
- models: database ORMs
- pages: the website pages
- public: static files
- services: RPC caller
- tests: test suites
- utils: common utilities
- Environment
- Config
- use
server.config.js
to config environment variables K8S_HOST
: the hostname of Kubernetes api serverK8S_PORT
: the port of Kubernetes api server- use
.env.development
to maintain browser environment config for development - use
.env.production
to maintain browser environment config for production
- use
- Contribution
- use Conventional Commits for commit message
- code coverage must be greater than
80%
make sure local-hosted database was setup
npm ci
npm run dev
then open site at http://127.0.0.1:1989.
make sure Docker and remote-hosted database were setup
npm run build:image
docker run --rm -it -p 1989:1989 -e DB_HOST=[database host] DB_USERNAME=[database username] DB_PASSWORD=[database password] fedlearner-web-console
npm run test
for testing with coverage report:
npm run cov
release action should only be executed by maintainers
make a new release with tagged commit, m.m.p
must follow semver standard:
# make sure you are at master branch
npm run release -- --release-as m.m.p
git push origin master --tags
then create a new release at Github with latest content from CHANGELOG.md
.