Skip to content

Build production-ready DocuLens portfolio showcase - #1

Merged
CodeWithMoin merged 1 commit into
mainfrom
release/portfolio-showcase
Jul 14, 2026
Merged

CodeWithMoin merged 1 commit into
mainfrom
release/portfolio-showcase

Conversation

@CodeWithMoin

@CodeWithMoin CodeWithMoin commented Jul 14, 2026

Copy link
Copy Markdown
Owner

What changed

  • refactored configuration, observability, dependency boundaries, chunking, embeddings, vector search, and runtime initialization
  • redesigned the landing page and internal product experience with responsive navigation, command search, dark mode, document workflows, and a citation-first Ask DocuLens interface
  • added an idempotent synthetic workspace, retrieval evaluation utilities, stronger typing, API validation, versioned routes, and expanded tests
  • consolidated Python packaging and added contributor tooling with Make, pre-commit, Ruff, Pyright, pytest, ESLint, and Vite
  • added a read-only public showcase mode enforced independently by the FastAPI layer and reflected in the frontend
  • added a single-node HTTPS deployment using Caddy, Docker Compose, PostgreSQL/pgvector, migrations, health checks, backups, and rollback guidance
  • rewrote the README and added architecture, design-system, engineering, deployment, and screenshot documentation

Why

DocuLens was functional but presented as a development demo. This release makes the problem, AI pipeline, evidence model, architecture, and engineering decisions understandable within a short portfolio review while keeping the system focused as a document-intelligence modular monolith.

The hosted mode is intentionally a product tour rather than a public SaaS trial. Visitors can inspect realistic synthetic documents, search, classifications, pipeline state, and cited answers without anonymous uploads, destructive changes, live model calls, or surprise provider costs.

Impact and tradeoffs

  • normal local development retains uploads and live pipeline actions
  • DOCULENS_SHOWCASE_READ_ONLY=true removes mutating controls and returns HTTP 403 for state-changing workspace requests
  • the showcase excludes Celery workers because visitors cannot enqueue jobs, reducing resource use at the cost of demonstrating completed outputs instead of processing arbitrary public files
  • automatic initialization remains convenient for the idempotent showcase; production customer deployments should continue to treat Alembic migrations, tenant-scoped authorization, managed secrets, object storage, and worker isolation as separate concerns

Validation

  • ruff check .
  • pyright --pythonpath .venv312/bin/python
  • pytest — 12 passed
  • npm run lint
  • npm run build
  • production showcase Compose render validation
  • git diff --check
  • local browser inspection of the landing page, internal workspace, console errors, and corrected CodeWithMoin/doculens-ai links

Summary by CodeRabbit

  • New Features

    • Added a public, read-only showcase mode with curated demo content and blocked write actions.
    • Introduced a refreshed workspace interface with redesigned navigation, command-palette search, theme switching, activity updates, and a new landing page.
    • Added clearer document pipeline stages, document sizing information, upload limits, and a live health endpoint.
  • Bug Fixes

    • Improved validation for event inputs and operational settings.
    • Enhanced request tracing, upload cleanup, and background task reliability.
  • Documentation

    • Added setup, showcase deployment, design-system, and engineering guidance.

@gitguardian

gitguardian Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34812486 Triggered Generic Password 1ea644b docker/docker-compose.showcase.yml View secret
34812487 Triggered Company Email Password 1ea644b app/main.py View secret
21697538 Triggered Generic Password 1ea644b app/main.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@CodeWithMoin, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d264950-df7e-4144-ae50-9b29d5e61d28

📥 Commits

Reviewing files that changed from the base of the PR and between f398f72 and 1ea644b.

