Skip to content

dchae/rbasket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo rBasket

rBasket is a web service that allows you to create unique web hooks to capture, log, and inspect HTTP requests via public API or simple user interface.

Preview

Create a Basket My Baskets Basket with request

Features

  • Create a unique basket and endpoint URL for that basket.
  • See a list of all basket created by a user.
  • Capture HTTP requests sent to a basket and the details of each request, including
  • view details of captured requests, including:
    • HTTP method
    • Path
    • Headers
    • Body
  • Sort requests sent to a basket in order of most recent or least recent.
  • View recent responses sent to a basket with out the need to refesh the page.
  • Copy the URL of a basket with a simple mouse click.
  • View the responses sent to a basket in JSON format.
  • Clear out all captured responses in a basket with a simple mouse click.
  • Delete a basket and its contents with a simple mouse click.

Implementation Details

  • Front-end is a single-page web app built with React + TypeScript + vite and material ui.
  • Back-end is implemented with express.js.
  • Basket and request metadata are stored in PostgreSQL.
  • Request payload data is stored in MongoDB.
  • State persistence is implemented via browser local storage, allowing users to access the same baskets across sessions.

Configuration

Depending on the settings of your psql and mongod services, you may need to specify some connection options like user, password, port, etc. To do so, create a .env file in the backend directory according to the format of the provided .env.example file:

# Example .env file
# All values are optional

# Application port
PORT=3000             # Port the backend server will run on

# Postgres configuration
PGHOST=localhost
PGPORT=5432
PGDATABASE=rbasket
PGUSER=postgres
PGPASSWORD=password

# MongoDB configuration
MONGO_HOST=localhost
MONGO_DBNAME=requestBodies
MONGO_USER=mongoUser
MONGO_PASS=password
MONGO_TLS=true
MONGO_CA_PATH=/path/to/tlsCertKeyFile.pem
MONGO_REPLICA_SET=rs0
MONGO_READ_PREF=secondaryPreferred
MONGO_RETRY_WRITES=false
MONGO_AUTH_SRC=admin

💡Note: Ensure that PostgreSQL and MongoDB are installed and running locally with the above credentials. You may need to adjust these values to match your environment.

Installation

Navigate to the backend directory

cd backend

Build the full project

npm run build

Start the application

npm start

If serving on nginx:

npm run nginx
  • copies contents of dist/ to /var/www/rbasket
  • dist/ should be built with npm run build or npm run build:frontend first.

API

Dependencies

About

Create baskets to capture, log, and inspect arbitrary HTTP requests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • JavaScript 1.1%
  • HTML 0.5%