DocLens AI is a production-grade documentation analysis platform that evaluates technical documentation for readability, structure, completeness, and writing style. It provides a CLI tool, a REST API, and Dockerized deployment, backed by automated testing and CI.
This project is designed to demonstrate real-world software engineering practices, not a demo or toy project.
- Analyze documentation from a public URL
- Readability scoring using linguistic metrics
- Structural analysis (headings, lists, flow)
- Completeness checks (examples, instructions)
- Writing style assessment
- Command Line Interface (CLI)
- FastAPI-based REST API
- Docker & Docker Compose support
- End-to-end validation script
- CI pipeline with automated tests
- Python 3.10
- FastAPI
- Pydantic
- Requests, BeautifulSoup
- textstat, nltk
- Pytest
- Docker, Docker Compose
- GitHub Actions CI
document_analyzer/
├── docker/ # Docker & Compose files
├── scripts/ # Validation scripts
├── src/doclens/ # Application source
│ ├── api/ # FastAPI layer
│ ├── cli/ # CLI interface
│ ├── core/ # Core analysis logic
│ ├── services/ # Independent analyzers
│ ├── utils/ # Utility helpers
│ ├── config/ # Logging & config
│ └── premium/ # Premium feature placeholders
├── tests/ # Unit tests
├── reports/ # Output reports
├── Makefile
├── requirements.txt
├── requirements-dev.txt
├── ARCHITECTURE.md
└── README.md
conda create -n doclens python=3.10
conda activate doclens
pip install -r requirements.txt
pip install -r requirements-dev.txtRun the documentation analyzer from the command line:
make cliOr directly:
PYTHONPATH=src python -m doclens.cli.analyze \
"https://example.com/docs" \
-o reports/report.jsonmake apiAPI runs at:
http://127.0.0.1:8000
GET /health
Response:
{
"status": "ok"
}POST /analyze
Request body:
{
"url": "https://example.com/docs"
}Response (example):
{
"url": "...",
"readability": {...},
"structure_and_flow": {...},
"completeness_and_examples": {...},
"style_guidelines": {...}
}docker compose -f docker/docker-compose.yml up --buildAPI will be available at:
http://localhost:8000
Health check is automatically configured.
Run unit tests:
make testRun full end-to-end validation (CLI + API):
make validateThis script verifies:
- Dependencies
- Unit tests
- CLI execution
- API startup
- Health endpoint
- JSON output validation
GitHub Actions CI automatically:
- Installs dependencies
- Runs unit tests
- Validates the project structure
CI configuration lives in:
.github/workflows/ci.yml
A detailed system design is documented in:
ARCHITECTURE.md
It covers:
- Layered architecture
- Data flow
- Service boundaries
- Extensibility design
- Premium feature placeholders
Premium capabilities are intentionally stubbed and clearly marked:
- AI-powered revision suggestions
- Automatic doc rewriting
- Export to multiple formats
- Team analytics dashboards
These are placeholders only and do not contain business logic.
Current release:
v1.0.0
Tagged and published.
MIT License. See LICENSE for details.