Getting Started with DEX Elements
DEX Elements generates a standard Angular project from your migrated Oracle Forms application.
This guide walks you through setting up, configuring, and running the project — from
git clone to a running application in under 10 minutes.
A fully functional Angular 17+ application connected to your Oracle Database through a secure REST API, with all Oracle Forms business logic preserved as TypeScript services.
Prerequisites
Before you begin, make sure you have the following installed on your development machine:
| Tool | Version | Purpose |
|---|---|---|
| Node.js | 20.x or higher | JavaScript runtime |
| npm | 10.x or higher | Package manager (ships with Node) |
| Angular CLI | 17.x or higher | Build, serve, and scaffold Angular projects |
| Git | Any recent version | Version control |
| Oracle Database | 12c or higher | Your existing database (unchanged) |
Install the Angular CLI globally if you haven't already:
npm install -g @angular/cli Installation
Step 1 — Clone the repository
After DEX Elements completes the migration, you'll receive access to a Git repository containing your generated Angular project:
git clone https://git.dexelements.com/your-org/your-project.git
cd your-project Step 2 — Install dependencies
Install all npm packages. The project uses standard Angular dependencies plus the DEX Elements component library:
npm install This typically takes 30–60 seconds. You'll see output like:
added 1,247 packages in 42s
✔ All packages installed successfully Step 3 — Configure the environment
Copy the example environment file and fill in your database connection details:
cp .env.example .env Open .env and configure the API endpoint:
# API Configuration
DEX_API_URL=https://api.your-company.com/v1
DEX_API_KEY=your-api-key-here
# Oracle Database (used by the API server)
ORACLE_HOST=db.your-company.com
ORACLE_PORT=1521
ORACLE_SERVICE=ORCL
ORACLE_USER=dex_app
ORACLE_PASSWORD=********
# Authentication
AUTH_PROVIDER=azure-ad
AUTH_CLIENT_ID=your-client-id
AUTH_TENANT_ID=your-tenant-id Never commit the .env file to version control. It's already included in .gitignore by default.
Step 4 — Start the API server
The DEX API server connects to your Oracle Database and exposes the REST endpoints your Angular app consumes:
npm run api:start 🚀 DEX API Server running on http://localhost:3000
📦 Connected to Oracle Database (ORCL)
🔐 Auth provider: Azure AD
📋 47 endpoints registered
✅ Health check: OK Step 5 — Start the Angular app
In a new terminal window, start the Angular development server:
ng serve ✔ Browser application bundle generated.
✔ Compiled successfully.
** Angular Live Development Server is listening on localhost:4200 **
Open your browser on http://localhost:4200/ Open http://localhost:4200 in your browser. You should see the migrated application with all your Oracle Forms data, forms, and business logic — running as a modern web app.
Project Structure
The generated project follows standard Angular conventions with a few DEX-specific additions:
your-project/
├── src/
│ ├── app/
│ │ ├── modules/ # One module per Oracle Forms .fmb
│ │ │ ├── contractors/
│ │ │ │ ├── contractors.component.ts
│ │ │ │ ├── contractors.dex.html # DEX template (JSON-driven)
│ │ │ │ ├── contractors.service.ts # Migrated PL/SQL → TypeScript
│ │ │ │ └── contractors.model.ts # Typed interfaces
│ │ │ ├── invoices/
│ │ │ └── inventory/
│ │ ├── shared/
│ │ │ ├── components/ # DEX component library
│ │ │ ├── services/ # Auth, HTTP, error handling
│ │ │ └── guards/ # Route & permission guards
│ │ ├── descriptors/ # JSON screen descriptors
│ │ │ ├── contractors.desc.json
│ │ │ ├── invoices.desc.json
│ │ │ └── inventory.desc.json
│ │ ├── app.routes.ts
│ │ └── app.config.ts
│ ├── assets/
│ ├── environments/
│ │ ├── environment.ts
│ │ └── environment.prod.ts
│ └── styles/
├── api/ # DEX API server
│ ├── routes/ # Auto-generated REST endpoints
│ ├── middleware/ # Auth, validation, logging
│ └── server.ts
├── angular.json
├── package.json
├── .env.example
└── Dockerfile Key directories
| Path | Description |
|---|---|
src/app/modules/ | Each Oracle Forms module is a standalone Angular module with component, service, and model files. |
src/app/descriptors/ | JSON files that define each screen's layout, fields, validation rules, and data bindings. Edit these to customize the UI without touching TypeScript. |
src/app/shared/components/ | The DEX component library — grids, forms, LOVs, dialogs, tabs. Used by all modules. |
api/routes/ | Auto-generated REST endpoints. One file per Oracle Forms data block. |
Running the Application
# Start both API and Angular in one command
npm run dev
# Or start them separately:
npm run api:start # API on :3000
ng serve # Angular on :4200
# Run tests
ng test # Unit tests
npm run e2e # End-to-end tests Environment Variables
| Variable | Required | Description |
|---|---|---|
DEX_API_URL | Yes | Base URL of the DEX API server |
DEX_API_KEY | Yes | API authentication key |
ORACLE_HOST | Yes | Oracle Database hostname |
ORACLE_PORT | No | Database port (default: 1521) |
ORACLE_SERVICE | Yes | Oracle service name or SID |
AUTH_PROVIDER | No | azure-ad, okta, keycloak, or local |
LOG_LEVEL | No | debug, info, warn, error (default: info) |
API Connection
The Angular app communicates with the Oracle Database exclusively through the DEX API server. The connection is configured in src/environments/environment.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:3000/api/v1',
authConfig: {
provider: 'azure-ad',
clientId: 'your-client-id',
tenantId: 'your-tenant-id',
redirectUri: 'http://localhost:4200/auth/callback',
},
}; In production, the API URL points to your deployed server:
export const environment = {
production: true,
apiUrl: 'https://api.your-company.com/v1',
authConfig: {
provider: 'azure-ad',
clientId: 'your-client-id',
tenantId: 'your-tenant-id',
redirectUri: 'https://app.your-company.com/auth/callback',
},
}; Authentication
DEX Elements supports multiple identity providers out of the box. Configure your provider in the environment file and the framework handles the OAuth 2.0 / OIDC flow automatically.
| Provider | Config Key | Notes |
|---|---|---|
| Azure AD | azure-ad | Recommended for Microsoft environments. Supports MFA and Conditional Access. |
| Okta | okta | Set AUTH_OKTA_DOMAIN in .env. |
| Keycloak | keycloak | Self-hosted option. Set AUTH_KEYCLOAK_URL. |
| Local | local | Username/password against the API. For development only. |
JSON Descriptors
Every screen in the application is driven by a JSON descriptor file. This is the fastest way to customize the UI — no TypeScript changes, no recompilation:
{
"title": "Contractor Data",
"dataSource": "/api/v1/contractors",
"layout": "master-detail",
"fields": [
{
"id": "code",
"label": "Code",
"type": "text",
"width": 100,
"sortable": true,
"required": true
},
{
"id": "name",
"label": "Company Name",
"type": "text",
"width": 250,
"searchable": true
},
{
"id": "paymentTerms",
"label": "Payment Terms",
"type": "select",
"options": ["Net 30", "Net 60", "Net 90"],
"default": "Net 30"
}
],
"actions": ["create", "edit", "delete", "export"],
"detailRelation": {
"endpoint": "/api/v1/contractors/{id}/addresses",
"title": "Addresses"
}
} Modify any field — change a label, reorder columns, add validation — and the UI updates on the next page load.
Adding Custom Components
Generate a new Angular component using the CLI and integrate it with the DEX data layer:
# Generate a new component
ng generate component modules/contractors/contractor-dashboard
# The component can inject any DEX service
# and use any DEX component in its template import { Component, OnInit } from '@angular/core';
import { ContractorService } from '../contractors.service';
@Component({
selector: 'app-contractor-dashboard',
template: `
<dex-grid [data]="contractors" [descriptor]="gridConfig">
</dex-grid>
<!-- Your custom chart -->
<my-revenue-chart [data]="revenueData"></my-revenue-chart>
`,
})
export class ContractorDashboardComponent implements OnInit {
contractors = [];
revenueData = [];
constructor(private api: ContractorService) {}
async ngOnInit() {
this.contractors = await this.api.getAll();
this.revenueData = await this.api.getRevenue();
}
} Custom Services
Extend the auto-generated services with your own business logic:
// This file is auto-generated but safe to extend.
// DEX will preserve your custom methods on re-migration.
@Injectable({ providedIn: 'root' })
export class ContractorService extends DexBaseService {
// ── Auto-generated (do not edit above this line) ──
getAll(params?: QueryParams) { /* ... */ }
getById(id: string) { /* ... */ }
create(data: Contractor) { /* ... */ }
update(id: string, data: Partial<Contractor>) { /* ... */ }
delete(id: string) { /* ... */ }
// ── Your custom methods (preserved on re-migration) ──
async getTopContractors(limit = 10) {
return this.http.get(`${this.apiUrl}/top?limit=${limit}`);
}
async exportToPdf(ids: string[]) {
return this.http.post(`${this.apiUrl}/export`, { ids, format: 'pdf' });
}
} Theming & Styling
Customize the visual appearance using CSS custom properties in src/styles/theme.scss:
:root {
// Brand colors
--dex-primary: #6c5ce7;
--dex-primary-light: #a29bfe;
--dex-accent: #00cec9;
// Layout
--dex-sidebar-width: 240px;
--dex-topbar-height: 56px;
--dex-border-radius: 8px;
// Typography
--dex-font-family: 'Inter', sans-serif;
--dex-font-size-base: 14px;
// Dark mode (auto-detected)
@media (prefers-color-scheme: dark) {
--dex-bg: #0f0f1a;
--dex-text: #e8e8ef;
--dex-border: #2a2a3a;
}
} Build for Production
# Build the Angular app
ng build --configuration=production
# Build the API server
npm run api:build
# Output is in dist/ — ready to deploy The production build generates optimized, tree-shaken bundles with AOT compilation. Typical bundle size is 250–400KB gzipped, depending on the number of modules.
Docker
A Dockerfile is included for containerized deployments:
# Build the Docker image
docker build -t dex-app .
# Run the container
docker run -p 80:80 -p 3000:3000 \
--env-file .env \
dex-app The image uses a multi-stage build: Node.js for the API server and nginx for serving the Angular app. Total image size is typically under 150MB.
CI/CD Pipeline
Example GitHub Actions workflow for automated testing and deployment:
name: Deploy
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: ng test --watch=false
- run: ng build --configuration=production
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build -t dex-app .
- run: docker push your-registry/dex-app:latest