⛔ Files ignored due to path filters (7)
  • docs/images/landing.jpg is excluded by !**/*.jpg
  • docs/images/login.jpg is excluded by !**/*.jpg
  • docs/images/qa-studio.jpg is excluded by !**/*.jpg
  • docs/images/work-queues.jpg is excluded by !**/*.jpg
  • docs/images/workspace-overview.jpg is excluded by !**/*.jpg
  • frontend/public/vite.svg is excluded by !**/*.svg
  • frontend/src/assets/react.svg is excluded by !**/*.svg
📒 Files selected for processing (79)
  • .dockerignore
  • .env.example
  • .env.showcase.example
  • .github/workflows/backend-ci.yml
  • .gitignore
  • .pre-commit-config.yaml
  • Makefile
  • README.md
  • app/alembic.ini
  • app/api/dependencies.py
  • app/api/endpoint.py
  • app/api/event_schema.py
  • app/api/router.py
  • app/config/celery_config.py
  • app/config/database_config.py
  • app/config/llm_config.py
  • app/config/settings.py
  • app/core/observability.py
  • app/doc_utils/chunking.py
  • app/doc_utils/embedding.py
  • app/evaluation/__init__.py
  • app/evaluation/retrieval.py
  • app/main.py
  • app/pyproject.toml
  • app/requirements.txt
  • app/services/demo_workspace.py
  • app/services/vector_store.py
  • app/start.sh
  • docker/Caddyfile.showcase
  • docker/Dockerfile.api
  • docker/Dockerfile.celery
  • docker/Dockerfile.frontend
  • docker/docker-compose.showcase.yml
  • docker/docker-compose.yml
  • docker/nginx.conf
  • docs/deploy-showcase.md
  • docs/design-system.md
  • docs/engineering-notes.md
  • frontend/README.md
  • frontend/index.html
  • frontend/src/App.tsx
  • frontend/src/api/client.ts
  • frontend/src/api/types.ts
  • frontend/src/auth/ProtectedRoute.tsx
  • frontend/src/components/DocumentDetail.tsx
  • frontend/src/components/DocumentList.tsx
  • frontend/src/components/DocumentUploadForm.tsx
  • frontend/src/components/brand/Logo.tsx
  • frontend/src/components/dashboard/PersonaQuickstart.tsx
  • frontend/src/components/dashboard/personaConfig.ts
  • frontend/src/components/layout/AppShell.tsx
  • frontend/src/components/notifications/ActivityFeed.tsx
  • frontend/src/components/ui/button.tsx
  • frontend/src/components/ui/card.tsx
  • frontend/src/components/ui/input.tsx
  • frontend/src/components/ui/theme-toggle.tsx
  • frontend/src/hooks/useEventNotifications.ts
  • frontend/src/lib/pipeline.ts
  • frontend/src/lib/queryClient.ts
  • frontend/src/lib/routing.ts
  • frontend/src/lib/utils.ts
  • frontend/src/main.tsx
  • frontend/src/pages/IntakePage.tsx
  • frontend/src/pages/LandingPage.tsx
  • frontend/src/pages/LoginPage.tsx
  • frontend/src/pages/PipelinePage.tsx
  • frontend/src/pages/QaPage.tsx
  • frontend/src/pages/SettingsPage.tsx
  • frontend/src/pages/WorkQueuesPage.tsx
  • frontend/src/settings/SettingsProvider.tsx
  • frontend/src/stores/uiStore.ts
  • frontend/src/styles/globals.css
  • frontend/tailwind.config.ts
  • pyproject.toml
  • pyrightconfig.json
  • scripts/dev_stack.sh
  • tests/test_api_endpoints.py
  • tests/test_retrieval_evaluation.py
  • tests/test_settings.py
📝 Walkthrough

Walkthrough

Changes

The PR hardens backend configuration and lifecycle management, adds a read-only showcase deployment with seeded data, consolidates packaging and quality workflows, and substantially redesigns frontend routing, workspace navigation, pages, styling, and activity views.

Production hardening and showcase workspace

Layer / File(s) Summary
Packaging, developer workflow, and documentation
pyproject.toml, .github/workflows/*, Makefile, README.md, docs/*
Packaging, CI quality checks, local commands, environment templates, and project documentation are updated.
Validated backend runtime and processing
app/config/*, app/api/*, app/main.py, app/core/*, app/doc_utils/*, app/evaluation/*, app/services/vector_store.py, tests/*
Runtime validation, showcase guards, strict event schemas, lifecycle initialization, upload limits, observability, embedding batching/caching, retrieval metrics, and Celery settings are added or revised.
Synthetic showcase workspace and deployment
app/services/demo_workspace.py, docker/*, docs/deploy-showcase.md
Idempotent synthetic data, read-only deployment configuration, health-based Compose startup, reverse proxies, and showcase operations guidance are added.
Frontend routing, shell, and shared infrastructure
frontend/src/main.tsx, frontend/src/App.tsx, frontend/src/components/layout/*, frontend/src/lib/*, frontend/src/auth/*
Public and protected routes, lazy loading, command-palette search, navigation inference, shared query behavior, theme controls, and showcase access handling are introduced.
Workspace pages and read-only interactions
frontend/src/pages/*, frontend/src/components/DocumentDetail.tsx, frontend/src/components/notifications/*, frontend/src/components/dashboard/*
Workspace pages, document actions, QA panels, activity feeds, dashboard links, pipeline presentation, and read-only UI restrictions are revised.
Frontend visual system and supporting UI
frontend/src/styles/*, frontend/tailwind.config.ts, frontend/src/components/ui/*, frontend/index.html
Design tokens, dark mode, reduced-motion behavior, shared control styling, document list/upload presentation, and page metadata are updated.

Estimated code review effort: 5 (Critical) | ~120 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/portfolio-showcase

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CodeWithMoin
CodeWithMoin marked this pull request as ready for review July 14, 2026 10:10
@CodeWithMoin
CodeWithMoin merged commit 280fdfa into main Jul 14, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant