Connect Replit to On-Prem SQL Server

Connect Replit to an on-prem SQL Server database without opening a single firewall port or handing over a database password.

In this video I put DreamFactory in front of a SQL Server database on my local network, generate a REST API from it, lock that API down with a read-only role and a scoped API key, then I have Replit build a live delivery operations dashboard on top of it. Replit calls the API from the app's backend, so the key never reaches the browser.

What's covered:

  • Why AI app builders like Replit can't reach on-prem databases, and how DreamFactory bridges that gap over HTTPS
  • Connecting SQL Server in DreamFactory and generating a REST API with no code
  • Testing the API live in the API docs, including filters that run as SQL on the server
  • Creating a read-only role scoped to specific tables
  • Creating an API key tied to that role: the only credential Replit ever holds
  • Connecting Replit to the API with the key kept server-side
  • A live dashboard over 2 million shipments: KPI cards, delivery center filter, late deliveries, tracking number search

Timestamps:

0:00 Intro and architecture

0:27 SQL Server connection in DreamFactory

1:40 Live API docs and filters

2:48 Read-only role

4:30 Scoped API key

5:19 The Replit prompt, explained

6:54 Replit builds the app (25x)

7:15 Adding the secrets

8:23 Live dashboard on on-prem data

8:38 Tracking number search

8:59 Wrap-up

#DreamFactory #Replit #ReplitAgent #SQLServer #RESTAPI #OnPrem #AIAppBuilder #Dashboard #APISecurity