How subrata-18/prismoffline works
PrismOffline is an offline-first STEM solver with a React interface and FastAPI backend. Users submit a problem in Standard Mode; the backend routes it to local reasoning or exact computation, then returns a result for display. Guided Attempt establishes a verified solution before generating and validating progressive questions, with optional hints and lazy full solutions. Accounts and saved work persist locally. The README documents separate local planner and reasoning models plus a persistent Wolfram session; unsampled subsystem details are represented at directory level, and edges are limited to shown references or documented relationships.
Main entry points: provider_router.py Provider router · App.tsx Application shell · main.py FastAPI routes · reasoning_service.py Reasoning service
Components 27
User interface
- Application shell
frontend/src/App.tsx - Standard Mode
frontend/src/modes/StandardMode.tsx - Graphical Mode
frontend/src/modes/GraphicalMode.tsx - Account view
frontend/src/components/AccountView.tsx - Authentication view
frontend/src/components/AuthView.tsx - Frontend API client
frontend/src/services/api.ts - Result rendering
frontend/src/components/ReasonResult.tsx - Scientific notation
frontend/src/components/MathText.tsx - Solution text
frontend/src/components/WorkspaceSolutionText.tsx
Backend API
- FastAPI routes
backend/main.py
Problem solving
- Reasoning service
backend/services/reasoning_service.py - Execution service
backend/services/execution_service.py - Language routing
backend/services/language/router.py - Exact computation
backend/services/computation_service.py - Expression normalization
backend/services/expression_normalizer.py
Guided learning
- Guided attempt service
backend/services/guided_attempt_service.py - Learning helpers
backend/services/learning
Engines and storage
- Provider router
backend/services/provider_router.py - Local model provider
backend/providers/local_llm/provider.py - Planner provider
backend/providers/planner_llm/provider.py - Wolfram provider
backend/providers/wolfram/provider.py - SymPy provider
backend/providers/sympy/provider.py - Wolfram session
backend/services/wolfram_engine.py - Accounts and saved work
backend/services/auth_storage.py
Other components
- User
- llama.cpp servers
- Wolfram Engine
Connections 35
- User → Application shell: uses
- Application shell → Standard Mode: selects
frontend/src/App.tsx - Application shell → Graphical Mode: selects
frontend/src/App.tsx - Application shell → Account view: shows
frontend/src/App.tsx - Application shell → Authentication view: shows
frontend/src/App.tsx - Standard Mode → Frontend API client: requests
frontend/src/modes/StandardMode.tsx - Graphical Mode → Frontend API client: requests
frontend/src/modes/GraphicalMode.tsx - Authentication view → Frontend API client: authenticates
frontend/src/components/AuthView.tsx - Account view → Frontend API client: manages account
frontend/src/components/AccountView.tsx - Frontend API client → FastAPI routes: calls endpoints
frontend/src/services/api.ts - FastAPI routes → Reasoning service: invokes
backend/main.py - FastAPI routes → Guided attempt service: invokes
backend/main.py - FastAPI routes → Exact computation: invokes
backend/main.py - FastAPI routes → Accounts and saved work: reads and writes
backend/main.py - Reasoning service → Provider router: dispatches
backend/services/reasoning_service.py - Reasoning service → Expression normalization: normalizes
backend/services/reasoning_service.py - Reasoning service → Execution service: delegates
- Execution service → Language routing: routes through
backend/services/execution_service.py - Exact computation → Provider router: selects provider
backend/services/computation_service.py - Exact computation → Expression normalization: normalizes
backend/services/computation_service.py - Guided attempt service → Provider router: uses models
backend/services/guided_attempt_service.py - Guided attempt service → Reasoning service: gets solution
backend/services/guided_attempt_service.py - Guided attempt service → Learning helpers: uses learning helpers
- Provider router → Local model provider: generates
backend/services/provider_router.py - Provider router → Planner provider: plans
backend/services/provider_router.py - Provider router → Wolfram provider: calculates
backend/services/provider_router.py - Provider router → SymPy provider: calculates
backend/services/provider_router.py - Local model provider → llama.cpp servers: requests inference
- Planner provider → llama.cpp servers: requests planning
- Wolfram provider → Wolfram session: evaluates with
backend/providers/wolfram/provider.py - Wolfram session → Wolfram Engine: maintains session
- Standard Mode → Result rendering: displays results
frontend/src/modes/StandardMode.tsx - Result rendering → Solution text: renders solution text
frontend/src/components/ReasonResult.tsx - Standard Mode → Scientific notation: renders notation
frontend/src/modes/StandardMode.tsx - Solution text → Scientific notation: renders notation