An app that helps you to practice negotiations with ChatGPT.
Negotiator is a server side rendered app using Flask. It uses Lit to create web components to add dynamic capabilities to each page. Lit web components are developed and tested in the web components directory, and build Javascript and CSS artifacts are copied to the Flask app's static directory. This approach allows for the simplicity of server side rendered app with the dynamic features of a single page app.
-
Install python and dependencies
brew install [email protected] nodejs postgresql@14 python -m venv venv pip install -r requirements.txt npm install --prefix web-components
-
Set up the environment
cp .env.example .env vi .env source .env
-
Set up the database
psql postgres < databases/drop_and_create_databases.sql make migrate migrate-test
-
Build the frontend and watch for changes
npm run build:watch --prefix web-components
-
Run the fake oauth server in a separate terminal
python fake_auth_server.py
-
Run the app in a separate terminal
source .env python -m negotiator
mypy negotiator tests
python -m unittest
npm run test --prefix web-components
-
Install dependencies and run via gunicorn
pip install -r requirements.txt
gunicorn -w 4 'negotiator.app:create_app()' --bind=0.0.0.0:${PORT}
-
Pack and run via docker
pack build negotiator --builder=gcr.io/buildpacks/builder:v1
docker run -p 8081:8081 --env-file .env.docker negotiator