Commit graph

45 commits

Author SHA1 Message Date
LUIS NOVO
71b8d13b24 docs: generate comprehensive CLAUDE.md reference documentation across codebase
Create a hierarchical CLAUDE.md documentation system for the entire Open Notebook
codebase with focus on concise, pattern-driven reference cards rather than
comprehensive tutorials.

## Changes

### Core Documentation System
- Updated `.claude/commands/build-claude-md.md` to distinguish between leaf and
  parent modules, with special handling for prompt/template modules
- Established clear patterns:
  * Leaf modules (40-70 lines): Components, hooks, API clients
  * Parent modules (50-150 lines): Architecture, cross-layer patterns, data flows
  * Template modules: Pattern focus, not catalog listings

### Generated Documentation
Created 15 CLAUDE.md reference files across the project:

**Frontend (React/Next.js)**
- frontend/src/CLAUDE.md: Architecture overview, data flow, three-tier design
- frontend/src/lib/hooks/CLAUDE.md: React Query patterns, state management
- frontend/src/lib/api/CLAUDE.md: Axios client, FormData handling, interceptors
- frontend/src/lib/stores/CLAUDE.md: Zustand state persistence, auth patterns
- frontend/src/components/ui/CLAUDE.md: Radix UI primitives, CVA styling

**Backend (Python/FastAPI)**
- open_notebook/CLAUDE.md: System architecture, layer interactions
- open_notebook/ai/CLAUDE.md: Model provisioning, Esperanto integration
- open_notebook/domain/CLAUDE.md: Data models, ObjectModel/RecordModel patterns
- open_notebook/database/CLAUDE.md: Repository pattern, async migrations
- open_notebook/graphs/CLAUDE.md: LangGraph workflows, async orchestration
- open_notebook/utils/CLAUDE.md: Cross-cutting utilities, context building
- open_notebook/podcasts/CLAUDE.md: Episode/speaker profiles, job tracking

**API & Other**
- api/CLAUDE.md: REST layer, service architecture
- commands/CLAUDE.md: Async command handlers, job queue patterns
- prompts/CLAUDE.md: Jinja2 templates, prompt engineering patterns (refactored)

**Project Root**
- CLAUDE.md: Project overview, three-tier architecture, tech stack, getting started

### Key Features
- Zero duplication: Parent modules reference child CLAUDE.md files, don't repeat them
- Pattern-focused: Emphasizes how components work together, not component catalogs
- Scannable: Short bullets, code examples only when necessary (1-2 per file)
- Practical: "How to extend" guides, quirks/gotchas for each module
- Navigation: Root CLAUDE.md acts as hub pointing to specialized documentation

### Cleanup
- Removed unused `batch_fix_services.py`
- Removed deprecated `open_notebook/plugins/podcasts.py`
- Updated .gitignore for documentation consistency

## Impact
New contributors can now:
1. Read root CLAUDE.md for system architecture (5 min)
2. Jump to specific layer documentation (frontend, api, open_notebook)
3. Dive into module-specific patterns in child CLAUDE.md files (1 min per module)
All documentation is lean, reference-focused, and avoids duplication.
2026-01-03 16:27:52 -03:00
LUIS NOVO
ab5560c9a2 refactor: reorganize folder structure for better maintainability
Changes:
- Move migrations/ under open_notebook/database/migrations/
- Extract AI models to open_notebook/ai/ (Model, ModelManager, provision)
- Extract podcasts to open_notebook/podcasts/ (EpisodeProfile, SpeakerProfile, PodcastEpisode)
- Reorganize prompts to mirror graphs structure (chat/, source_chat/)

This improves code organization by:
- Consolidating database concerns (migrations now with database code)
- Separating AI infrastructure from domain entities
- Isolating podcast feature into its own module
- Creating consistent prompt/graph naming conventions

All 52 tests pass.
2026-01-03 14:04:27 -03:00
LUIS NOVO
e11f0a4db8 fix: resolve chat model selection and session display issues
- Add nullable_fields support to ObjectModel base class
- Configure ChatSession to allow model_override to be cleared to null
- Fix JSX conditional that rendered "0" when message_count was 0
- Display model name instead of raw ID in session manager

