Sample TODO app, based on Vue3 https://basebox.io
Go to file
Markus Thielen 17e979decc Updated docker image URLs 2023-11-17 15:36:56 +00:00
bbconf Converted demo to use Docker Compose 2023-11-17 16:04:52 +01:00
public WIP; Vue3 project tree 2023-02-28 13:57:31 +01:00
src read OIDC config from env 2023-11-01 17:54:55 +01:00
.env BBIO-46 WIP 2023-10-31 18:44:19 +01:00
.gitignore WIP; Vue3 project tree 2023-02-28 13:57:31 +01:00
README.md Converted demo to use Docker Compose 2023-11-17 16:04:52 +01:00
docker-compose.yml Updated docker image URLs 2023-11-17 15:36:56 +00:00
index.html WIP... 2023-03-15 17:57:12 +01:00
package-lock.json BBIO-46 WIP 2023-10-31 18:44:19 +01:00
package.json BBIO-46 WIP 2023-10-31 18:44:19 +01:00
vite.config.js Converted demo to use Docker Compose 2023-11-17 16:04:52 +01:00
web.Dockerfile Converted demo to use Docker Compose 2023-11-17 16:04:52 +01:00

README.md

basebox Sample: TODO App

This project implements the Hello World of API-driven apps: a simple TODO app, built with Vue 3.

Quick instructions

If you have docker installed:-

  • docker compose up in a terminal window
  • Go to http://127.0.0.1:5167/ in your browser

For more information, see as follows.

Requirements:-

Running instructions:-

  • docker compose up

This will download the basebox Docker images, a postgres instance and the demo application.

Once Docker is up and running, you should be able to go to your browser and navigate to http://127.0.0.1:5167/ to view the demo.

Note that if this does not work, find the npm console out (you should find the output in the Docker terminal window), which will look like the following:-


  VITE v4.1.4  ready in 273 ms

  ➜  Local:   http://localhost:5167/
  ➜  Network: use --host to expose
  ➜  press h to show help

Use the url publish here to view the demo.

The bbconf folder contains basebox GraphQL schema, config files, precompiled database schema, type maps etc. The GraphQL schema is the central file of basebox, from this we generate the database and create GraphQL operations to query and mutate the database. Please have a look at bbconf\basebox\schema.graphql to get an idea of what this looks like.

Terminal output

We have intentionally put the basebox servers (the broker and the dbproxy) into tracing mode (this is configured in the config files in bbconf/basebox) so you can see more of what's happening behind the scenes while using the front-end application. Now of the SQL generated is hardcoded, they are all converted directly from the GraphQL requests.

Compiling

The basebox compiler (bbc) compiles the GraphQL schema into a database script (this is used to create the database for our backend service), a resolver file that is used by the dbproxy to query and mutate the database, and a typemap file that is also used by the dbproxy to map GraphQL and database types together.

You can make changes to the schema files and generated new config files (liek the database script), this is how you would run the basebox compiler (bbc)

docker run --rm -v ./../bbconf/basebox/:/bbconf --name bbc gitea.basebox.health/basebox-distribution/bbc:latest /bbconf/schema.graphql --prefix bbtest -o /bbconf/

Note that it's better to make a copy of the schema first and use that as changes would not necessarily work with the front-end/vue application.