# JIndex

Fast file search across local drives, the NAS and other PCs running JIndex.
**User documentation is in [MANUAL.md](MANUAL.md)** (also shown by the app's Help button).

## Build & run

- Requires the .NET SDK (any 6+; builds against .NET Framework 4.7.2 reference assemblies, which Visual Studio installs).
- `dotnet build Jindex\Jindex.csproj -c Debug -p:Platform=AnyCPU`
- Output: `Jindex\bin\Debug\JIndex.exe` — keep it there, the `JIndex_AutoScan` scheduled task points at that path.

## Layout

| Path | What |
|---|---|
| `Jindex\Program.cs` | Entry point; dispatches on `/scan`, `/service`, `/install`, `/uninstall`, otherwise starts the WPF app |
| `Jindex\App.xaml` | Application definition + the shared theme (colours, button/input/grid styles) |
| `Jindex\UI\MainWindow.xaml(.cs)` | The search window (view only: tray icon, selection, shortcuts) |
| `Jindex\UI\ViewModels\MainViewModel.cs` | All window behaviour: search, indexing, peers/server, file actions |
| `Jindex\UI\ViewModels\` | `Infrastructure.cs` (ObservableObject, RelayCommand, BulkObservableCollection), `SearchResult.cs` (grid row + PeerEntry) |
| `Jindex\UI\Dialogs\` | Options (5 tabs), Schedule, Help (renders MANUAL.md), folder/text prompts |
| `Jindex\UI\DialogHelper.cs` | Message boxes, modern folder picker, dialog launchers used by the view-models |
| `Jindex\UI\MarkdownRenderer.cs` | Markdown subset → FlowDocument for the Help window |
| `Jindex\AppSettings.cs` | Every option, persisted to `%APPDATA%\JIndex\options.ini` |
| `Jindex\FileIndexer.cs`, `SearchEngine.cs`, `FileOperations.cs` | Index build/load, matching, copy/move/delete |
| `Jindex\DistributedSearchServer.cs`, `DistributedSearchClient.cs` | Peer search over TCP 9999 + UDP 9998 discovery |
| `Jindex\IndexService.cs` | The optional `JIndexService` Windows service |
| `Jindex\Legacy\` | The previous WinForms UI, kept for reference only — not compiled |
| `MANUAL.md` | The user manual; embedded into the exe as a resource |