Fixes issues:
1. Switching to default model now persists correctly
2. Session list shows human-readable model names
3. Sessions with 0 messages no longer show "0" badge
2025-12-19 16:47:34 -03:00
Luis Novo
45a99831a9
Hide sources notes (#273)
Some checks failed
Development Build / extract-version (push) Has been cancelled
Development Build / test-build-regular (push) Has been cancelled
Development Build / test-build-single (push) Has been cancelled
Development Build / summary (push) Has been cancelled
* fix: add missing overflow wrapper to notebooks list page

Adds flex-1 overflow-y-auto wrapper to enable proper scrolling
when notebook list exceeds viewport height. Matches the layout
pattern used by all other dashboard pages.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: reorder transformation routes to prevent dynamic route interception

Moved static routes (/transformations/execute and /transformations/default-prompt)
before dynamic routes (/transformations/{transformation_id}) to ensure FastAPI
matches them correctly. Previously, requests to static routes were incorrectly
captured by the dynamic route handler.

Fixes #250

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: bump to 1.2.1

* hide source and notes panel - fixes #193

* feat: improve layout for mobile views

* bump version to 1.2.2

* fix: address PR review feedback for collapsible columns

- Remove unused CollapseButton component from CollapsibleColumn.tsx
- Rename useCollapseButton to createCollapseButton (not a React hook)
- Move dialogs outside Card in SourcesColumn.tsx for consistency
- Add useMemo for collapseButton in both columns to prevent re-renders

* feat: support multiple sources

* fix: prevent ChatColumn double mounting on desktop

Add useIsDesktop hook to conditionally render mobile view only on
mobile screens. Previously, the mobile ChatColumn was hidden via CSS
on desktop but still mounted, causing duplicate hooks initialization
and redundant network requests.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 16:59:26 -03:00
Luis Novo
f79a9040ae
Release 1.2 (#242)
* chore: improve podcast transcripts

* fix: remove date from insight - fixes #241

* fix: improve scrolling on source and insights - fixes #237

* chore: update esperanto to fix: #234

* chore: update esperanto to fix #226

* fix: process vectorization as subcommands to handle larger documents more gracefully - fix: #229

* feat: enable background job retry capabilities

* feat: reenable content types that were disabled during alpha version

* fix: remove unnecessary model caching causing many issues.

* feat: support multiple azure endpoints and keys just like openai compatible. Fixes #215

* docs: update azure variables

* chore: bump and update dependencies
2025-11-01 14:40:00 -03:00
Luis Novo
b7e656a319
Version 1 (#160)
New front-end
Launch Chat API
Manage Sources
Enable re-embedding of all contents
Sources can be added without a notebook now
Improved settings
Enable model selector on all chats
Background processing for better experience
Dark mode
Improved Notes

Improved Docs: 
- Remove all Streamlit references from documentation
- Update deployment guides with React frontend setup
- Fix Docker environment variables format (SURREAL_URL, SURREAL_PASSWORD)
- Update docker image tag from :latest to :v1-latest
- Change navigation references (Settings → Models to just Models)
- Update development setup to include frontend npm commands
- Add MIGRATION.md guide for users upgrading from Streamlit
- Update quick-start guide with correct environment variables
- Add port 5055 documentation for API access
- Update project structure to reflect frontend/ directory
- Remove outdated source-chat documentation files
2025-10-18 12:46:22 -03:00
Luis Novo
d7b0fff954
Api podcast migration (#93)
Creates the API layer for Open Notebook
Creates a services API gateway for the Streamlit front-end
Migrates the SurrealDB SDK to the official one
Change all database calls to async
New podcast framework supporting multiple speaker configurations
Implement the surreal-commands library for async processing
Improve docker image and docker-compose configurations
2025-07-17 08:36:11 -03:00
LUIS NOVO
f4b9ccbb22 fix: remove provider check, not needed 2025-06-10 11:54:15 -03:00
LUIS NOVO
bea43f3ce7 feat: implement the new model management based on esperanto framework 2025-06-08 19:38:43 -03:00
LUIS NOVO
1afb5d81e8 feat: implement new content settings page and remove options from the source panel 2025-05-30 15:25:39 -03:00
LUIS NOVO
bcef4ed46f fix bug with empty default models 2025-03-11 20:49:37 -03:00
LUIS NOVO
3d6d9c1195 fix record model empty object instantiation 2024-11-20 11:55:48 -03:00
LUIS NOVO
c297dcb809 refactor objectmodel 2024-11-19 19:03:32 -03:00
LUIS NOVO
7f79f8224f improve context and several fixes 2024-11-18 22:01:49 -03:00
LUIS NOVO
4a5d47d934 refactor transformation, add graph and admin 2024-11-18 22:01:11 -03:00
LUIS NOVO
c8b5d422ae enable use without optional models, adds warning 2024-11-14 12:12:11 -03:00
LUIS NOVO
1e35f069b0 add option to save insight as note 2024-11-13 17:33:38 -03:00
LUIS NOVO
06c6842f11 fix insight context to improve citations 2024-11-13 17:02:18 -03:00
LUIS NOVO
9ba5709a3c model selector and model suggestions 2024-11-13 14:48:00 -03:00
LUIS NOVO
e4b8fa8cc7 cleanup logging 2024-11-13 12:17:57 -03:00
LUIS NOVO
532e606a49 add parallel processing to embed 2024-11-11 18:16:42 -03:00
LUIS NOVO
817b1bc7f9 add initial embedding to the content graph 2024-11-11 17:47:50 -03:00
LUIS NOVO
2e2a4947b3 separate source and content graph 2024-11-10 13:30:03 -03:00
LUIS NOVO
66edfc1e2b create record if doesnt exist 2024-11-10 13:27:30 -03:00
LUIS NOVO
53da255801 improve search 2024-11-08 16:07:51 -03:00
LUIS NOVO
3ea4e41a78 improve citations and add object page 2024-11-05 16:55:59 -03:00
LUIS NOVO
0f2216207b enable multiple chat sessions 2024-11-04 15:08:14 -03:00
LUIS NOVO
8398539df8 add hybrid search to combine text and vector searches 2024-11-04 09:51:20 -03:00
LUIS NOVO
62cd5a9dfb add concept of tools model 2024-11-04 09:50:15 -03:00
LUIS NOVO
1f23ba5490 add autoload to recordmodel 2024-11-04 09:49:45 -03:00
LUIS NOVO
223f1bdaf5 improve default_models 2024-11-01 22:38:21 -03:00
LUIS NOVO
212d3a33b0 improve object typing 2024-11-01 22:29:59 -03:00
LUIS NOVO
3b36caceb9 typing fixes 2024-11-01 21:40:28 -03:00
LUIS NOVO
a9ac4a6dc8 model manager 2024-11-01 20:37:23 -03:00
LUIS NOVO
3b7dd5f25f remove load_default_models from models file 2024-11-01 20:16:34 -03:00
LUIS NOVO
feabfaed01 remove defaultmodel from config file 2024-11-01 19:56:27 -03:00
LUIS NOVO
a24faaba44 moved toc to a pattern 2024-11-01 19:08:47 -03:00
LUIS NOVO
b89250d3ca temporary fix to config cache 2024-11-01 17:06:10 -03:00
LUIS NOVO
3e11d9ba68 fix date parsing for save 2024-11-01 12:38:17 -03:00
LUIS NOVO
2f2cdabd2d Fix issue with model defaults and bump version 2024-10-30 18:28:29 -03:00
LUIS NOVO
68cd7d7dda setup text to speech models in Podcasts 2024-10-30 17:17:16 -03:00
LUIS NOVO
2de8520d0c refactor database module and migrations 2024-10-30 16:33:07 -03:00
LUIS NOVO
aca75221a7 remove optional model get 2024-10-30 14:36:59 -03:00
LUIS NOVO
8bb5db158f implement model config 2024-10-30 14:09:24 -03:00
LUIS NOVO
63a568490e refactor domain into a module 2024-10-30 14:08:05 -03:00