Skip to content

Instantly share code, notes, and snippets.

@kannanhassouna
Created August 2, 2025 20:24
Show Gist options
  • Select an option

  • Save kannanhassouna/59891827f8923be0043502cf2fcfa322 to your computer and use it in GitHub Desktop.

Select an option

Save kannanhassouna/59891827f8923be0043502cf2fcfa322 to your computer and use it in GitHub Desktop.
Welcome file

EBU

Frontend

setup

  • git clone [email protected]:stonemtnrisk/quote-parser-fe.git
  • cd quote-parser-fe
  • git switch develop
  • npm run install
  • update the .env with attached .env
  • npm run dev

make sure you have node 22 <= and npm 10 <

Backend

before initializing the backend we need to setup localstack (local aws) and postgres

Localstack:

localstack is a cloud service in your local machine and we use it instead of using AWS directly.

  • docker run --rm -it -p 127.0.0.1:4566:4566 -p 127.0.0.1:4510-4559:4510-4559 -v /var/run/docker.sock:/var/run/docker.sock localstack/localstack
  • create s3 bucket called hit-local in us-east-1 awslocal s3api create-bucket --bucket hit-local --region us-east-2

Postgres:

  • docker run --name pg17 -e POSTGRES_PASSWORD=pass -e POSTGRES_USER=admin -e POSTGRES_DB=qp_local -p 5431:5432 -d postgres:17.5
  • restore database backup psql -U admin -d qp_local -p 5431 -f backup.dump

Django Server

  • git clone [email protected]:stonemtnrisk/quote-parser-fe.git
  • cd quote-parser-be
  • git switch develop
  • python -m venv .venv
  • source .venv/bin/activate
  • pip install -r requirements.txt
  • copy certificate to your env to the top of your local certifit .venv/lib/certifi/cacert.pem here is the certificate
  • update .env.dev with this attach env
  • create superuser python manage.py createsuperuser make sure it matches the username and password in the .env of frontend (username: admin, password: 123456).
  • run server DJANGO_ENV=development py manage.py runserver

Connect Frontend with backend via nodejs proxy

  • mkdir node-proxy-server
  • cd node-proxy-server
  • npm init -y
  • npm install express cors http-proxy-middleware
  • touch server.js
  • replace it with content with server.js.
  • node server.js

Parsing engine.

  • git clone [email protected]:stonemtnrisk/quote-parser-ai.git
  • cd quote-parser-ai
  • git switch develop
  • replace docker-compose.dev.yml file content with this
  • replace Dockerfile file content with this
  • docker compose -f ./docker-compose.dev.yml build
  • docker compose -f ./docker-compose.dev.yml up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment