docs: add production service architecture guide to public docs

Added comprehensive production service architecture guide with singleton patterns, caching strategies, and performance optimization for Express/Node.js services.

Changes:
- NEW: docs/PRODUCTION_SERVICE_ARCHITECTURE.md - Complete guide for using Brainy in production services
- CHANGED: .gitignore - Removed PRODUCTION_*.md pattern to allow public documentation
- CHANGED: README.md - Added subtle link to production architecture guide in "Production MVP" section

Guide covers:
- Instance-per-request anti-pattern (40x memory waste)
- Singleton pattern implementation (40x memory reduction, 30x faster)
- Three implementation patterns (simple, service class, middleware)
- Optimization strategies (cache sizing, lazy loading, warm-up)
- Concurrency and thread safety
- Production checklist and monitoring

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
David Snelling 2025-11-14 16:21:27 -08:00
parent 73557a53c6
commit 759e7fabd0
3 changed files with 512 additions and 1 deletions

View file

@ -197,6 +197,7 @@ const brain = new Brainy({
})
```
**Scale:** Thousands to hundreds of thousands • **Performance:** <5ms queries
**→ [Production Service Architecture](docs/PRODUCTION_SERVICE_ARCHITECTURE.md)** — Singleton patterns, caching, and scaling for Express/Node.js services
### 🏢 Growing Company → Multi-Million Scale
```javascript