4.5 KiB
4.5 KiB
📑 Project Backlog: Nexus AI E-Reader (Mockup Implementation)
Architecture Framework: .NET 10 | Blazor Component Model | CQRS with MediatR | FluentResult | Mapster
🟢 PHASE 1: Infrastructure & Design Tokens
Goal: Prepare the clean architecture foundation and the visual DNA.
[TASK-01] Solution & Directory Structure Setup
- Action: Create the folder structure:
/srcfor projects,/testsfor unit/integration tests. - Details: Initialize
NexusReader.Web(Blazor),NexusReader.Application,NexusReader.Domain, andNexusReader.Infrastructure. - DoD: Solution compiles with strict folder separation.
[TASK-02] Core Library Integration
- Action: Install and configure LuckyPennySoftware.MediatR, Mapster, and FluentResult.
- Details: - Setup
MappingConfigfor Mapster in the Application layer.- Implement a
BaseHandlerthat returnsResult<T>.
- Implement a
- DoD: A sample Query returns a
SuccessResult via MediatR.
[TASK-03] Nexus Neon Design System
- Action: Implement global CSS variables in
app.cssand base Atoms. - Details: - Variables:
--nexus-neon: #00ff99,--nexus-bg: #121212,--nexus-card: #1e1e1e.- Components:
NexusButton.razor,NexusTypography.razor(handling Serif for ebook, Sans for UI).
- Components:
- DoD: Variables are accessible via all scoped CSS files.
🔵 PHASE 2: Seamless Reader & AI Assistant (Left Side / Inline)
Goal: Implement the ebook reading logic and the "Vertical Flow" AI injection.
[TASK-04] ReaderCanvas & Dynamic Content Injection
- Action: Create
ReaderCanvas.razorto render ebook text. - Details: - Logic to split text into blocks.
- Implementation of an "Injection Point" system where
AiAssistantBubble.razorcan be rendered inline between paragraphs.
- Implementation of an "Injection Point" system where
- Mockup Match: Text must use the high-contrast Serif font from the mockup.
[TASK-05] AiAssistantBubble Component
- Action: Implement the AI chat bubble with a robot avatar.
- Details: - Scoped CSS for the glowing border and dark glassmorphism background.
- Parameters for
DialogueTextandActionButtons("Pokaż więcej", "Rozwiąż quiz"). - Integration with Semantic Kernel for streaming text.
- Parameters for
- DoD: Bubble appears smoothly in the text flow without absolute positioning.
🟡 PHASE 3: Knowledge Graph & Brain (Right Side / Flow)
Goal: Implement the D3.js graph and the "You are here" logic.
[TASK-06] D3.js Knowledge Graph Bridge
- Action: Implement
KnowledgeGraph.razorwith JS Interop. - Details: - ES6 Module
knowledgeGraph.jsusing D3.js v7.- SVG ViewBox scaling for portrait orientation.
- Implementation of the "TU JESTEŚ" (You Are Here) pulsing label on the active node.
- DoD: Clicking a node in JS triggers a C# EventCallback via
DotNetObjectReference.
[TASK-07] Semantic Mapping Service
- Action: Create the
GetKnowledgeGraphQuery(CQRS). - Details: - Service uses Semantic Kernel to extract nodes from the current chapter.
- Mapster maps the AI raw response to the
GraphViewModel.
- Mapster maps the AI raw response to the
- DoD: Graph updates dynamically when the reader moves to a new chapter.
🟠 PHASE 4: Verification & Mobile Polish
Goal: Implement the quiz module and cross-platform readiness.
[TASK-08] KnowledgeCheck (Quiz) Module
- Action: Implement the
SubmitAnswerCommandusing MediatR. - Details: - UI:
KnowledgeCheck.razorwith radio buttons and a "Wyślij" (Submit) button.- Logic: Handler returns
Result(Success/Failure) via FluentResult. - Mapster: Map
QuizDtotoQuizViewModel.
- Logic: Handler returns
- Mockup Match: Neon highlight on the selected/correct answer.
[TASK-09] Persistence & Cross-Platform (Hybrid)
- Action: Implement
IPlatformServicefor Android/iOS support. - Details: - Safe-area-insets implementation for notches.
BrowserStorageimplementation ofAppStateto save progress.- Haptic feedback abstraction (trigger vibration on correct answer).
- DoD: App maintains graph state after a manual refresh.
🛠️ Instructions for NexusArchitect
- Vertical Flow Priority: Ensure that the AI assistant and the Graph never overlay text. Use
FlexboxorGridfor a single, continuous scrollable column in portrait mode. - Result Pattern: Every single Mediator Handler must return
FluentResults.Result. - Mapster: Perform all DTO-to-UI mappings in the Query/Command Handlers, not in the Razor components.
- Isolated Styles: All specific CSS for the Neon effect must be in
.razor.cssfiles.