This project is a full-stack application designed to execute predefined Oracle database queries from a user-friendly web interface, mask sensitive data from the results, and log the operations.
- Backend: Node.js with Express, using the
oracledbdriver to connect to Oracle databases. - Frontend: React (with Vite) and Material-UI for a modern user interface.
- Node.js: Install a recent version of Node.js (LTS recommended) from the official website.
- Oracle Instant Client: This is required for the backend to communicate with your database.
- Download the "Instant Client for Microsoft Windows (x64)" ZIP file from the Oracle Instant Client downloads page.
- Create a permanent, simple directory for the client, for example:
C:\oracle\instantclient_21_3. - Unzip the downloaded file into this directory.
- Add this directory to your Windows
PATHenvironment variable. This allows Node.js to find the necessary files.- Search for "Edit the system environment variables" in the Start Menu.
- Click on "Environment Variables...".
- Under "System variables", find and select the
Pathvariable, then click "Edit...". - Click "New" and add the path to your Instant Client directory (e.g.,
C:\oracle\instantclient_21_3). - Click OK on all windows to save the changes.
- You may need to restart your terminal or computer for the new
PATHto take effect.
-
Create
.envFile:- In the project root (
UIAutomation), create a new file named.env. - Copy the contents from
.env_exampleand fill in your Oracle database credentials.
- In the project root (
-
Install Dependencies:
- Open a terminal (like Command Prompt or PowerShell) in the project root directory (
UIAutomation). - Run the command:
npm install
- Open a terminal (like Command Prompt or PowerShell) in the project root directory (
-
Start the Backend:
- In the same terminal, run:
node server.js - The backend should now be running on
http://localhost:3000.
- In the same terminal, run:
-
Navigate to Frontend Directory:
- Open a new terminal.
- Navigate into the frontend folder:
cd frontend
-
Install Dependencies:
- Run the command:
npm install
- Run the command:
-
Start the Frontend:
- In the same terminal (inside the
frontenddirectory), run:npm run dev - The frontend will start, and it will give you a "Local" URL, typically
http://localhost:5173.
- In the same terminal (inside the
- Open your web browser and go to the frontend URL (e.g.,
http://localhost:5173). - You should see the UI, where you can select a service and run a query.
- Queries: The predefined queries are located in the
PREDEFINED_QUERIESarray infrontend/src/App.tsx. You can modify these to fit your needs. - Data Masking: The logic for masking sensitive data is in
utils/masking.js. Update this file to specify which data fields to mask.