Skip to content

AbulH88/UIDataBaseApp

Repository files navigation

UI Automation Project

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.

Architecture

  • Backend: Node.js with Express, using the oracledb driver to connect to Oracle databases.
  • Frontend: React (with Vite) and Material-UI for a modern user interface.

Setup Instructions (for Windows)

Prerequisites

  1. Node.js: Install a recent version of Node.js (LTS recommended) from the official website.
  2. 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 PATH environment 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 Path variable, 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 PATH to take effect.

Backend Setup

  1. Create .env File:

    • In the project root (UIAutomation), create a new file named .env.
    • Copy the contents from .env_example and fill in your Oracle database credentials.
  2. Install Dependencies:

    • Open a terminal (like Command Prompt or PowerShell) in the project root directory (UIAutomation).
    • Run the command: npm install
  3. Start the Backend:

    • In the same terminal, run: node server.js
    • The backend should now be running on http://localhost:3000.

Frontend Setup

  1. Navigate to Frontend Directory:

    • Open a new terminal.
    • Navigate into the frontend folder: cd frontend
  2. Install Dependencies:

    • Run the command: npm install
  3. Start the Frontend:

    • In the same terminal (inside the frontend directory), run: npm run dev
    • The frontend will start, and it will give you a "Local" URL, typically http://localhost:5173.

Running the Application

  • 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.

Customization

  • Queries: The predefined queries are located in the PREDEFINED_QUERIES array in frontend/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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors