A Variable Data Printing, E-Signing, and Certificate Repository Platform.
Clone the project including its submodule
git clone --recursive https://github.com/SeakMengs/AutoCert.gitNote: To update the submodule to the latest commit, run the following command
git submodule update --recursive --remoteDevelopment is divided into two environment, docker and local.
The docker environment in this project has everything set up including live reload, postgresql.
To develop using docker, make sure you have docker installed then run the following command:
docker compose upTo perform some command within the docker environment you can mount into the docker bash with the following command
First get the name of the docker image with the following command
docker ps -l
# Output should look something like this
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 07ec003243de autocert-autocert-api "air -c .air.toml" About an hour ago Up About an hour (unhealthy) 0.0.0.0:8080->8080/tcp autocert-autocert-api-1To mount into the docker bash run the following command
docker exec -it autocert-autocert-api-1 bashAfter mount into docker bash, you can perform some action such as migration.
cd /app
go run ./cmd/migrate/main.goDevelop local with hot reload
airDevelop local without hot reload
go run ./cmd/api/main.goMigrate database
go run ./cmd/migrate/main.goThis package is written on top of existing libraries such as tdewolff/canvas, pdfcpu and is written to rely on font_metadata.json which is generated by scanning the font folder using the following command
go run ./cmd/scan_font`To run all unit tests
go test ./...To test rate limit
go test ./internal/rate_limiterTo test mail
go test ./internal/mailerTo test rate limit by performing http request
./scripts/test_rate_limit.shFor production deployment check deploy.md