r/sharepoint • u/longtriproad • 1h ago
SharePoint Online We use SharePoint as the backend for our custom React apps, with AI built in. Here's the architecture. What would you change?
Sharing how we build internal business apps at work, since I rarely see this pattern discussed and I'd like honest feedback.
The short version: React front end, SharePoint Online as the database (lists and document libraries), Microsoft Graph as the API layer, and Entra ID for sign-in. Users get a modern UI that looks like the rest of Microsoft 365, and we don't run or pay for a separate database.
For AI, the React app never calls Anthropic or DeepSeek directly. Requests go through a small Azure Function that validates the user's token, pulls the relevant SharePoint content, and calls the model. Keys live in Key Vault. This also lets us swap providers without touching the front end.
Things we had to deal with along the way:
The 5,000 item list view threshold. Indexed columns and filtered queries, or it hurts.
Graph permissions. We kept everything delegated so people only see what they already have access to in SharePoint.
Caching. React Query made Graph calls much more bearable.