Skip to content

nprasann/state-policy-rag-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

state-policy-rag-ui

Expo React%20Native Web Backend Status

state-policy-rag-ui is a cross-platform frontend for the state-policy-rag-starter backend.

It provides a ChatGPT-style UI for:

  • asking policy-grounded questions
  • viewing cited answers from the RAG service
  • inspecting supporting source chunks from MCP policy search
  • validating local backend health during development

The current implementation is built with:

  • Expo
  • React Native
  • Expo Router
  • React Native Web

Version And Maturity

This repo is currently an early starter UI.

What that means:

  • the web path is the currently validated experience
  • the UI is already wired to the live backend, not mock data
  • iOS and Android are scaffolded through Expo, but have not yet been fully validated end to end
  • the backend dependency is required; this repo does not run as a standalone AI product by itself

Relationship To state-policy-rag-starter

This repo is the UI layer.

The backend lives in:

That backend provides:

  • mcp_server for policy search and controlled data access
  • rag_service for prompt assembly and answer generation
  • Qdrant for vector search
  • Ollama for local model inference

This UI assumes the backend is already running locally.

Default local API targets:

  • http://127.0.0.1:8080 for mcp_server
  • http://127.0.0.1:8081 for rag_service

What A Beginner Needs

If you are non-technical or just getting started, think of this as a two-part setup:

  1. run the backend in state-policy-rag-starter
  2. run this UI repo and point it at that backend

This UI repo alone is not enough. It depends on the state starter backend being ready first.

Hardware Requirements

For the UI alone, the hardware needs are modest.

Recommended local machine:

  • modern Mac, Windows PC, or Linux workstation
  • 8 GB RAM minimum
  • 16 GB RAM recommended for a smoother overall experience because the backend stack uses Docker, Qdrant, and Ollama
  • at least 10 GB free disk space for UI dependencies plus backend/tooling overhead

Important practical note:

  • the UI is light
  • the backend is the heavier part
  • if you plan to run both repos on one machine, follow the hardware guidance in state-policy-rag-starter

Software Requirements

To run this UI locally, you need:

  • Git
  • Node.js 18+ or newer
  • npm
  • the state-policy-rag-starter backend running locally

Recommended:

  • current LTS Node.js
  • a modern browser like Chrome, Edge, or Safari

License And Usage Notes

This UI repo uses open-source tooling, but you should still be aware of surrounding licenses and usage conditions.

You may need or want to review:

  • the license of this repository once added at the repo level
  • Expo and React Native open-source licenses
  • Node.js and npm package licenses
  • Docker Desktop licensing if this is used inside a larger company or government environment
  • Ollama model and model-weight licenses through the backend stack
  • any licenses or terms attached to models used in state-policy-rag-starter

Practical guidance:

  • for personal development, there is usually no additional paid UI-specific license required
  • for enterprise or government use, check Docker Desktop terms, model usage terms, and your organization’s open-source review process

Current Features

  • live backend health checks
  • editable API configuration in the UI
  • live /search_policies integration
  • live /ask integration
  • source panel for retrieved policy chunks
  • simple conversation reset flow

5-Minute Quickstart

This is the simplest path for a beginner.

  1. Start the backend first in state-policy-rag-starter

Recommended validation:

curl http://127.0.0.1:8080/ready
curl http://127.0.0.1:8081/ready
  1. Start the UI
cd /Volumes/HappyFam/genai-projects/state-policy-rag-ui
npm install
npm run web
  1. In the UI config panel, confirm:
  • RAG Service URL: http://127.0.0.1:8081
  • MCP Service URL: http://127.0.0.1:8080
  • User Header: test.user@state.gov
  1. Click Apply settings

  2. Ask a test question such as:

What does the policy require the State Agency to display on the website home page?

If the backend is healthy, you should see:

  • an answer in the conversation pane
  • supporting chunks in the sources panel

For Non-Technical Users

If you are less technical, use this simpler mental model:

  • state-policy-rag-starter is the engine
  • state-policy-rag-ui is the dashboard

Start the engine first. Then open the dashboard.

If the UI says the backend is unavailable, the problem is almost always in the backend or the configured URL, not in the chat screen itself.

Platform Notes

  • Web is the currently validated path
  • iOS and Android are supported through Expo, but have not yet been fully validated end to end against the local backend
  • on a physical mobile device, 127.0.0.1 will not point to your Mac; use your computer’s LAN IP instead

Repo Map

Near-Term Roadmap

  • persistent conversation history
  • richer source cards and citation drilldowns
  • streaming answer UX
  • settings persistence
  • mobile validation and responsive polish
  • admin and governance views on top of the starter backend

About

Cross-platform UI for state-policy-rag-starter, providing a ChatGPT-style frontend for policy-grounded RAG, citations, and source inspection.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages