Skip to content

Latest commit

 

History

History

api

Alfie API

Main project api. Contains the api for auth and media mangement. Written in Go. Uses gRPC for communication.

Environment variables

Copy the example file:

cp .env.example .env

Or if using docker compose:

cp .env.example .env.docker

Install dependencies

go mod tidy
go mod vendor

Format code

# less strict
# go fmt ./...
# stricter (recommended)
gofumpt -l -w .

Generate protobuf files

For the go service

protoc --go_out=./internal/pkg/protobuf/ --go-grpc_out=./internal/pkg/protobuf/ ./api/protobuf/*.proto

For the dart client

protoc --dart_out=grpc:./internal/pkg/dart_protobuf ./api/protobuf/*.proto