cookbook

command module
v0.0.0-...-b59d68e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

README

CodeQL Maintainability Rating Security Rating Reliability Rating Quality Gate Status

cookbook

Web app to create, store and manage recipes, shopping lists and meal planner

Getting Started

The backend server has the following dependencies:

  • PostgreSQL database
  • S3 compatible storage for images
  • OIDC IDP (Auth0 is supported currently)
  • ENV variables for configuration

The following ENV variables are required:

env key type example
cbb_debug bool true
cbb_auth0_domain string https://example..eu.auth0.com/
cbb_auth0_clientid string example
cbb_auth0_audience string example_audience
cbb_database_host string cookbook-database.example.com
cbb_database_port int 5432
cbb_database_database string cookbook
cbb_database_username string
cbb_database_password string
cbb_database_sslmode string require
cbb_database_timezone string Europe/Amsterdam
cbb_s3_endpoint string https://s3.provider.com
cbb_s3_key string
cbb_s3_secret string
cbb_s3_bucket string cookbook

Development

The code can be run locally by providing environment variables locally. There is no requirement for working S3 or OIDC credentials. A local database can be created with Docker.

foo@bar:~/cookbook$ docker run -d --name cookbook_db \
                    -e POSTGRES_DB=<databasename> \
                    -e POSTGRES_USER=<username> \
                    -e POSTGRES_PASSWORD=<password> \
                    -p 5432:5432 \
                    postgres

API docs are provided as Swagger docs. These are generated from endpoint annotations. To update the docs, make sure swag is installed:

foo@bar:~/cookbook$ go install github.com/swaggo/swag/cmd/swag@latest

update the docs with the swag init command:

foo@bar:~/cookbook$ swag init --parseDependency -g main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL