Skip to content

Commit dd5760e

Browse files
Feat: implemented dab config
1 parent f6b1daa commit dd5760e

57 files changed

Lines changed: 6187 additions & 109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 66 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,94 @@
1-
# IntelliTectSqlMcpConfiguration
1+
# DAB Config Builder
22

3-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.3.
3+
An Angular application for creating and managing [Azure Data API Builder (DAB)](https://learn.microsoft.com/en-us/azure/data-api-builder/) configuration files. Azure Data API Builder generates REST and GraphQL APIs from your database without writing backend code.
44

5-
## Development server
5+
## Features
66

7-
To start a local development server, run:
7+
- Configure database connections (SQL Server, PostgreSQL, MySQL, Cosmos DB)
8+
- Define entities from database tables and views
9+
- Set up role-based permissions
10+
- Configure REST/GraphQL endpoints, CORS, and authentication
11+
- Import database schema automatically
12+
- Live JSON preview with download/copy functionality
813

9-
```bash
10-
ng serve
11-
```
14+
## Tech Stack
1215

13-
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
16+
- Angular 21
17+
- TypeScript 5.9
18+
- Bootstrap 5.3
19+
- RxJS 7.8
20+
- Vitest
1421

15-
## Code scaffolding
22+
## Prerequisites
1623

17-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
24+
- Node.js (v20 or later)
25+
- npm 11.6.4 or compatible package manager
1826

19-
```bash
20-
ng generate component component-name
21-
```
27+
## Getting Started
2228

23-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
29+
### Installation
2430

25-
```bash
26-
ng generate --help
27-
```
31+
1. Clone the repository:
2832

29-
## Building
33+
```bash
34+
git clone https://github.com/danOIntellitect/IntelliTect-Sql-Mcp-Configuration.git
35+
cd IntelliTect-Sql-Mcp-Configuration
36+
```
3037

31-
To build the project run:
38+
2. Install dependencies:
39+
40+
```bash
41+
npm install
42+
```
43+
44+
### Development Server
45+
46+
Start the local development server:
3247

3348
```bash
34-
ng build
49+
npm start
50+
# or
51+
ng serve
3552
```
3653

37-
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
54+
Navigate to `http://localhost:4200/`.
3855

39-
## Running unit tests
40-
41-
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
56+
### Build
4257

4358
```bash
44-
ng test
59+
npm run build
4560
```
4661

47-
## Running end-to-end tests
62+
Build artifacts are stored in the `dist/` directory.
63+
64+
## Project Structure
65+
66+
```text
67+
src/
68+
├── app/
69+
│ ├── components/
70+
│ ├── pages/
71+
│ │ └── config-wizard/
72+
│ ├── services/
73+
│ ├── models/
74+
│ ├── utils/
75+
│ └── interceptors/
76+
├── environments/
77+
└── styles/
78+
```
4879

49-
For end-to-end (e2e) testing, run:
80+
## Testing
5081

5182
```bash
52-
ng e2e
83+
npm test
5384
```
5485

55-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
86+
## Resources
87+
88+
- [Azure Data API Builder Documentation](https://learn.microsoft.com/en-us/azure/data-api-builder/)
89+
- [DAB Configuration Reference](https://learn.microsoft.com/en-us/azure/data-api-builder/configuration/)
90+
- [Angular Documentation](https://angular.dev/)
5691

57-
## Additional Resources
92+
## License
5893

59-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
94+
Developed by IntelliTect.

angular.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
}
3131
],
3232
"styles": [
33-
"src/styles.scss"
33+
"src/styles.scss",
34+
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css",
35+
"src/styles/styles.scss"
3436
]
3537
},
3638
"configurations": {
@@ -75,4 +77,4 @@
7577
}
7678
}
7779
}
78-
}
80+
}

dab-config.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
// For more information on configuring your DAB instance, see https://learn.microsoft.com/en-us/azure/data-api-builder/configuration/
3+
// For usage of the CLI tool to create and manage DAB projects, see https://learn.microsoft.com/en-us/azure/data-api-builder/command-line/
4+
"$schema": "https://github.com/Azure/data-api-builder/releases/latest/download/dab.draft.schema.json",
5+
"data-source": {
6+
"database-type": "mssql",
7+
"connection-string": "@env('MSSQL_CONNECTION_STRING')",
8+
"options": {
9+
"set-session-context": true
10+
}
11+
},
12+
"runtime": {
13+
"rest": {
14+
"enabled": true,
15+
"path": "/api"
16+
},
17+
"graphql": {
18+
"enabled": false
19+
},
20+
"host": {
21+
"cors": {
22+
"origins": ["*"],
23+
"allow-credentials": false
24+
},
25+
// For more information on authentication configuration, see https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/how-to-authenticate-entra
26+
"authentication": {
27+
"provider": "EntraID",
28+
"jwt": {
29+
"audience": "936a47d7-f9b8-4974-ad6b-93281e50c149", // replace with Audience from app registration
30+
"issuer": "https://login.microsoftonline.com/37321907-14a5-4390-987d-ec0c66c655cd/v2.0" // replace with Tenant Id
31+
}
32+
}
33+
//"mode": "development" // development mode enables featuresa such as Swagger UI, increased logger verbosity, and health checks. Remove this setting or set to "production" for a production environment. For more information on runtime modes see
34+
// https://learn.microsoft.com/en-us/azure/data-api-builder/configuration/runtime#mode-host-runtime
35+
},
36+
"mcp": {
37+
"enabled": true,
38+
"path": "/mcp",
39+
"dml-tools": {
40+
"describe-entities": true,
41+
"create-record": true,
42+
"read-records": true,
43+
// deleting and updating are off by default, enable if needed utilizing role based permissions at the entity level
44+
"update-record": false,
45+
"delete-record": false,
46+
"execute-entity": false // execute permissions allows users to run stored procedures or functions mapped as entities in the DAB config
47+
}
48+
}
49+
// if configured, telemetry settings will enable application insights for monitoring and diagnostics. For more information see https://learn.microsoft.com/en-us/azure/data-api-builder/configuration/runtime#telemetry-runtime
50+
//"telemetry": {
51+
// "application-insights": {
52+
// "enabled": true,
53+
// "connection-string": "@env('APPLICATIONINSIGHTS_CONNECTION_STRING')"
54+
// }
55+
//}
56+
},
57+
// For more information on authentication configuration, see https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/how-to-authenticate-entra?tabs=bash#step-3-configure-entity-permissions
58+
"entities": {
59+
"User": {
60+
"source": {
61+
"object": "dbo.Users",
62+
"type": "table"
63+
},
64+
"description": "Application user records with profile information",
65+
"permissions": [
66+
// Anonymous permissions are off by default, enable if needed. Be sure to only allow necessary actions for anonymous users to avoid unintended data exposure
67+
//{
68+
// "role": "anonymous",
69+
// "actions": [ ]
70+
//},
71+
{
72+
"role": "Developers",
73+
"actions": ["*"]
74+
}
75+
]
76+
},
77+
"Product": {
78+
"source": {
79+
"object": "dbo.Products",
80+
"type": "table"
81+
},
82+
"description": "Product catalog with inventory and pricing information",
83+
"permissions": [
84+
{
85+
"role": "authenticated",
86+
"actions": ["read"]
87+
}
88+
]
89+
},
90+
"Order": {
91+
"source": {
92+
"object": "dbo.Orders",
93+
"type": "table"
94+
},
95+
"description": "Customer orders with line items and status tracking",
96+
"permissions": [
97+
{
98+
"role": "authenticated",
99+
"actions": ["read"]
100+
}
101+
]
102+
},
103+
"OrderItem": {
104+
"source": {
105+
"object": "dbo.OrderItems",
106+
"type": "table"
107+
},
108+
"description": "Line items for customer orders with quantity and pricing",
109+
"permissions": [
110+
{
111+
"role": "authenticated",
112+
"actions": ["read"]
113+
}
114+
]
115+
}
116+
}
117+
}

0 commit comments

Comments
 (0)