Skip to content

An app that helps you to practice negotiations with AI

Notifications You must be signed in to change notification settings

initialcapacity/negotiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0f129ec · Feb 12, 2025

History

84 Commits
Feb 12, 2025
Feb 12, 2025
Jul 17, 2023
Jun 12, 2024
Jun 12, 2024
Feb 12, 2025
Jun 12, 2024
Jun 12, 2024
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025
Jun 5, 2023
Jun 12, 2024
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025

Repository files navigation

Negotiator

An app that helps you to practice negotiations with ChatGPT.

Architecture

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.

Build and run

  1. Install uv and dependencies.

    brew install uv nodejs postgresql@14
    brew services run postgresql@14
    make install
  2. Set up the environment.

    cp .env.example .env
    vi .env
    source .env
  3. Set up the database.

    psql postgres < databases/drop_and_create_databases.sql
    make migrate migrate-test
  4. Build the frontend and watch for changes.

    make web-components/watch
  5. Run the fake oauth server in a separate terminal.

    make fake-auth/run
  6. Run the app in a separate terminal.

    source .env
    make negotiator/run
  7. Run tests.

    make test

Run with Docker

  1. Build container

    make web-components/build
    uv pip compile pyproject.toml -o requirements.txt
    docker build -t negotiator . 
  2. Run with docker

    docker run -p 8081:8081 --env-file .env.docker negotiator