Skip to main content
Glama
README.md
# Teamcenter Phase 1 Workflow Skeleton

This repository now contains a modular Phase 1 demonstration scaffold for the upload-to-Teamcenter-draft workflow.

## What is included

- Existing Teamcenter FastAPI wrapper and MCP bridge preserved
- New Phase 1 workflow API under `/api/*`
- SQLAlchemy-backed workflow persistence with SQLite default and PostgreSQL-ready configuration
- Deterministic mock Teamcenter mode for demos
- File validation, extraction, similarity search, BQ drafting, document generation, approval, and save flow
- Vite React frontend scaffold in `frontend/`
- Demo data and sample upload fixtures in `shared/demo/`

## Demo credentials

- `viewer / viewer`
- `engineer / engineer`

## Local backend startup

1. Create or activate a Python 3.11 environment.
2. Install dependencies:
   `pip install -r requirements.txt`
3. Copy `.env.example` to `.env` and adjust values if needed.
4. Run the API:
   `python -m uvicorn app.main:app --reload`

The API will initialize demo users and the local SQLite database automatically on startup.

## Frontend startup

1. `cd frontend`
2. `npm install`
3. `npm run dev`

## Docker startup

`docker compose up --build`

## Demo happy path

1. Log in as `engineer`.
2. Upload `shared/demo/uploads/requirement_sample.txt` in mock mode.
3. Call:
   - `POST /api/workflows/{id}/validate-files`
   - `POST /api/workflows/{id}/extract`
   - `PUT /api/workflows/{id}/requirement-review`
   - `POST /api/workflows/{id}/similarity-search`
   - `POST /api/workflows/{id}/bq-selection`
   - `PUT /api/workflows/{id}/bq-draft`
   - `POST /api/workflows/{id}/bq-prepare`
   - `POST /api/workflows/{id}/documents/generate`
   - `POST /api/workflows/{id}/approve`
   - `POST /api/workflows/{id}/save-teamcenter`

## Tests

Backend and contract tests live under `tests/`.