Document versioning and policy assistant for regulatory compliance. Built to help organizations manage policy documents and provide employees with an AI-powered assistant to answer questions about company policies.
- Document Management - Upload, view, and organize policy documents
- Version Tracking - Track changes across document versions
- Change Detection - LLM-powered analysis of what changed between versions
- Version History - View full history of document revisions
- Policy Assistant - AI-powered chat to answer questions about policies
- Source Citations - Every answer includes citations to source documents
- Recent Updates - See what policies have changed recently
- Weekly/Monthly Summaries - Browse policy changes by calendar week or month
- Change Highlights - See what changed in each policy update
- 12-Month Archive - Navigate back through a full year of changes
- Email Alerts - Subscribe to weekly policy digest emails (demo)
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui (Radix primitives)
- State Management: TanStack React Query
- HTTP Client: Axios
- Backend: LlamaFarm (RAG + chat) + Express.js (documents API)
- Node.js 18+
- LlamaFarm server running (for backend API)
# Clone the repo
git clone https://github.com/llama-farm/regsync.git
cd regsync
# Install dependencies
npm install
# Configure environment
cp .env.local.example .env.local
# Edit .env.local with your LlamaFarm server URL
# Start the local API server (documents + digest)
node server/index.js &
# Start development server
npm run devThe app will be available at http://localhost:5173 (or 5174 if 5173 is in use)
Create a .env.local file:
VITE_API_URL=http://localhost:8000
VITE_PROJECT_NAME=regsyncserver/ # Local Express.js server
├── index.js # API routes (documents, digest)
├── digest.js # Digest computation logic
└── digest.test.js # Unit tests (23 tests)
src/
├── api/ # API client and endpoints
│ ├── client.ts # Axios instance configuration
│ ├── documentsApi.ts # Document CRUD operations
│ ├── datasetsApi.ts # Dataset management
│ ├── chatApi.ts # RAG chat endpoint
│ └── digestApi.ts # Digest fetch client
├── components/
│ ├── admin/ # Admin-only components
│ │ ├── AdminDashboard.tsx
│ │ ├── DocumentUpload.tsx
│ │ ├── VersionHistory.tsx
│ │ └── ChangeReview.tsx
│ ├── auth/ # Authentication
│ │ └── SignInScreen.tsx
│ ├── digest/ # Policy updates feature
│ │ ├── DigestPage.tsx
│ │ ├── DigestCard.tsx
│ │ └── PeriodSelector.tsx
│ ├── layout/ # App shell, header, sidebar
│ ├── shared/ # Reusable components
│ └── user/ # User-facing components
│ ├── PolicyAssistant.tsx
│ ├── ChatInterface.tsx
│ └── SourceCard.tsx
├── contexts/
│ └── AuthContext.tsx # Auth state & role management
├── types/ # TypeScript type definitions
└── lib/ # Utilities
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run lint:fix # Fix linting issuesRegSync requires a LlamaFarm server with the documents API enabled. The frontend expects these endpoints:
GET /v1/projects/{org}/{project}/documents/- List documentsPOST /v1/projects/{org}/{project}/documents/- Create documentGET /v1/projects/{org}/{project}/documents/{id}- Get documentDELETE /v1/projects/{org}/{project}/documents/{id}- Delete documentGET /v1/projects/{org}/{project}/documents/{id}/versions- List versionsPOST /v1/projects/{org}/{project}/documents/{id}/versions- Upload new versionPOST /v1/projects/{org}/{project}/documents/{id}/detect-changes- Detect changesPOST /v1/projects/{org}/{project}/documents/{id}/compare- Compare versionsGET /v1/projects/{org}/{project}/digest- Get policy digest (week/month)
MIT