tc-copilot-document-analyser
.NET 8 FastEndpoints API that analyses uploaded travel PDFs (e.g. DMC itineraries), extracting text via PdfPig or AWS Textract and structuring it with Anthropic Claude on AWS Bedrock for CoPilot.
Health score
0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.
Facts
| Languages | csharp |
| Frameworks | ASP.NET Core 8, FastEndpoints 6 |
| Runtimes | .NET 8 |
| Tests / CI | some / CI in place |
| Last commit | 2025-10-24 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | AI and assistants (system generated; curate in repo-owners.json to override) |
| Product area | TC Co-Pilot |
| Hosted | AWS Deployed to AWS
|
| Releases | 0 release pipeline(s): |
| Integration | rest |
| Source | Open in Azure DevOps |
Dependencies in context
Entanglement
loose No binding mechanisms apply: this system needs no untangling work.
Migration playbooks
Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.
ZDD adoption
No excuseNothing technical is holding this repo on the three-week release. It either already deploys without downtime (AWS) or is a modern, well-tested service the automated stealth path can carry today. Already deploys as a container to AWS, which releases without downtime today. Separating it from the three-week release is a process decision, not a technical one.
- Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
- Raise automated test coverage first: ZDD trades the end-of-sprint manual gate for continuous automated confidence, so the tests are the entry ticket.
- Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
- Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
- Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
- Use ECS rolling deployments with health checks gating traffic, and take this service off the three-week release train.
- Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.
SQL Server exit
Not applicableNo SQL Server dependency is recorded for this repo. Nothing to migrate.
Containerisation
Already containerisedIts pipelines already build containers and deploy to AWS. Nothing to do here.
Recommended actions
No specific actions for this repo. It either needs only normal maintenance, or its work is covered by an estate-level action. See the full programme.
Assessment notes
tc-copilot-document-analyser
Purpose
A "Travel PDF API" for the CoPilot family: POST /travel/upload-pdf accepts a PDF and returns structured travel data. Text is extracted with PdfPig, PDFsharp or asynchronous AWS Textract (staging pages through an S3 bucket), then an LLM pass over AWS Bedrock (Anthropic Claude, via a "Conversant" tool-calling service) structures the content — with tool calls resolving destinations and places against estate APIs. A ValidatePdf feature pre-checks uploads.
Tech stack
C# on .NET 8 with FastEndpoints 6 (+Swagger), FluentResults, AWSSDK BedrockRuntime/Textract/S3, TC.ConnectionBroker.Aws for AWS connection brokering, TC health checks including a deep Bedrock connectivity check. A separate TC.DocumentAnalyser.API.Client solution and TC.DocumentAnalyser.Contract project publish a client package via build-api-client.yml.
Deployment
Included via build->yaml-deploy with 0 classic releases: build pipeline tc-documentanalyser-api (note: name differs from the repo) from build-api.yml, shared InternalOSS ci.yml with containerAfterBuild: true into the document-analyser container namespace, TFVars deployment in functional area phenix (eu-west-1), SonarCloud analysis (uktc_tc-documentanalyser-api).
Dependencies
Internal: TC.ConnectionBroker.* (tc-connectionbroker), TC.Diagnostics.HealthChecks (tc-diagnostics-portal), TC.Destination.Queries.API.Client (phenix-destination-management) and TC.Phenix.Place.Queries.API.Client (phenix-place-repository) used as LLM tool-call lookups. External: AWS Bedrock (Anthropic models) and AWS Textract.
Data stores
No database. The Textract path stages documents in a hardcoded dmc-ai-poc S3 bucket (created on demand, objects deleted after processing) — a proof-of-concept name that should be parameterised before being relied on in production.
Integration points
Inbound REST (FastEndpoints, Swagger); no authentication middleware is registered in Program.cs, so access control presumably relies on network placement. Outbound REST to destination/place query APIs and AWS service calls to Bedrock/Textract/S3.
Code health
Reasonable for a young service: ~16 test files across API and client test projects, SonarCloud in CI. No README at the repo root; instead an honest Improvements.md listing pre-production gaps (prompts in code, LLM config not yet in SSM, conversant approach hardcoded). Last commit 2025-10-24.
Modernisation risks
Low from a platform standpoint (.NET 8, containerised, AWS-native), but it is early-lifecycle AI plumbing: the self-declared pre-production improvements are outstanding, the PoC-named S3 bucket is hardcoded, there is no visible authentication on the upload endpoint, and cost/behaviour depend on Bedrock model choices configured in DocumentProcessing settings.