Skip to content

Commit 40b8289

Browse files
committed
Add comprehensive documentation and API reference for NLWebNet
- Introduced README.md with guides for getting started, development, and deployment. - Created api-reference.md detailing endpoints, request/response formats, and usage examples. - Added development-guide.md outlining project structure, coding conventions, and testing practices. - Updated todo.md with recent additions and project status, including demo setup guide and AI integration.
1 parent 0ee1bb9 commit 40b8289

File tree

5 files changed

+1020
-70
lines changed

5 files changed

+1020
-70
lines changed

README.md

Lines changed: 101 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
A .NET implementation of the [NLWeb protocol](https://github.com/microsoft/NLWeb) for building natural language web interfaces. This project provides both a reusable library and a demo application showcasing the NLWeb standard.
1111

1212
> **⚠️ PROOF OF CONCEPT - NOT PRODUCTION READY**
13-
>
13+
>
1414
> This is an experimental implementation created for **testing and evaluation purposes only**. While functional, this library is not intended for production use and should be considered a proof of concept to demonstrate NLWeb protocol capabilities in .NET environments.
1515
>
1616
> **Use cases:**
17+
>
1718
> - 🧪 Protocol evaluation and experimentation
1819
> - 📚 Learning and understanding NLWeb concepts
1920
> - 🔬 Research and development prototyping
2021
> - 🎯 Testing integration patterns with AI services
2122
>
2223
> **Not recommended for:**
24+
>
2325
> - ❌ Production applications
2426
> - ❌ Critical business systems
2527
> - ❌ Public-facing services
@@ -39,7 +41,7 @@ This implementation follows the [official NLWeb specification](https://github.co
3941

4042
```
4143
NLWebNet/
42-
├── src/NLWebNet/ # 📦 Core library (future NuGet package)
44+
├── src/NLWebNet/ # 📦 Core library (published NuGet package)
4345
│ ├── Models/ # Request/response data models
4446
│ ├── Services/ # Business logic interfaces and implementations
4547
│ ├── Endpoints/ # Minimal API endpoints (/ask, /mcp)
@@ -49,14 +51,16 @@ NLWebNet/
4951
├── samples/ # 🎯 Sample applications and usage examples
5052
│ ├── Demo/ # 🎮 .NET 9 Blazor Web App demo application
5153
│ └── AspireHost/ # 🏗️ .NET Aspire orchestration host
52-
├── deployment/ # 🚀 Deployment and infrastructure files
53-
│ ├── azure/ # Azure deployment (Bicep templates)
54-
│ ├── kubernetes/ # Kubernetes manifests and Helm charts
55-
│ ├── docker/ # Docker and Docker Compose files
56-
│ └── scripts/ # Deployment and validation scripts
57-
├── doc/ # 📚 Documentation
58-
└── tests/ # 🧪 Unit and integration tests
59-
└── NLWebNet.Tests/ # 📋 xUnit test project
54+
├── doc/ # � Documentation and setup guides
55+
│ ├── demo-setup-guide.md # 🔧 Complete AI integration setup guide
56+
│ ├── manual-testing-guide.md # 🧪 API testing instructions
57+
│ └── todo.md # 📋 Implementation status and roadmap
58+
├── tests/ # 🧪 Unit and integration tests
59+
│ └── NLWebNet.Tests/ # 📋 MSTest test project (39 tests)
60+
├── helm/ # ⚙️ Helm charts for Kubernetes
61+
├── k8s/ # ⚙️ Kubernetes manifests
62+
├── deploy/ # 🚀 Azure deployment templates
63+
└── scripts/ # �️ Build and deployment scripts
6064
```
6165

6266
## 🔄 NLWeb Protocol Flow
@@ -164,7 +168,7 @@ graph TB
164168

165169
## 🚀 Quick Start
166170

167-
> **📋 Note**: This library is provided for **testing and evaluation purposes only**. Please review the development status above before integrating into any project.
171+
> **📋 Note**: This library is provided for **testing and evaluation purposes only**. This is alpha-quality software that may contain bugs or incomplete features. Please review the development status section before integrating into any project.
168172
169173
### Using the Library in Your Project
170174

@@ -210,7 +214,7 @@ app.MapNLWebNet(); // Map NLWebNet minimal API endpoints
210214
3. **Run the demo application**
211215

212216
```bash
213-
cd demo
217+
cd samples/Demo
214218
dotnet run
215219
```
216220

@@ -223,14 +227,15 @@ app.MapNLWebNet(); // Map NLWebNet minimal API endpoints
223227
- **Interactive Demo** (`/nlweb`): UI for testing NLWeb queries
224228
- Query input with natural language questions
225229
- Mode selection (List, Summarize, Generate)
226-
- Streaming toggle option
227-
- *Note: Core NLWeb functionality is under development - currently shows placeholder responses*
230+
- Streaming responses with real-time display
231+
- API testing interface
228232
- **API Documentation**: OpenAPI specification for `/ask` and `/mcp` endpoints
229-
- *Note: API endpoints are planned but not yet implemented*
233+
234+
> **🔧 Real AI Integration**: The demo uses mock responses by default. For actual AI-powered responses, see the [Complete Setup Guide](doc/demo-setup-guide.md) for Azure OpenAI and OpenAI API integration.
230235
231236
### Using the Library
232237

233-
> **⚠️ For testing and evaluation only - not recommended for production use**
238+
> **⚠️ Alpha software - for evaluation and testing only**
234239
235240
Install the NuGet package:
236241

@@ -261,16 +266,16 @@ app.MapNLWebNet();
261266

262267
### Testing NLWeb Features
263268

264-
The demo application at `http://localhost:5037` provides comprehensive testing of all NLWeb protocol features:
269+
The demo application at `http://localhost:5037` provides testing of core NLWeb protocol features:
265270

266271
**Interactive Demo Pages:**
267272

268273
- **Home Page (`/`)**: Project overview and navigation to demo features
269-
- **NLWeb Demo (`/nlweb`)**: Advanced query interface with tabbed sections:
274+
- **NLWeb Demo (`/nlweb`)**: Interactive query interface with tabbed sections:
270275
- **Query Tab**: Interactive form with all NLWeb parameters (query, mode, site, etc.)
271276
- **Streaming Tab**: Real-time streaming response demonstration
272277
- **API Test Tab**: Raw HTTP request/response testing
273-
- **API Test (`/api-test`)**: Comprehensive API testing interface with request configuration
278+
- **API Test (`/api-test`)**: API testing interface with request configuration
274279
- **MCP Demo (`/mcp-demo`)**: Model Context Protocol demonstration with tools and prompts
275280

276281
**Query Modes Supported:**
@@ -285,7 +290,7 @@ The demo application at `http://localhost:5037` provides comprehensive testing o
285290
- Direct HTTP calls to `/ask` endpoint with various parameters
286291
- MCP protocol testing via `/mcp` endpoint with tool and prompt support
287292
- OpenAPI specification available at `/openapi/v1.json`
288-
- Comprehensive manual testing guides in `/doc/manual-testing-guide.md`
293+
- Manual testing guides in `/doc/manual-testing-guide.md`
289294

290295
**Example API Usage:**
291296

@@ -305,10 +310,41 @@ curl -X POST "http://localhost:5037/ask" \
305310

306311
# MCP tool listing
307312
curl -X POST "http://localhost:5037/mcp" \
308-
-H "Content-Type: application/json" \
309-
-d '{"method": "list_tools"}'
313+
-H "Content-Type: application/json" \ -d '{"method": "list_tools"}'
310314
```
311315

316+
## 🔧 Real AI Integration
317+
318+
The demo application works with mock responses by default, but can be configured for real AI-powered responses using Azure OpenAI or OpenAI API.
319+
320+
### Quick Setup
321+
322+
1. **Choose Your AI Provider**: Azure OpenAI (recommended) or OpenAI API
323+
2. **Install Provider Package**:
324+
325+
```bash
326+
cd samples/Demo
327+
dotnet add package Microsoft.Extensions.AI.AzureAIInference # For Azure OpenAI
328+
# OR
329+
dotnet add package Microsoft.Extensions.AI.OpenAI # For OpenAI API
330+
```
331+
332+
3. **Configure API Keys**: Update `samples/Demo/appsettings.json` or use user secrets
333+
4. **Add Service Registration**: Update `Program.cs` with AI service registration
334+
335+
### Complete Setup Guide
336+
337+
📖 **[Complete AI Integration Guide](doc/demo-setup-guide.md)** - Step-by-step instructions for:
338+
339+
- Azure OpenAI and OpenAI API configuration
340+
- Security best practices for API key management
341+
- Service registration and dependency injection
342+
- Troubleshooting common setup issues
343+
- Configuration options
344+
- Production deployment considerations
345+
346+
The guide includes examples, FAQ, and troubleshooting to get you up and running with AI responses.
347+
312348
## ⚙️ Configuration
313349

314350
NLWebNet uses standard ASP.NET Core configuration patterns for managing settings and external service credentials.
@@ -405,6 +441,7 @@ builder.Services.Configure<AzureSearchOptions>(
405441
NLWebNet supports multiple deployment options for different environments:
406442

407443
### 🐳 Docker Deployment
444+
408445
```bash
409446
# Quick start with Docker Compose
410447
git clone https://github.com/jongalloway/NLWebNet.git
@@ -413,6 +450,7 @@ cd deployment/docker && docker-compose up --build
413450
```
414451

415452
### ☁️ Azure Cloud Deployment
453+
416454
```bash
417455
# Deploy to Azure Container Apps
418456
./deployment/scripts/deploy/deploy-azure.sh -g myResourceGroup -t container-apps
@@ -422,13 +460,16 @@ cd deployment/docker && docker-compose up --build
422460
```
423461

424462
### ⚙️ Kubernetes Deployment
463+
425464
```bash
426465
# Deploy to any Kubernetes cluster
427466
kubectl apply -f deployment/kubernetes/manifests/
428467
```
429468

430469
### 📦 Container Registry
470+
431471
Pre-built images available soon. For now, build locally:
472+
432473
```bash
433474
./deployment/scripts/deploy/build-docker.sh -t latest
434475
```
@@ -437,50 +478,40 @@ Pre-built images available soon. For now, build locally:
437478

438479
## 🛠️ Development Status
439480

440-
This is a **proof of concept implementation** of the NLWeb protocol, available as an **alpha prerelease package** for testing and evaluation purposes only.
481+
This is an **alpha implementation** of the NLWeb protocol, provided as an **experimental package** for testing and evaluation purposes.
441482

442-
### ⚠️ EXPERIMENTAL SOFTWARE - NOT PRODUCTION READY
483+
### ⚠️ ALPHA SOFTWARE - EXPERIMENTAL RELEASE
443484

444-
**Completed (Phases 1-11) - For Testing & Evaluation:**
485+
**Current Implementation Status:**
445486

446-
- [x] **Core Library**: Complete NLWeb protocol implementation with Minimal API endpoints
447-
- [x] **Data Models**: Request/response models with validation and JSON serialization
487+
- [x] **Core Library**: Basic NLWeb protocol implementation with Minimal API endpoints
488+
- [x] **Data Models**: Essential request/response models with validation and JSON serialization
448489
- [x] **Business Logic**: Service layer with Microsoft.Extensions.AI integration
449-
- [x] **NuGet Package**: Published as alpha prerelease at [nuget.org/packages/NLWebNet](https://www.nuget.org/packages/NLWebNet/)
450-
- [x] **CI/CD Pipeline**: Automated build, test, validation, and publishing to NuGet.org
451-
- [x] **Documentation**: Comprehensive README, API documentation, and usage examples
490+
- [x] **MCP Integration**: Basic Model Context Protocol support with tools and prompts
491+
- [x] **Demo Application**: .NET 9 Blazor Web App with interactive components for testing
492+
- [x] **AI Integration**: Setup guides for Azure OpenAI and OpenAI API (experimental)
493+
- [x] **Testing**: Unit tests and manual testing guides (basic coverage)
494+
- [x] **Configuration**: CORS, AI services, and multi-environment support
495+
- [x] **Documentation**: API documentation and setup guides (evolving)
496+
- [x] **CI/CD**: Basic automated build, test, and validation pipeline
497+
- [x] **NuGet Package**: Alpha prerelease at [nuget.org/packages/NLWebNet](https://www.nuget.org/packages/NLWebNet/)
452498

453-
**🎯 Intended Use Cases:**
499+
**🎯 Suitable For:**
454500

455501
- Protocol evaluation and experimentation
456502
- Learning NLWeb concepts and implementation patterns
457503
- Research and development prototyping
458-
- Testing integration with AI services and data backends
504+
- Testing integration patterns with AI services
505+
- Exploring .NET AI abstractions and Model Context Protocol
459506

460-
**❌ Not Suitable For:**
507+
**⚠️ Alpha Release Limitations:**
461508

462-
- Production applications or critical business systems
463-
- Public-facing services or enterprise applications
464-
- Applications requiring commercial support or SLAs
465-
- [x] **MCP Integration**: Full Model Context Protocol support with tools and prompts
466-
- [x] **Demo Application**: Modern .NET 9 Blazor Web App with interactive components
467-
- [x] **Testing**: 39 unit tests with 100% pass rate plus comprehensive manual testing guides
468-
- [x] **Configuration**: CORS, AI services, and multi-environment support
469-
- [x] **Documentation**: XML documentation, README, and API usage examples
470-
- [x] **CI/CD**: GitHub Actions workflow for build, test, and validation
471-
- [x] **NuGet Package**: Fully functional package with working extension methods (0.1.0-alpha.3)
472-
- [x] **API Exposure**: Extension methods accessible via `using NLWebNet;` (Microsoft pattern)
473-
- [x] **End-to-End Validation**: Complete package installation and functionality testing
474-
- [x] **Package Metadata**: Enhanced NuGet metadata with title, copyright, repository type for professional presentation
475-
476-
**📋 Next Steps (Phase 11):**
477-
478-
- [x] Enhanced package metadata and improved Package Manager display
479-
- [ ] Health check integration
480-
- [ ] Performance monitoring hooks
481-
- [ ] Rate limiting support
482-
- [ ] Docker containerization
483-
- [ ] Azure deployment templates
509+
- **Experimental software** - may contain bugs or incomplete features
510+
- **API surface may change** in future releases without notice
511+
- **Not recommended for production use** - suitable for evaluation and experimentation only
512+
- **Limited support** - community-driven development with no guarantees
513+
- **Performance and reliability** not yet optimized for production workloads
514+
- **Feature completeness** varies - some advanced NLWeb features may be basic implementations
484515

485516
## 🤝 Contributing
486517

@@ -493,13 +524,27 @@ This project follows the [NLWeb specification](https://github.com/microsoft/NLWe
493524
## 📖 Related Resources
494525

495526
- **[NLWeb Official Repository](https://github.com/microsoft/NLWeb)** - Specification and reference implementation
527+
- **[Complete Demo Setup Guide](doc/demo-setup-guide.md)** - Step-by-step AI integration instructions
496528
- **[Model Context Protocol](https://modelcontextprotocol.io/)** - MCP documentation
497529
- **[Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/)** - .NET AI abstractions
530+
- **[Manual Testing Guide](doc/manual-testing-guide.md)** - API testing with curl examples
498531

499532
## 📄 License
500533

501534
This project is licensed under the [MIT License](LICENSE).
502535

503536
## 🏷️ Version
504537

505-
Current version: `0.1.0-alpha.3` (Prerelease - enhanced metadata and improved Package Manager display)
538+
[![NuGet Version](https://img.shields.io/nuget/v/NLWebNet.svg)](https://www.nuget.org/packages/NLWebNet/) - Alpha experimental release
539+
540+
Basic NLWeb protocol implementation with AI integration support for testing and evaluation purposes.
541+
542+
**Key Features (Alpha Quality):**
543+
544+
- ✅ Basic NLWeb protocol implementation (/ask, /mcp endpoints)
545+
- ✅ AI integration support (Azure OpenAI, OpenAI API) - experimental
546+
- ✅ .NET 9 Blazor demo application for testing
547+
- ✅ Model Context Protocol (MCP) support - basic implementation
548+
- ✅ Streaming responses with Server-Sent Events
549+
- ✅ Documentation and setup guides (evolving)
550+
- ✅ Alpha NuGet package with working extension methods

doc/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# NLWebNet Documentation
2+
3+
Welcome to the NLWebNet documentation directory. This contains comprehensive guides, setup instructions, and reference materials for using and developing with NLWebNet.
4+
5+
## 📚 Available Documentation
6+
7+
### 🚀 Getting Started
8+
9+
- **[Demo Setup Guide](demo-setup-guide.md)** - Complete step-by-step guide for setting up the demo application with real AI integration (Azure OpenAI, OpenAI API)
10+
- **[Manual Testing Guide](manual-testing-guide.md)** - API testing instructions with curl examples and sample requests
11+
- **[API Reference](api-reference.md)** - Comprehensive API documentation with endpoints, parameters, and examples
12+
13+
### 🔧 Development & Testing
14+
15+
- **[Development Guide](development-guide.md)** - Complete developer guidance for contributing to NLWebNet
16+
- **[TODO & Implementation Status](todo.md)** - Current project status, completed features, and future roadmap
17+
- **[Package Validation](package-validation.md)** - Guide for validating the NuGet package functionality
18+
- **[Sample Requests](sample-requests.http)** - HTTP request samples for testing the API endpoints
19+
20+
### 📊 Monitoring & Operations
21+
22+
- **[Monitoring Demo](monitoring-demo.md)** - Guide for setting up monitoring and observability
23+
24+
### 🚀 Deployment
25+
26+
- **[Deployment Guide](deployment/README.md)** - Comprehensive deployment instructions for Docker, Kubernetes, and Azure
27+
28+
## 🎯 Quick Navigation
29+
30+
### For New Users
31+
32+
1. Start with the main [README.md](../README.md) for project overview
33+
2. Follow the [Demo Setup Guide](demo-setup-guide.md) to get the demo running
34+
3. Use the [Manual Testing Guide](manual-testing-guide.md) to test API functionality
35+
4. Reference the [API Reference](api-reference.md) for detailed endpoint documentation
36+
37+
### For Developers
38+
39+
1. Review the [Development Guide](development-guide.md) for comprehensive coding guidelines
40+
2. Check the [TODO & Implementation Status](todo.md) for current project state
41+
3. Use [Package Validation](package-validation.md) for testing the library
42+
4. Reference [Sample Requests](sample-requests.http) for API development
43+
44+
### For DevOps/Deployment
45+
46+
1. Follow the [Deployment Guide](deployment/README.md) for production deployments
47+
2. Configure monitoring with [Monitoring Demo](monitoring-demo.md)
48+
49+
## 📖 External Documentation
50+
51+
- **[NLWeb Protocol Specification](https://github.com/microsoft/NLWeb)** - Official NLWeb specification
52+
- **[Model Context Protocol](https://modelcontextprotocol.io/)** - MCP documentation
53+
- **[Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/)** - .NET AI abstractions documentation
54+
55+
## 🛠️ Documentation Status
56+
57+
> **⚠️ Alpha Documentation**: Like the project itself, this documentation is evolving. Some guides may be incomplete or subject to change as the project develops.
58+
59+
### Documentation Quality
60+
61+
-**Demo Setup Guide**: Comprehensive with troubleshooting
62+
-**Manual Testing Guide**: Complete with examples
63+
-**API Reference**: Detailed endpoint documentation with examples
64+
-**Development Guide**: Complete coding guidelines and best practices
65+
-**TODO/Status**: Up-to-date project tracking
66+
-**Deployment Guide**: Multi-platform coverage
67+
- 🔄 **Package Validation**: Basic coverage, evolving
68+
- 🔄 **Monitoring Demo**: Basic setup, expanding
69+
70+
## 🤝 Contributing to Documentation
71+
72+
Found an issue or want to improve the documentation?
73+
74+
1. Check existing [issues](https://github.com/jongalloway/NLWebNet/issues) for documentation bugs
75+
2. Submit pull requests with documentation improvements
76+
3. Follow the project's alpha/experimental messaging guidelines
77+
78+
## 📋 Document Conventions
79+
80+
- **Alpha Quality Warning**: All documentation includes appropriate alpha/experimental warnings
81+
- **Step-by-Step Guides**: Include prerequisites, troubleshooting, and FAQ sections
82+
- **Code Examples**: Provide working examples that can be copy-pasted
83+
- **Security Notes**: Include security best practices where applicable
84+
- **Platform Coverage**: Cover Windows, macOS, and Linux where relevant
85+
86+
---
87+
88+
**Need help?** Check the [main README](../README.md) or open an [issue](https://github.com/jongalloway/NLWebNet/issues) for assistance.

0 commit comments

Comments
 (0)