This project is the backend of the chorus platform.
- Proto Interface Description: Implements Protocol Buffers for defining data structures and service interfaces.
- OpenAPI API Definition: Utilizes OpenAPI specifications for a clear and standardized RESTful API description.
- CI/CD Pipeline: Integrates Continuous Integration and Continuous Deployment using Jenkins on Kubernetes.
- Versioned & Iterative Migrations: Manages database schema changes efficiently and safely.
- Unit Testing: Incorporates extensive unit tests to ensure code quality and reliability.
- Acceptance Testing: Implements acceptance tests to validate functionality against business requirements.
- User & Authentication Service: Provides a dedicated service for user management and authentication.
- JWT Generation: Implements JSON Web Tokens for secure data transmission.
- Authorization Middlewares: Ensures secure access control within the application.
- install go
- pull repo
- requirements
a) postgres
docker compose -f .devcontainer/docker-compose.yml up -d
b) kind./scripts/create-local-cluster.sh
- launch go run
go run cmd/chorus/main.go start | go run cmd/logger/main.go
- go to localhost:5000/doc
- create tenant
a) get jwt
TEST_CONFIG_FILE="./configs/dev/chorus.yaml" go run --tags=unit ./tests/steward/getadmintoken/main.go
b) init tenant 1 in openapi steward service - create user
- login
- test with get my user
Create a complete service (here the workbench service)
- create service & entity protocul buffer definitions in api/proto/v1/workbench-service.proto and api/proto/v1/workbench.proto
./scripts/generate-protos.sh
- implement migration in internal/migration/postgres/00003_workbench.sql
- launch the backend to apply the new migration
- tell the server there is a new service (both grpc and http) in internal/cmd/start.go
- implement provider in internal/cmd/provider/workbench.go (copy from internal/cmd/provider/workspace.go for instance)
- implement provider for ctrl, service and store
- implement controller in internal/api/v1/workbench-controller.go
- implement controller auth middleware in internal/api/v1/middleware/workbench-authorization.go
- implement converter in internal/api/v1/converter/workbench.go
- implement model in pkg/workbench/model/workbench.go
- implement service in pkg/workbench/service/workbench-service.go
- implement service caching middleware in pkg/workbench/service/middleware/caching.go
- implement service logging middleware in pkg/workbench/service/middleware/logging.go
- implement service validation middleware in pkg/workbench/service/middleware/validation.go
- implement store in pkg/workbench/store/postgres/workbench-storage.go
- implement store logging middleware in pkg/workbench/store/middleware/logging.go
// todo
Any use of the software for purposes other than academic research, including for commercial purposes, shall be requested in advance from CHUV.