{"id":13880543,"url":"https://github.com/fcoury/oxide","last_synced_at":"2025-10-14T14:55:34.008Z","repository":{"id":43405310,"uuid":"510907833","full_name":"fcoury/oxide","owner":"fcoury","description":":floppy_disk: Teach your PostgreSQL database how to speak MongoDB Wire Protocol","archived":false,"fork":false,"pushed_at":"2025-05-12T19:43:27.000Z","size":4369,"stargazers_count":280,"open_issues_count":12,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-13T21:53:38.666Z","etag":null,"topics":["database","mongodb","postgres","postgresql","rust"],"latest_commit_sha":null,"homepage":"https://demo.oxidedb.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcoury.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-05T22:06:57.000Z","updated_at":"2025-07-10T11:14:20.000Z","dependencies_parsed_at":"2023-01-19T04:31:19.841Z","dependency_job_id":null,"html_url":"https://github.com/fcoury/oxide","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/fcoury/oxide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcoury%2Foxide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcoury%2Foxide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcoury%2Foxide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcoury%2Foxide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcoury","download_url":"https://codeload.github.com/fcoury/oxide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcoury%2Foxide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265527541,"owners_count":23782480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mongodb","postgres","postgresql","rust"],"created_at":"2024-08-06T08:03:09.001Z","updated_at":"2025-10-14T14:55:28.966Z","avatar_url":"https://github.com/fcoury.png","language":"Rust","funding_links":[],"categories":["Rust","rust"],"sub_categories":[],"readme":"![banner-small](https://user-images.githubusercontent.com/1371/184679510-4f455245-8580-4b00-809b-19f865dd0931.png)\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/fcoury/oxide/actions/workflows/ci.yml\"\u003e\n      \u003cimg src=\"https://github.com/fcoury/oxide/actions/workflows/ci.yml/badge.svg\"\u003e\n   \u003c/a\u003e\n   \u003c!-- [![CI workflow](https://github.com/fcoury/oxide/actions/workflows/ci.yml/badge.svg)](https://github.com/fcoury/oxide/actions/workflows/ci.yml) --\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u0026ldquo;\u003ci\u003eIf it looks like MongoDB, swims like MongoDB, and quacks like MongoDB, then it probably is PostgreSQL.\u003c/i\u003e\u0026rdquo; :upside_down_face:\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://discord.gg/f7RwsbWEVh\"\u003eDiscord\u003c/a\u003e | \u003ca href=\"https://demo.oxidedb.com\" target=\"_blank\"\u003eOnline Demo\u003c/a\u003e | \u003ca href=\"https://youtu.be/hC-CZOEjzaM\"\u003eIntro Video\u003c/a\u003e | \u003ca href=\"https://github.com/fcoury/oxide#quickstart\"\u003eQuickstart\u003c/a\u003e\n\u003c/p\u003e\n\n# OxideDB\n\nOxideDB is a translation layer that works as a MongoDB database server while using PostgreSQL's JSON capabilities as the underlying data store.\n\n## Audience\n\nThis project might be something that you could be interested on if:\n\n- You spend too much time managing; or too much money paying for a MongoDB instance, while only using it as a simple\ndocument store, without any sharding features\n- You already have a running PostgreSQL deployment, or prefer to manage it over MongoDB\n\nOn the other hand, if your use-case leverages MongoDB as a distributed database, then unfortunately this project might\nnot be for you. At least right now supporting multi-sharding and scale-out deployments is not part of the roadmap.\n\n## Current status\n\nThe project was heavily inspired by [FerretDB](https://ferretdb.io) and is on its early days. The main difference is that\nthere is no intention to support any database other than PostgreSQL (FerretDB is also supporting Tigris) and it's written\nin Rust, as opposed to Go.\n\nIn order to translate the MongoDB Query language - which is based on JSON - to SQL I have ported [the mongodb-language-model library](https://github.com/mongodb-js/mongodb-language-model) that was originally written in Node.js and PEG.js to Rust and [pest.rs](https://pest.rs/). It was an excellent opportunity to learn how parsers work in a bit more depth.\n\nYou can check it out here: [mongodb-language-model-rust](https://github.com/fcoury/mongodb-language-model-rust).\n\nAt this moment, it's being developed as a personal project, but contributors are highly welcomed. If that something you'd\nbe interested on, be more than welcome to contact me.\n\n## Online demo\n\nThere's an online [demo of the Web Interface live hosted at Railway.app](https://demo.oxidedb.com/).\n\n## Quickstart\n\nDownload the [latest binary](https://github.com/fcoury/oxide/releases/latest) and run it. You will need to point it to a running PostgreSQL for Oxide to use as its backend.\n\n```\n\u003e $ ./oxide --postgres-url \"postgres://postgres:postgres@localhost:5432/test\"\n[2022-07-13T02:57:46Z INFO  oxide::server] Connecting to postgres://*****:*****@localhost:5432/test...\n[2022-07-13T02:57:46Z INFO  oxide::server] OxideDB listening on 127.0.0.1:27017...\n```\n\nAnd with the database configuration set, you can use any [MongoDB](https://www.mongodb.com) client to connect to OxideDB, like [mongosh](https://www.mongodb.com/docs/mongodb-shell/):\n\n```\n\u003e $ mongosh\nCurrent Mongosh Log ID:\t62ce3531d10f489bc82520c4\nConnecting to:\t\tmongodb://127.0.0.1:27017/?directConnection=true\u0026serverSelectionTimeoutMS=2000\u0026appName=mongosh+1.5.0\nUsing MongoDB:\t\t3.6.23\nUsing Mongosh:\t\t1.5.0\n\nFor mongosh info see: https://docs.mongodb.com/mongodb-shell/\n\n------\n   The server generated these startup warnings when booting\n   2022-07-12T18:56:41.654-0300:\n   2022-07-12T18:56:41.654-0300: ** WARNING: Access control is not enabled for the database.\n   2022-07-12T18:56:41.654-0300: **          Read and write access to data and configuration is unrestricted.\n   2022-07-12T18:56:41.654-0300:\n------\n\ntest\u003e db.col.insertMany([{ name: \"Felipe\" }, { name: \"Fernanda\" }]);\n{\n  acknowledged: true,\n  insertedIds: {\n    '0': ObjectId(\"62ce3536d10f489bc82520c5\"),\n    '1': ObjectId(\"62ce3536d10f489bc82520c6\")\n  }\n}\ntest\u003e db.col.find({ \"name\": \"Fernanda\" })\n[ { _id: ObjectId(\"62ce3536d10f489bc82520c6\"), name: 'Fernanda' } ]\n```\n\n## Quick intro\n\n[![Intro to OxideDB](docs/assets/video.png)](https://youtu.be/8TkcGV0TkgM)\n\n## Web interface\n\n![Web UI](docs/assets/screenshot.png)\n\nIf you want to perform quick queries on your database, you can use the built in web interface, just start oxide with the `--web` flag:\n\n```\n\u003e $ ./oxide --postgres-url postgres://postgres:postgres@localhost:5432/oxide\n[2022-07-29T00:20:11Z INFO  oxide::server] Connecting to postgres://*****:*****@localhost:5432/oxide...\n[2022-07-29T00:20:11Z INFO  oxide::server] OxideDB listening on 0.0.0.0:27017...\n```\n\nNow just navigate to http://localhost:5432 and you'll be able to perform quick queries.\n\n## Running options\n\nYou can also set the `DATABASE_URL` environment variable or even use a `.env` file.\n\nBy default oxide will bind to 127.0.0.1 and port 27017. You can change those settings using the following parameters:\n\n```\n\u003e $ ./oxide --help\noxide 0.1.6\nA database compatible with MongoDB Wire Protocol that uses PostgreSQL for backend storage.\n\nUSAGE:\n    oxide [OPTIONS]\n    oxide \u003cSUBCOMMAND\u003e\n\nOPTIONS:\n    -d, --debug                          Show debugging information\n    -h, --help                           Print help information\n    -l, --listen-addr \u003cLISTEN_ADDR\u003e      Listening address, defaults to 127.0.0.1\n    -p, --port \u003cPORT\u003e                    Listening port, defaults to 27017\n    -u, --postgres-url \u003cPOSTGRES_URL\u003e    PostgreSQL connection URL\n    -V, --version                        Print version information\n    -w, --web                            Starts web interface\n        --web-addr \u003cWEB_ADDR\u003e            Web binding address\n\nSUBCOMMANDS:\n    help    Print this message or the help of the given subcommand(s)\n    web     Start OxideDB web interface\n```\n\n### Running with Docker\n\nAssuming you're running a local PostgreSQL instance, you can run OxideDB with Docker with the command below.\n\n```\ndocker build -t oxide .\ndocker run -d -p 27017:27017 -p 8087:8087 -e DATABASE_URL=postgres://postgres:postgres@host.docker.internal:5432/test --name oxide oxide\n```\n\n### Running from source\n\n```shell\ngit clone https://github.com/fcoury/oxide.git\ncd oxide\nexport DATABASE_URL=\"postgres://postgres:postgres@localhost:5432/test\"\nmake start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcoury%2Foxide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcoury%2Foxide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcoury%2Foxide/lists"}