{"id":50804241,"url":"https://github.com/saigontechnology/internal-assistant","last_synced_at":"2026-06-12T23:30:54.915Z","repository":{"id":364207200,"uuid":"1262596050","full_name":"saigontechnology/internal-assistant","owner":"saigontechnology","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-12T04:39:19.000Z","size":329,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T05:21:40.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saigontechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T06:18:35.000Z","updated_at":"2026-06-08T07:31:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saigontechnology/internal-assistant","commit_stats":null,"previous_names":["saigontechnology/internal-assistant"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/saigontechnology/internal-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saigontechnology%2Finternal-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saigontechnology%2Finternal-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saigontechnology%2Finternal-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saigontechnology%2Finternal-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saigontechnology","download_url":"https://codeload.github.com/saigontechnology/internal-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saigontechnology%2Finternal-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34266915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-12T23:30:54.138Z","updated_at":"2026-06-12T23:30:54.901Z","avatar_url":"https://github.com/saigontechnology.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internal Assistant\n\nAI-powered document chatbot. Import documents from SharePoint and ask questions — Internal Assistant retrieves relevant content and generates answers using RAG.\n\n## Architecture\n\n- **Backend**: Node.js + Hono + Vercel AI SDK + Drizzle ORM\n- **Frontend**: React (Vite) + shadcn/ui + Vercel AI SDK\n- **Vector DB**: Neon Postgres + pgvector (`halfvec` with HNSW index)\n- **Documents**: Microsoft SharePoint via Graph API\n- **Auth**: MSAL (Microsoft Entra ID, delegated)\n- **AI Provider**: OpenAI-compatible API (configurable)\n\n## Prerequisites\n\n- Node.js 18+\n- A Neon Postgres database with the `pgvector` extension enabled\n- An OpenAI-compatible API key\n- A Microsoft Entra ID app registration (see [setup docs](docs/setup.md))\n\n## Quick Start\n\n### 1. Provision Neon\n\nCreate a project at [neon.tech](https://neon.tech), enable the `vector` extension, and copy the pooled connection string into `backend/.env` as `DATABASE_URL`.\n\n### 2. Backend\n\n```bash\ncd backend\ncp .env.example .env\n# Edit .env with your API key and Azure credentials\n\nnpm install\nnpm run db:migrate   # apply Drizzle migrations (creates resources + embeddings tables)\nnpm run dev\n```\n\n### 3. Frontend\n\n```bash\ncd frontend\ncp .env.example .env\n# Edit .env with your Azure client ID and tenant ID\n\nnpm install\nnpm run dev\n```\n\nOpen http://localhost:5173 — sign in with your Microsoft account and import documents from SharePoint.\n\n### Run everything at once\n\nOnce dependencies are installed and `.env` files are configured, start the whole\nstack — the 9router AI proxy (`:20128`), backend (`:8000`), frontend (`:5173`),\nand a Claude Code pane — in a tmux session with a single command from the repo root:\n\n```bash\n./dev.sh\n```\n\nThe session uses the project `.tmux.conf` (labeled pane borders, mouse support,\nviolet status bar). Re-running the script attaches to the existing session.\n\n- Detach (leave everything running): `Ctrl-b d`\n- Switch panes: click, `Option+arrow`, or `Ctrl-b h/j/k/l`\n- Stop everything: `tmux kill-session -t internal-assistant`\n\nRequires `tmux` (`brew install tmux`).\n\n## Configuration\n\n### Backend (`backend/.env`)\n\n| Variable             | Description          | Default                        |\n| -------------------- | -------------------- | ------------------------------ |\n| `OPENAI_API_BASE`    | AI API base URL      | `https://openrouter.ai/api/v1` |\n| `OPENAI_API_KEY`     | API key              | —                              |\n| `CHAT_MODEL`         | Chat model name      | `deepseek/deepseek-v4-flash:free` |\n| `EMBEDDING_MODEL`    | Embedding model      | `nvidia/llama-nemotron-embed-vl-1b-v2:free` |\n| `DATABASE_URL`       | Neon Postgres URL    | —                              |\n| `AZURE_CLIENT_ID`    | Azure app client ID  | —                              |\n| `AZURE_TENANT_ID`    | Azure tenant ID      | —                              |\n| `AZURE_CLIENT_SECRET`| Azure client secret  | —                              |\n\n### Frontend (`frontend/.env`)\n\n| Variable               | Description          |\n| ---------------------- | -------------------- |\n| `VITE_AZURE_CLIENT_ID` | Azure app client ID  |\n| `VITE_AZURE_TENANT_ID` | Azure tenant ID      |\n\n## Supported File Types\n\nPDF, TXT, Markdown, DOCX, CSV, XLSX\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaigontechnology%2Finternal-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaigontechnology%2Finternal-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaigontechnology%2Finternal-assistant/lists"}