Skip to content

A data visualization website for saving and displaying data gathered from various sources, send the collected data via http(s) POST to the server to the data url.

License

ludde127/dataViz

Repository files navigation

Yapity

Setup

Create secret/secret.py file

IS_PRODUCTION = False or True
DJANGO_SECRET_KEY = "<secret key>"
POSTGRES__PASS = "<postgres password>"
POSTGRES__PORT = "<postgres port>"

Create .yapenv file

The .yapenv contain environment variables that will be loaded on startup.

.yapenv: Contains non-sensitive shared data that is tracked by git.

.yapenv.local: Contains environment variables used for local development.

ALLOWED_HOSTS = example.com,192.168.1.123
CSRF_TRUSTED_ORIGINS = https://example.com
CORS_ORIGIN_WHITELIST = https://example.com

.yapenv.production: Contains sensitive data used in the production build.

Setup a PostgreSQL server

You can setup a PostgreSQL server using their installer. Then create a database in the postgres server called dataViz.

Migrate db

python manage.py makemigrations
python manage.py migrate

Run Django Server

python manage.py runserver

Typescript and Tailwind

If you're going to change the typescript code or the html templates and need to recompile typescript or tailwind:

Setup

cd node
pnpm i

Run build script

The script will be watching for changes and continuously recompile, interrupt it using Ctrl+C.

pnpm build

Adding new scripts

Standalone scripts

When adding new scripts, you can add a new standalone script if you put it directly in the src directory. This script will have to be manually added to base.html.

Imported scripts

Scripts can also be imported in other script files, this way they will all be bundled into one big script. See main.ts for reference.

About

A data visualization website for saving and displaying data gathered from various sources, send the collected data via http(s) POST to the server to the data url.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published