- Rewrite README.md and README_CN.md with comprehensive project documentation including core features, architecture overview, benchmarks, tech stack, quick start guide, and detailed installation instructions - Add CONTRIBUTING.md with contribution guidelines - Add architecture.svg and directory-structure.svg diagrams - Add generated PNG assets for hero banner, core features, pain points, architecture, and benchmark results - Add screenshot PNGs for installation guide (PostgreSQL, Neo4j, Alembic, API docs, frontend UI) - Replace external GitHub image URLs with local asset references
171 lines
12 KiB
XML
171 lines
12 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 620">
|
|
<defs>
|
|
<style>
|
|
text { font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace; }
|
|
</style>
|
|
<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
|
|
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1e293b" stroke-width="0.5"/>
|
|
</pattern>
|
|
</defs>
|
|
|
|
<!-- Background -->
|
|
<rect width="1400" height="620" fill="#0f172a"/>
|
|
<rect width="1400" height="620" fill="url(#grid)"/>
|
|
|
|
<!-- Title -->
|
|
<text x="40" y="40" fill="#f8fafc" font-size="15" font-weight="700">MemoryBear — Project Structure</text>
|
|
<text x="40" y="58" fill="#64748b" font-size="9">Monorepo: Python Backend (api/) + React Frontend (web/) + Benchmark + Sandbox</text>
|
|
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
<!-- ROOT level x=40 -->
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
<text x="40" y="90" fill="#94a3b8" font-size="10">MemoryBear/</text>
|
|
<!-- root items -->
|
|
<text x="60" y="110" fill="#fbbf24" font-size="10">├── api/</text>
|
|
<text x="200" y="110" fill="#475569" font-size="9">Backend (FastAPI + Celery)</text>
|
|
<text x="60" y="126" fill="#fbbf24" font-size="10">├── web/</text>
|
|
<text x="200" y="126" fill="#475569" font-size="9">Frontend (React + Vite)</text>
|
|
<text x="60" y="142" fill="#64748b" font-size="10">├── redbear-mem-benchmark/</text>
|
|
<text x="340" y="142" fill="#475569" font-size="9">Benchmark suite (git submodule)</text>
|
|
<text x="60" y="158" fill="#64748b" font-size="10">├── sandbox/</text>
|
|
<text x="200" y="158" fill="#475569" font-size="9">Sandboxed code execution service</text>
|
|
<text x="60" y="174" fill="#64748b" font-size="10">├── docs/</text>
|
|
<text x="200" y="174" fill="#475569" font-size="9">Architecture diagrams & docs</text>
|
|
<text x="60" y="190" fill="#64748b" font-size="10">└── ontology_entities.json</text>
|
|
<text x="340" y="190" fill="#475569" font-size="9">Default ontology configuration</text>
|
|
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
<!-- LEFT COLUMN: api/ x=40..660 -->
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
|
|
<!-- api/ header box -->
|
|
<rect x="40" y="208" width="300" height="22" rx="4" fill="rgba(120,53,15,0.3)" stroke="#fbbf24" stroke-width="1"/>
|
|
<text x="52" y="223" fill="#fbbf24" font-size="10" font-weight="700">api/ — Backend</text>
|
|
|
|
<text x="60" y="246" fill="#94a3b8" font-size="9">├── app/</text>
|
|
<text x="60" y="261" fill="#64748b" font-size="9">│ ├── main.py</text>
|
|
<text x="220" y="261" fill="#334155" font-size="8">FastAPI entry, CORS, lifespan</text>
|
|
<text x="60" y="275" fill="#64748b" font-size="9">│ ├── celery_app.py</text>
|
|
<text x="220" y="275" fill="#334155" font-size="8">Celery config, task routing</text>
|
|
<text x="60" y="289" fill="#64748b" font-size="9">│ ├── db.py</text>
|
|
<text x="220" y="289" fill="#334155" font-size="8">SQLAlchemy sessions</text>
|
|
<text x="60" y="303" fill="#64748b" font-size="9">│ ├── controllers/</text>
|
|
<text x="220" y="303" fill="#334155" font-size="8">/api (JWT) · /v1 (API Key)</text>
|
|
<text x="60" y="317" fill="#64748b" font-size="9">│ ├── services/</text>
|
|
<text x="220" y="317" fill="#334155" font-size="8">Business logic layer</text>
|
|
<text x="60" y="331" fill="#64748b" font-size="9">│ ├── repositories/</text>
|
|
<text x="220" y="331" fill="#334155" font-size="8">PostgreSQL + Neo4j data access</text>
|
|
<text x="60" y="345" fill="#64748b" font-size="9">│ ├── models/</text>
|
|
<text x="220" y="345" fill="#334155" font-size="8">SQLAlchemy ORM models</text>
|
|
<text x="60" y="359" fill="#64748b" font-size="9">│ ├── schemas/</text>
|
|
<text x="220" y="359" fill="#334155" font-size="8">Pydantic request/response</text>
|
|
|
|
<!-- core/ sub-tree -->
|
|
<text x="60" y="378" fill="#22d3ee" font-size="9">│ └── core/</text>
|
|
<text x="220" y="378" fill="#334155" font-size="8">Core domain logic</text>
|
|
|
|
<text x="80" y="393" fill="#64748b" font-size="9">│ ├── memory/</text>
|
|
<text x="240" y="393" fill="#334155" font-size="8">Core memory subsystem</text>
|
|
<text x="100" y="407" fill="#475569" font-size="8">│ │ ├── pipelines/</text>
|
|
<text x="280" y="407" fill="#334155" font-size="8">WritePipeline orchestration</text>
|
|
<text x="100" y="420" fill="#475569" font-size="8">│ │ ├── storage_services/</text>
|
|
<text x="310" y="420" fill="#334155" font-size="8">Extraction · Forgetting · Reflection · Search · Clustering</text>
|
|
<text x="100" y="433" fill="#475569" font-size="8">│ │ ├── agent/</text>
|
|
<text x="280" y="433" fill="#334155" font-size="8">LangGraph-based memory agent</text>
|
|
<text x="100" y="446" fill="#475569" font-size="8">│ │ ├── ontology_services/</text>
|
|
<text x="310" y="446" fill="#334155" font-size="8">OWL/TTL entity type system</text>
|
|
<text x="100" y="459" fill="#475569" font-size="8">│ │ ├── analytics/</text>
|
|
<text x="280" y="459" fill="#334155" font-size="8">Hot tags, activity stats</text>
|
|
<text x="100" y="472" fill="#475569" font-size="8">│ │ └── utils/</text>
|
|
<text x="280" y="472" fill="#334155" font-size="8">Jinja2 prompts, embedder, config</text>
|
|
|
|
<text x="80" y="488" fill="#64748b" font-size="9">│ ├── rag/</text>
|
|
<text x="240" y="488" fill="#334155" font-size="8">RAG pipeline · GraphRAG · doc parsing</text>
|
|
<text x="80" y="501" fill="#64748b" font-size="9">│ ├── workflow/</text>
|
|
<text x="240" y="501" fill="#334155" font-size="8">Workflow engine (nodes, adapters)</text>
|
|
<text x="80" y="514" fill="#64748b" font-size="9">│ ├── tools/</text>
|
|
<text x="240" y="514" fill="#334155" font-size="8">Builtin · Custom · MCP tools</text>
|
|
<text x="80" y="527" fill="#64748b" font-size="9">│ ├── agent/</text>
|
|
<text x="240" y="527" fill="#334155" font-size="8">Agent framework</text>
|
|
<text x="80" y="540" fill="#64748b" font-size="9">│ ├── permissions/</text>
|
|
<text x="240" y="540" fill="#334155" font-size="8">RBAC permission system</text>
|
|
<text x="80" y="553" fill="#64748b" font-size="9">│ └── storage/</text>
|
|
<text x="240" y="553" fill="#334155" font-size="8">Local · OSS · S3 file storage</text>
|
|
|
|
<text x="60" y="572" fill="#64748b" font-size="9">├── migrations/</text>
|
|
<text x="200" y="572" fill="#334155" font-size="8">Alembic DB migrations</text>
|
|
<text x="60" y="586" fill="#64748b" font-size="9">├── docker-compose.yml</text>
|
|
<text x="240" y="586" fill="#334155" font-size="8">API + 3 Celery workers + Beat</text>
|
|
<text x="60" y="600" fill="#64748b" font-size="9">└── env.example</text>
|
|
<text x="200" y="600" fill="#334155" font-size="8">Environment variable template</text>
|
|
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
<!-- RIGHT COLUMN: web/ x=740..1360 -->
|
|
<!-- ══════════════════════════════════════════════════════════ -->
|
|
|
|
<!-- web/ header box -->
|
|
<rect x="740" y="208" width="300" height="22" rx="4" fill="rgba(6,78,59,0.3)" stroke="#34d399" stroke-width="1"/>
|
|
<text x="752" y="223" fill="#34d399" font-size="10" font-weight="700">web/ — Frontend</text>
|
|
|
|
<text x="760" y="246" fill="#94a3b8" font-size="9">└── src/</text>
|
|
|
|
<text x="780" y="261" fill="#64748b" font-size="9">├── App.tsx</text>
|
|
<text x="920" y="261" fill="#334155" font-size="8">Root component with routing</text>
|
|
<text x="780" y="275" fill="#64748b" font-size="9">├── api/</text>
|
|
<text x="920" y="275" fill="#334155" font-size="8">Axios API client functions</text>
|
|
|
|
<!-- views sub-tree -->
|
|
<text x="780" y="294" fill="#34d399" font-size="9">├── views/</text>
|
|
<text x="920" y="294" fill="#334155" font-size="8">Page-level route components</text>
|
|
<text x="800" y="308" fill="#475569" font-size="8">│ ├── MemoryManagement/</text>
|
|
<text x="980" y="308" fill="#334155" font-size="8">Memory CRUD & visualization</text>
|
|
<text x="800" y="321" fill="#475569" font-size="8">│ ├── MemoryExtractionEngine/</text>
|
|
<text x="980" y="321" fill="#334155" font-size="8">Extraction pipeline UI</text>
|
|
<text x="800" y="334" fill="#475569" font-size="8">│ ├── ForgettingEngine/</text>
|
|
<text x="980" y="334" fill="#334155" font-size="8">Memory decay management</text>
|
|
<text x="800" y="347" fill="#475569" font-size="8">│ ├── SelfReflectionEngine/</text>
|
|
<text x="980" y="347" fill="#334155" font-size="8">Reflection task dashboard</text>
|
|
<text x="800" y="360" fill="#475569" font-size="8">│ ├── EmotionEngine/</text>
|
|
<text x="980" y="360" fill="#334155" font-size="8">Emotion extraction view</text>
|
|
<text x="800" y="373" fill="#475569" font-size="8">│ ├── KnowledgeBase/</text>
|
|
<text x="980" y="373" fill="#334155" font-size="8">RAG knowledge base management</text>
|
|
<text x="800" y="386" fill="#475569" font-size="8">│ ├── Ontology/</text>
|
|
<text x="980" y="386" fill="#334155" font-size="8">Entity/relation type config</text>
|
|
<text x="800" y="399" fill="#475569" font-size="8">│ ├── Workflow/</text>
|
|
<text x="980" y="399" fill="#334155" font-size="8">Visual workflow editor</text>
|
|
<text x="800" y="412" fill="#475569" font-size="8">│ ├── Conversation/</text>
|
|
<text x="980" y="412" fill="#334155" font-size="8">Chat interface</text>
|
|
<text x="800" y="425" fill="#475569" font-size="8">│ ├── ApplicationManagement/</text>
|
|
<text x="980" y="425" fill="#334155" font-size="8">App & API key management</text>
|
|
<text x="800" y="438" fill="#475569" font-size="8">│ ├── ModelManagement/</text>
|
|
<text x="980" y="438" fill="#334155" font-size="8">LLM model configuration</text>
|
|
<text x="800" y="451" fill="#475569" font-size="8">│ └── UserManagement/</text>
|
|
<text x="980" y="451" fill="#334155" font-size="8">Members, spaces, permissions</text>
|
|
|
|
<!-- components / hooks / store -->
|
|
<text x="780" y="470" fill="#64748b" font-size="9">├── components/</text>
|
|
<text x="920" y="470" fill="#334155" font-size="8">Chat · D3Graph · Charts · Markdown ···</text>
|
|
<text x="780" y="484" fill="#64748b" font-size="9">├── hooks/</text>
|
|
<text x="920" y="484" fill="#334155" font-size="8">Custom React hooks</text>
|
|
<text x="780" y="498" fill="#64748b" font-size="9">├── store/</text>
|
|
<text x="920" y="498" fill="#334155" font-size="8">Zustand state management</text>
|
|
<text x="780" y="512" fill="#64748b" font-size="9">├── i18n/</text>
|
|
<text x="920" y="512" fill="#334155" font-size="8">i18next · zh / en translations</text>
|
|
<text x="780" y="526" fill="#64748b" font-size="9">├── routes/</text>
|
|
<text x="920" y="526" fill="#334155" font-size="8">Route definitions</text>
|
|
<text x="780" y="540" fill="#64748b" font-size="9">├── utils/</text>
|
|
<text x="920" y="540" fill="#334155" font-size="8">format · request · stream · validator</text>
|
|
<text x="780" y="554" fill="#64748b" font-size="9">└── assets/</text>
|
|
<text x="920" y="554" fill="#334155" font-size="8">Images, fonts</text>
|
|
|
|
<!-- tech badges bottom -->
|
|
<text x="760" y="580" fill="#475569" font-size="8">Stack: React 18 · TypeScript · Vite · Ant Design 5 · Tailwind CSS 4</text>
|
|
<text x="760" y="594" fill="#475569" font-size="8"> Zustand · AntV X6 · ECharts · D3.js · i18next · Axios</text>
|
|
|
|
<!-- vertical divider -->
|
|
<line x1="700" y1="200" x2="700" y2="610" stroke="#1e293b" stroke-width="1.5" stroke-dasharray="6,4"/>
|
|
|
|
<!-- footer -->
|
|
<text x="1360" y="612" fill="#334155" font-size="7" text-anchor="end">RedBear AI · MemoryBear v1.0</text>
|
|
</svg>
|