Go to file
Daniel Egger 7d233f21ea Style learning sequence 2022-05-25 18:23:42 +02:00
.git-crypt Add 1 git-crypt collaborator 2022-02-02 11:57:00 +01:00
client Style learning sequence 2022-05-25 18:23:42 +02:00
compose/django Add caprover config 2022-02-08 17:16:16 +01:00
cypress Skip test 2022-04-21 08:45:15 +02:00
docs Add local config 2022-05-16 14:42:03 +02:00
env Add venv cache to make pipelines faster 2022-02-08 22:34:02 +01:00
env_secrets Serve vue index page in development directly from vue 2022-05-23 09:23:35 +02:00
server Style learning sequence 2022-05-25 18:23:42 +02:00
tailwind Refactor Circle page 2022-05-25 18:23:42 +02:00
.dockerignore Make docker compose work locally 2022-02-02 23:01:22 +01:00
.editorconfig Setup working locally 2022-02-02 09:35:02 +01:00
.gitattributes Initial commit after cookiecutter 2022-02-02 09:10:21 +01:00
.gitignore Add integrated tailwind support for client and server 2022-05-23 11:09:07 +02:00
.pre-commit-config.yaml Initial commit after cookiecutter 2022-02-02 09:10:21 +01:00
.tool-versions Setup working locally 2022-02-02 09:35:02 +01:00
README.md added api intro to readme 2022-05-23 14:41:01 +02:00
README_generated.md Setup working locally 2022-02-02 09:35:02 +01:00
bitbucket-pipelines.yml Add venv cache to make pipelines faster 2022-02-08 22:34:02 +01:00
caprover_create_app.py Add configuration 2022-02-08 17:03:40 +01:00
caprover_deploy.sh Configure logging 2022-02-08 18:50:56 +01:00
cypress.json Add cypress tests 2022-02-08 14:44:11 +01:00
docker-compose-local.yml Make docker compose work locally 2022-02-02 23:01:22 +01:00
git-crypt-encrypted-files.txt added my env file to encryptet_files.txt 2022-04-14 15:01:42 +02:00
local-setup-for-tests.sh Added function to create testdata and DB 2022-04-12 14:53:50 +02:00
package.json Styling of circle page 2022-05-25 18:23:42 +02:00
prepare_server_cypress.sh Added function to create testdata and DB 2022-04-12 14:53:50 +02:00
production.yml Moved env files 2022-02-02 12:03:10 +01:00
tailwind.config.js Styling of circle page 2022-05-25 18:23:42 +02:00
trufflehog-allow.json Update trufflehog allow 2022-02-08 16:23:56 +01:00
trufflehog-exclude-patterns.txt Add bitbucket pipelines 2022-02-03 19:13:10 +01:00

README.md

VBV Lernwelt

Project setup is based on cookiecutter-django project template.

Run for development

# run tailwind cli (on project root folder!)
npm run tailwind 

# run vue vite dev server
cd client && npm run dev

# run django dev server
cd server && python manage.py runserver

Installation

See .tool-versions file for used django and node version

Server part

Run every sub command in the server directory

Create a new PostgreSQL database and role

createdb vbv_lernwelt
createuser vbv_lernwelt

Set the environment variable accordingly

export VBV_DATABASE_URL='postgres://vbv_lernwelt@localhost:5432/vbv_lernwelt'

Set VBV_DJANGO_READ_DOT_ENV_FILE=True to make the config read the example.env file (with direnv!?).

python manage.py migrate

# sync server
python manage.py runserver

# or async server
# uvicorn config.asgi:application --host 0.0.0.0 --reload

Client part

Run every command in the client directory

npm install

# run dev server
npm run dev

General part

Cypress and TailwindCSS ist installed for client and server, so there is this package.json on the project root directory

npm install

Deployment to CapRover

# run deploy script
./caprover_deploy.sh

IntelliJ Configuration

  • In the .idea/vbv_lernwelt.iml file change the module type to "PYTHON_MODULE".
  • Add django facet in "Project Structure".
  • Run configuration with "Python -> server.py" to have async debugging support.

Optional

Install the EnvFile Plugin

Install the tailwind css Plugin from Jetbrains

Wagtail API intro

get all pages:

http://localhost:8000/api/v2/pages/

get Analyse Circle (the one with the most demo data)

http://localhost:8000/api/v2/pages/?title=Analyse

Get Circles only

http://localhost:8000/api/v2/pages/?type=learnpath.Circle

Get All Contents from that circle:

http://localhost:8000/api/v2/pages/?child_of=11