Echo client app - full microservice local stack, getting started

TLDR

Step 1. Install conda, additional notes on conda setup: [1], [2]

Step 2. Install git, and clone repos [1], [2]

Step 3. Create environment by typing the following in a command prompt: "conda create -n echo python=3.12"

Step 4. Activate or deactivate using: "conda activate echo"; "conda deactivate"

Step 5. Install requirements "pip install -r requirements.txt"

Step 6. Create .env file in echo-private root folder

Step 7. Initialize SQLite Databases: 'python -c "import api_gateway; api_gateway.init_db()"';'python -c "import logging_service; logging_service.init_db()"'

Step 8 Run Services (Separate Terminals): python logging_service.py; python parser_service.py; python parser_service.py; python worker.py; Note, I like to run with this for output logging as well: "python api_gateway.py 2>&1 | tee flask.log"














---


Everything else

Got it — you’re starting from absolute zero (fresh Windows machine, no Python, pip, or Conda). I’ll lay out step-by-step instructions in the same style you liked — starting from installing Python/Conda to running Echo locally.


Echo App – Full Local Setup (Fresh Windows Machine)


1. Install Python (Core Requirement)

Option A – Python Only (Lightweight, Good for Production Mirror)

  1. Go to python.org/downloads/windows.

  2. Download Python 3.12 (64-bit).

  3. During install:

    • Check Add Python to PATH.

    • Enable pip and venv features.

  4. Disable Windows Store aliases:

    • Settings → Apps → Advanced app settings → App execution aliases

    • Turn OFF python.exe and python3.exe.

Verify install:

python --version
pip --version

Option B – Anaconda (Recommended for Data Science / Multi-env)

  1. Download Miniconda (lighter) or Anaconda.

  2. Install with default settings (adds conda to PATH).

  3. Verify:

conda --version

2. Install Git (if not already installed)

Download Git for Windows → choose defaults.

Verify:

git --version

3. Clone or Copy Project

If you already have the echo-private folder, skip this. Otherwise:

cd C:\Users\saad0\Documents\source
git clone https://github.com/YOUR-REPO/echo-private.git
cd echo-private

4. Choose Environment Setup


Option 1: Using Conda (Recommended)

Create Environment

conda create -n echo python=3.12
conda activate echo

Install Requirements

pip install -r requirements.txt

Option 2: Using Virtualenv (Lightweight)

Create and Activate Virtual Environment

python -m venv .venv
.venv\Scripts\activate

Install Requirements

pip install -r requirements.txt

5. Configure Environment Variables

Create .env file in echo-private root:

FLASK_SECRET_KEY=dev-session
JWT_SECRET_KEY=your_shared_secret
JWT_ISSUER=https://aurorahours.com/identity-backend
JWT_EXPIRATION_MINUTES=15

OIDC_CLIENT_ID=browser-ui
OIDC_CLIENT_SECRET=dev-client-secret
OIDC_AUTH_URL=https://aurorahours.com/identity-backend/authorize
OIDC_TOKEN_URL=https://aurorahours.com/identity-backend/token
OIDC_REDIRECT_URI=http://localhost:5000/callback

OPENAI_API_KEY=sk-your-openai-key

(Add .env to .gitignore — already included in your file.)


6. Initialize SQLite Databases

Run once to create required tables:

python -c "import api_gateway; api_gateway.init_db()"
python -c "import logging_service; logging_service.init_db()"

7. Run Services (Separate Terminals)

Terminal 1 – Logging Service

python logging_service.py

Terminal 2 – Parser Service

python parser_service.py

Terminal 3 – API Gateway (UI)

python api_gateway.py

Terminal 4 – Worker

python worker.py

8. Verify Setup


9. Reset State for Testing

To start fresh:

del jobs.db
del logs.db
rd /s /q doc_store
mkdir doc_store

Re-run DB init commands.


10. Next Steps (Future)

  • Split services into subfolders for cPanel deployment with passenger_wsgi.py each.

  • Configure secrets via cPanel > Setup Python App > Environment Variables.

  • Optional: Migrate SQLite → Postgres for multi-user scaling.


Do you want me to make this a single Markdown doc (docs/setup-windows.md) for your repo?
Or turn this into a PowerShell bootstrap script that automates install checks, venv creation, requirements install, DB init, and opens multiple terminals for services?

Comments

Popular posts from this blog

Feature: Audit log for one login, and identity service

Getting started - Build your data science lab environment

QA - Run #1 - Results