From d6c6687823514068aff76f0e7fd0b995ac3b20cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6tzsch?= Date: Sun, 6 Mar 2022 22:33:21 +0100 Subject: [PATCH] README.md placeholders for components --- README.md | 2 +- backend/README.md | 56 +++++++++++++++++++++++++++++++++++ frontend/search/README.md | 3 ++ frontend/submission/README.md | 4 +++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 backend/README.md create mode 100644 frontend/search/README.md create mode 100644 frontend/submission/README.md diff --git a/README.md b/README.md index 60b1dc3..4156eae 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ A website written for this use case allows easy input of filters. The usage of f There is no need to use this component for NGOs happy with their existing solution. Instead they can use the [import function or an API adapter](#import-of-existing-datasets). -A optional new form was requested by: +An optional new form was requested by: - [ ] zentralwerk & goethe institut - [ ] lifeline diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..1e57ba3 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,56 @@ +# „beherbergung“ server + +The core of the server is an graphql-api based on [specialist](https://github.com/ajk/specialist-server). + +As database the [datalog](https://en.wikipedia.org/wiki/Datalog) implementation [XTDB](https://xtdb.com/) is used with a [RocksDB](https://rocksdb.org/) data store. Some help how to access the database for development/debug purposes can be found in [./DB.md](./DB.md) + +## Running development server + +To start the server and send queries, run: + +```bash +lein run + +curl -H 'Content-type: application/json' -d '{"query":"{ TODO }"}' http://localhost:4000/graphql +``` + +## Testing + +```bash +lein test +``` + +## Production build + +```bash +lein ring uberjar + +java -jar target/beherbergung-*standalone.jar +``` + +### Reproducible builds + +Whenever dependencies are changed, rebuild the mvn2nix-lock.json: + +```bash +nix run ..#backendUpdatedDeps +``` + +This allows to build by: + +```bash +nix build ..#backend +``` + +## Configuration + +Configuration management is done with [yogthos](https://github.com/yogthos/config). +Default values are set at `src/config.edn`, there you see the available options. +In `.lein-env.example` you find the variables you should set yourself. +To set config options at runtime, use `environment variables`, `java system properties` or an .edn file specified using the `config` environment variable. + +## Notes to developers + +### State management + +Global state (e.g. instances of database and webserver) are managed by [mount](https://github.com/tolitius/mount). diff --git a/frontend/search/README.md b/frontend/search/README.md new file mode 100644 index 0000000..ccb267f --- /dev/null +++ b/frontend/search/README.md @@ -0,0 +1,3 @@ +TODO: A frontend for authorized NGO members, to search the database + +* [The submisison frontend](../submission/README.md) should be written first (since it is more simple / closer to the hello-world of jsonforms) diff --git a/frontend/submission/README.md b/frontend/submission/README.md new file mode 100644 index 0000000..b8146d4 --- /dev/null +++ b/frontend/submission/README.md @@ -0,0 +1,4 @@ +TODO: A customizable public form, to submit new offers + +* based on nextjs + jsonforms +* try to use deps from https://github.com/johannesloetzsch/swlkup/blob/master/frontend/package.json