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