An open API service indexing awesome lists of open source software.

https://github.com/allofphysicsgraph/ui_v7_website_flask_json

version 7 of the Physics Derivation Graph UI: a flask-based website with JSON backend
https://github.com/allofphysicsgraph/ui_v7_website_flask_json

flask graph json knowledge-graph physics python python3

Last synced: 6 days ago
JSON representation

version 7 of the Physics Derivation Graph UI: a flask-based website with JSON backend

Awesome Lists containing this project

README

          

This repo is the source code for the website , aka .
See [developer documentation](https://derivationmap.net/developer_documentation?referrer=github_README) after reading the [user documentation](https://derivationmap.net/user_documentation)

# Files not in this repo
You won't be able to immediately use the code because there are four files which you need to create associated with SSL certificates:
* `certs/dhparam.pem`
* `certs/fullchain.pem`
* `certs/privkey.pem`
* `.env`

How to generate those files depends on whether you're running a website locally or on the Internet.

## local webpage server

If you are on a local computer then see `certs/README.md` for instructions on generating local certificates.

The `.env` file contains three lines,
```bash
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=
```
If you are on a local computer then you can set the values to be random strings.

## web server on the Internet

If you are putting a webpage on the Internet then `certs/*.pem` are generated by [Let's Encrypt](https://letsencrypt.org/).
See

The `.env` file contains three lines,
```bash
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=
```
If you are putting a webpage on the Internet then the string values come from Google Cloud Console under "APIs & Services" > "Credentials" by creating a "Web application" type client.

# How to use (for the impatient)

For Docker installation see

Assuming you already have `git` and `docker` available,

## First time here? Get started with
```bash
git clone https://github.com/allofphysicsgraph/ui_v7_website_flask_json.git
```
If running locally,
```bash
cd ui_v7_website_flask_json/flask/
make docker_build
cd ..
make launch_webserver_interactive
```

See [developer documentation](https://derivationmap.net/developer_documentation?referrer=github_README) after reading the [user documentation](https://derivationmap.net/user_documentation)

## Not your first time here: Quickstart for returning to an existing instance

```bash
docker compose up --build --remove-orphans
```
As a two step process:
```bash
docker-compose build --progress tty
docker-compose up
```
On DigitalOcean server:
```bash
docker-compose up --build --remove-orphans --detach
```
or
```bash
docker-compose up --build --force-recreate --remove-orphans --detach
```

# Software Requirements

* Docker
* `git`
* `make`
* a web browser

## Software Versions

Because software is in Docker containers (for reproducibility), the versions of the Docker software you're using matter. The
software in this repo has been tested with
* `docker compose version` yields "2.34.0-desktop.1" on a Mac Airbook arm64; "v2.2.1" on a Mac Airbook amd64
* Compose file format 3.6; see
* `docker --version` yields "Docker version 28.0.4, build b8034c0" on a Mac Airbook arm64; "Docker version 20.10.11" on a Mac Airbook amd64
See for compatibility of versions.

## Troubleshooting and development

`docker-compose` instructions are from from

and

combining flask, gunicorn, nginx is from

nginx timeout

# Licensing

Unless otherwise noted, all source code is covered by the [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)

# Contributing

See CONTRIBUTING.md for guidance.

#EOF