| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A single-project .NET 10 Blazor Server application that summarizes uploaded documents with Claude Sonnet 5 on Amazon Bedrock, storing results in SQL Server.
One ASP.NET Core project. Interactive Server components render the UI; a small pipeline handles storage, extraction, and summarization.
src/DocumentProcessor.Web/ ├── Components/ │ ├── Documents/ # DocumentList, DocumentUploader, StatusBadge │ ├── Layout/ # MainLayout, DatabaseIndicator, DatabaseFooter │ ├── Pages/ # Home, Error │ └── Shared/ # ModalDialog ├── Configuration/ # BedrockOptions, StorageOptions, DatabaseOptions ├── Data/ # AppDbContext, connection resolution ├── Extensions/ # DI registration ├── Models/ # Document, DocumentStatus, Notification ├── Services/ # Storage, text extraction, summarization, pipeline └── wwwroot/ # app.css, Bootstrap
Upload flow:
Browser → Home.SaveAsync → IDocumentStorage (disk)
→ AppDbContext (row, status Pending)
→ DocumentPipeline → DocumentTextExtractor (PdfPig)
→ IDocumentSummarizer (Bedrock Converse)
→ AppDbContext (summary, status Processed)
Clone the repository
git clone https://github.com/aws-samples/sample-document-processing-system.git
cd sample-document-processing-systemConfigure AWS credentials
aws configureOr export AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION.
Confirm the model is reachable:
aws bedrock-runtime converse \
--region us-east-1 \
--model-id global.anthropic.claude-sonnet-5 \
--messages '[{"role":"user","content":[{"text":"Reply with: OK"}]}]' \
--inference-config '{"maxTokens":20}'Start SQL Server
docker compose up -dRuns mcr.microsoft.com/mssql/server:2022-latest on port 1433 with the sa password LocalDev!Passw0rd, matching the default connection string. Override it by setting MSSQL_SA_PASSWORD before docker compose up and updating the connection string to match. Data persists in the sqlserver-data volume.
Run the application
cd src/DocumentProcessor.Web
dotnet runThe DPS database and Documents table are created on first run.
Open the app
Navigate to https://localhost:7266. The HTTP port redirects there.
Uploads are processed synchronously, so the request stays open until Bedrock responds.
All settings live in src/DocumentProcessor.Web/appsettings.json and bind to option classes validated at startup, so a bad value fails the build-up rather than the first request.
"Bedrock": {
"Region": "us-east-1",
"SummarizationModelId": "global.anthropic.claude-sonnet-5",
"MaxTokens": 2000,
"MaxInputCharacters": 10000,
"MaxPdfPages": 5
}MaxPdfPages and MaxInputCharacters bound how much text is sent per document.
Note: Claude Sonnet 5 rejects temperature and topP. The inference config intentionally sets only maxTokens.
"Storage": {
"RootPath": "uploads",
"MaxFileSizeMegabytes": 50,
"MaxFilesPerUpload": 10,
"AllowedExtensions": [ ".pdf", ".txt", ".log" ]
}Files are written to uploads/yyyy/MM/dd/. Only extensions the extractor can read should be listed here.
"ConnectionStrings": {
"DefaultConnection": "Server=localhost,1433;Database=DPS;User Id=sa;Password=LocalDev!Passw0rd;TrustServerCertificate=true;MultipleActiveResultSets=true"
},
"Database": {
"UseSecretsManager": false
}Set Database:UseSecretsManager to true to build the connection string from an AWS Secrets Manager secret whose description starts with Password for RDS MSSQL used for MAM319.:
{
"username": "your_username",
"password": "your_password",
"host": "your-db-host.rds.amazonaws.com",
"port": "1433",
"dbname": "your_database_name"
}If the lookup fails, the app logs a warning and falls back to DefaultConnection.
The app targets SQL Server today and is structured so the engine can change in one place.
To complete a migration:
The entity configuration uses no SQL-Server-specific types, so the mapping ports unchanged.
| Status | Meaning |
|---|---|
| Pending | Row created, not yet processed |
| Processing | Text extraction and summarization under way |
| Processed | Summary stored |
| Failed | Extraction or the Bedrock call threw; see logs |
docker-compose.yml provisions SQL Server for development only; the app itself runs on the host via dotnet run. Containerizing it needs a standard .NET 10 Dockerfile.
The installed ASP.NET Core runtime does not match the target framework. Install the .NET 10 runtime, or check dotnet --list-runtimes.
Framework assets resolve through the static-web-assets manifest, which loads in the Development environment. Ensure ASPNETCORE_ENVIRONMENT=Development when running dotnet run; a published build serves them from wwwroot.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Built with ❤️ using .NET 10 and Claude Sonnet 5 on Amazon Bedrock
| Back | FazBrowse Home | New Git URL |