foodunit

module
v0.0.0-...-7a9e484 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0

README

FoodUnit 3

Prerequisites

Running FoodUnit 3 natively requires:

Running FoodUnit 3 containerized requires:

Start FoodUnit natively

FoodUnit basically consists of an API server, an UI server, a migration tool and a backing database. In order to run the application natively, a local MySQL/MariaDB database is required.

Copy app.example.toml and rename it to app.toml. Fill in appropriate values. Do the same thing with ui/public/config.example.json.

If the database tables do not exist yet, run:

$ ./run-migration.sh

Then start the other components:

$ ./run-server.sh
$ ./run-ui.sh

If you want to change the default values, start the component manually with the corresponding flags. These scripts are intended for development only.

Start FoodUnit containerized

Just as mentioned above, copy and rename the configuration files. Then build and run the containers.

$ docker-compose up

You may run the containers yourself just with docker run, using the environment variables and volumes specified in docker-compose.yml.

These containers are intended for development only.

Directories

Path Synopsis
cmd
migration
Package main provides a main function for running the migration manager.
Package main provides a main function for running the migration manager.
server
Package main provides a main function for running the API server.
Package main provides a main function for running the API server.
Package config provides tools for reading and processing configurations.
Package config provides tools for reading and processing configurations.
controllers
rest
Package rest provides a controller for handling API requests.
Package rest provides a controller for handling API requests.
Package middleware provides HTTP middleware for request handling chains.
Package middleware provides HTTP middleware for request handling chains.
Package migration provides tools for performing data migrations.
Package migration provides tools for performing data migrations.
Package model provides basic domain models.
Package model provides basic domain models.
Package server provides an executable server which exposes a REST API.
Package server provides an executable server which exposes a REST API.
services
dish
Package dish provides services and types for Dish-related data.
Package dish provides services and types for Dish-related data.
mail
Package dish provides services and types for sending mails.
Package dish provides services and types for sending mails.
offer
Package offer provides services and types for Offer-related data.
Package offer provides services and types for Offer-related data.
order
Package order provides services and types for Order-related data.
Package order provides services and types for Order-related data.
restaurant
Package restaurant provides services and types for Restaurant-related data.
Package restaurant provides services and types for Restaurant-related data.
user
Package user provides services and types for User-related data.
Package user provides services and types for User-related data.
Package session provides interfaces and implementations for session managers.
Package session provides interfaces and implementations for session managers.
Package storage provides storage interfaces and implementations.
Package storage provides storage interfaces and implementations.
maria
Package maria provides storage implementations for MariaDB.
Package maria provides storage implementations for MariaDB.

Jump to

Keyboard shortcuts

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