Threadit requires Go and Docker. You can find installation instructions in the links below:
The datasets in this repository are tracked using Git LFS (Large File Storage). To download them, you need to run:
git lfs install
git lfs pullTo configure the application, change directory to /code, then simply copy the example environment file and rename it:
cp .env.example .envFinally, still in the /code directory you need to run the docker-compose.yml file. To do that, you should execute the run.sh and it will start the necessary containers:
./run.shTo stop the application execute stop.sh:
./stop.shThese commands will install all the necessary plugins for Go to utilize protobufs and gRPC, required for Threadit to run correctly
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latestAlthough the generated code is already in this repository, you might want to re-generate it yourself. Verify that you are in the /code directory and execute the generate-proto.sh, it will generate code for all the required microservices:
./generate-proto.shIf you wish to generate code for a specific service, you can execute the script with the -s flag and give a service name:
./generate-proto.sh -s service-nameFirst use npm to install this package:
npm install -g swagger2openapi Then just like the generated Go code, follow the same logic and use the script generate-openapi.sh:
./generate-openapi.sh./generate-openapi.sh -s service-name