Skip to content

AkashBhuiyan/embedqa-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EmbedQA - API Testing Platform

A modern, Postman-like API testing platform built with Angular 17 and Spring Boot.

Angular TypeScript

πŸš€ Features

Current

  • βœ… Multi-Tab Interface - Work on multiple requests simultaneously
  • βœ… Request Builder - Full-featured HTTP request configuration
    • URL bar with method selector (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
    • Query parameters editor
    • Headers editor
    • Request body (JSON, XML, Form Data, Raw)
    • Authentication (Bearer Token, Basic Auth, API Key)
  • βœ… Response Viewer - View response body, headers, status, timing
  • βœ… Environment Support - Switch between environments (Dev, Staging, Prod)
  • βœ… Dark Theme - Modern dark UI design
  • βœ… Collapsible Sidebar - Maximize workspace

Upcoming

  • πŸ”œ Collections management
  • πŸ”œ Request history
  • πŸ”œ Environment variables editor
  • πŸ”œ Import/Export (Postman format)
  • πŸ”œ Monaco Editor integration

πŸ“Έ Screenshots

Embedqa

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
Angular 17.x Framework
TypeScript 5.4 Language
RxJS 7.8 Reactive programming
Angular Signals - State management
SCSS - Styling

Backend

Technology Version Purpose
Spring Boot 3.5.7 Framework
Java 21 Language
PostgreSQL 16 Database
Apache HttpClient 5 5.3 HTTP requests

πŸ“ Project Structure

src/app/
β”œβ”€β”€ core/                          # Core functionality
β”‚   β”œβ”€β”€ enums/
β”‚   β”‚   β”œβ”€β”€ HttpMethod.ts          # GET, POST, PUT, DELETE, etc.
β”‚   β”‚   β”œβ”€β”€ BodyType.ts            # JSON, XML, FORM_DATA, RAW
β”‚   β”‚   └── AuthType.ts            # NONE, BEARER_TOKEN, BASIC_AUTH, API_KEY
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ ExecuteRequest.ts      # Request payload model
β”‚   β”‚   β”œβ”€β”€ ApiResponse.ts         # Response model
β”‚   β”‚   β”œβ”€β”€ RequestTab.ts          # Tab state model
β”‚   β”‚   β”œβ”€β”€ Environment.ts         # Environment model
β”‚   β”‚   β”œβ”€β”€ Collection.ts          # Collection model
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ state.service.ts       # Signal-based state management
β”‚   β”‚   β”œβ”€β”€ api-executor.service.ts # Execute HTTP requests
β”‚   β”‚   β”œβ”€β”€ collection.service.ts  # Collections CRUD
β”‚   β”‚   β”œβ”€β”€ environment.service.ts # Environments CRUD
β”‚   β”‚   └── request.service.ts     # Saved requests CRUD
β”‚   └── interceptors/
β”‚       └── http-error.interceptor.ts
β”œβ”€β”€ shared/                        # Shared components
β”‚   └── components/
β”‚       └── key-value-editor/      # Reusable key-value editor
β”œβ”€β”€ features/                      # Feature modules
β”‚   β”œβ”€β”€ request-builder/           # Main request builder
β”‚   β”œβ”€β”€ collections/               # Collections management (placeholder)
β”‚   β”œβ”€β”€ environments/              # Environments management (placeholder)
β”‚   └── history/                   # Request history (placeholder)
β”œβ”€β”€ app.component.ts               # Root component with sidebar
β”œβ”€β”€ app.config.ts                  # Application configuration
└── app.routes.ts                  # Routing configuration

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • npm 9+
  • Angular CLI 17 (npm install -g @angular/cli)

Installation

# Clone the repository
git clone https://github.com/AkashBhuiyan/embedqa-ui.git
cd embedqa-ui

# Install dependencies
npm install

# Start development server
npm start

The app will be available at http://localhost:4200

Backend Setup

The frontend expects the backend API at http://localhost:8085/api/v1. See the backend repository for setup instructions.

πŸ”§ Configuration

Proxy Configuration

API requests are proxied to the backend via proxy.conf.json:

{
  "/api": {
    "target": "http://localhost:8085",
    "secure": false,
    "changeOrigin": true
  }
}

Environment Files

// src/environments/environment.ts (Development)
export const environment = {
  production: false,
  apiUrl: '/api/v1'
};

// src/environments/environment.prod.ts (Production)
export const environment = {
  production: true,
  apiUrl: '/api/v1'
};

πŸ“– Usage Guide

Creating a Request

  1. Click the + button in the tab bar to create a new tab
  2. Select the HTTP method from the dropdown
  3. Enter the request URL
  4. Configure parameters, headers, body, or authentication as needed
  5. Click Send

Using Query Parameters

  1. Click the Params tab
  2. Add key-value pairs
  3. Toggle the checkbox to enable/disable individual parameters
  4. Parameters are automatically appended to the URL

Setting Headers

  1. Click the Headers tab
  2. Add header name-value pairs
  3. Common headers like Content-Type are auto-set based on body type

Request Body

  1. Click the Body tab
  2. Select body type: JSON, XML, Form Data, or Raw
  3. Enter the body content in the text area

Authentication

  1. Click the Auth tab
  2. Select auth type:
    • Bearer Token: Enter your JWT or access token
    • Basic Auth: Enter username and password
    • API Key: Enter key and header name (default: X-API-Key)

Environment Switching

  1. Click the environment dropdown in the header
  2. Select an environment (Dev, Staging, Prod)
  3. Environment variables like {{baseUrl}} will be substituted

🎨 Theming

The app uses CSS custom properties for theming. Variables are defined in src/styles.scss:

:root {
  --bg-primary: #1e1e1e;
  --bg-secondary: #252526;
  --bg-tertiary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent-primary: #4fc3f7;
  --status-success: #98c379;
  --status-danger: #e06c75;
  // ...
}

πŸ§ͺ Development

Available Scripts

# Start development server
npm start

# Build for production
npm run build

# Run tests
npm test

# Lint code
npm run lint

Code Style

  • Use Angular standalone components
  • Use signals for state management
  • Use @core/, @shared/, @features/, @env/ path aliases
  • Follow Angular style guide

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ™ Acknowledgments

About

API Testing Platform UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors