Vortex is an application that generates endpoints to receive HTTP requests.
Clone this repository and change directory to its root:
git clone https://github.com/JoeCardoso13/Vortex.git && cd Vortex
Then follow instructions in the README.md files from the server/ and client/ folders respectively.
Vortex uses a hybrid PostgreSQL + MongoDB database system where PostgreSQL manages relational structure and MongoDB stores flexible request data.
┌─────────────────────────────────────────────────────────────┐
│ Incoming Request │
└────────────────────────┬────────────────────────────────────┘
│
▼
┌──────────────────────┐
│ DatabaseService │
│ write_req() │
└─────────┬────────────┘
│
┌─────────────┴─────────────┐
│ │
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ MongoDB │ │ PostgreSQL │
│ │ │ │
│ Requests │◄───────│ Requests │
│ Collection │ ref │ Table │
│ │ │ │
│ { │ │ ┌─────────────┐ │
│ headers: {}, │ │ │ bin_id │ │
│ body: {}, │ │ │ mongodb_ │ │
│ method: "GET",│ │ │ doc_id ───┼─┼──┐
│ ... │ │ └─────────────┘ │ │
│ } │ │ │ │
│ │ │ Bins Table │ │
│ ObjectId: │ │ ┌─────────────┐ │ │
│ 507f1f77bcf... │◄───────┼──│ id │ │ │
│ │ │ │ path │ │ │
└──────────────────┘ │ └─────────────┘ │ │
└──────────────────┘ │
│
Stores as VARCHAR(24) │
string reference ─────┘
When writing a request:
- Full request payload (headers, body, method, etc.) is inserted into MongoDB's
Requestscollection - MongoDB returns an ObjectId for the document
- A record is created in PostgreSQL's
Requeststable with:bin_id(foreign key to the Bins table)mongodb_doc_id(the MongoDB ObjectId stored as a VARCHAR(24) string)
When reading requests:
- PostgreSQL is queried to retrieve all
mongodb_doc_idvalues for a specific bin - Those string IDs are converted back to MongoDB ObjectIds
- All actual request documents are fetched from MongoDB in a single batch query
This architecture provides:
- PostgreSQL: Handles relational integrity (bins → requests relationship), efficient filtering, and joins
- MongoDB: Stores flexible, schema-less request payloads that can vary in structure
- Bridge: The
mongodb_doc_idcolumn in PostgreSQL connects both databases seamlessly