Refactor backend structure, add user providers, notes/chat/auth routes and improved OCR/model pipeline#1
Draft
HaiweiZuo wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
core,agents,routes) and move runtime/env handling intobackend/.env.exampleso configuration and provider credentials are managed properly..envkey.Description
config.py,llm.py,state.py, and mail helpers intobackend/core/; moved agent modules underbackend/agents/; addedbackend/routes/with Blueprints (auth,upload,questions,chat,stats,settings,notes) and a route registration helper.db/into modularcrudsubmodules (users,questions,providers,notes,chat,split_records,stats,email_verification,tags) and extended ORM models withProviderConfig,Note,NoteTagMapping,EmailVerification,ChatSessionchanges, andsession_versiononUser./api/auth), user provider settings (/api/settings/config), notes pipeline and endpoints (/api/notes+agents.note), chat sessions/messages/streaming with SSE and teach agent integration, upload/erase/ocr/split/export flow implemented inroutes/upload.py.is_primaryflags, new deduplication using text similarity and section-aware rules, propagation and normalization ofsection_title, fixing leading images ownership, and normalizing image paths (e.g.imgs/→/images/).InferenceEnginefor erase model with lazy loading and sliding-window inference, included model weight managed via Git LFS (backend/models/weight/best.pth), and adjusted test scripts and configs accordingly..env.examplein favor ofbackend/.env.example, added.gitattributesfor LFS, updated.gitignore, refreshed docs (README.md,CLAUDE.md) to reflect architecture and operational changes, and addedbackend/package-lock.json.Testing
cd backend && pytest tests/ -q, which completed successfully.backend/models/test_erase.pyto validate the EnsExam inference changes, which ran without errors on the test environment.Codex Task