Go from an empty project to a production-ready backend in under 60 seconds.
urBackend is built for speed and developer freedom. Whether you're using our managed infrastructure or Bringing Your Own MongoDB, the setup experience is designed to be seamless.
Head over to the urBackend Dashboard and create a new project. You'll instantly receive two keys:
- Publishable Key (
pk_live_...): Used for frontend-safe requests (Read by default; writes only when collection RLS is enabled and user Bearer token is provided). - Secret Key (
sk_live_...): Used for server-side or administrative actions (Full Access).
Before pushing data, your Collections must be pre-configured in the dashboard. While urBackend offers flexible schema-less options, the collection itself must be registered so your API keys know where to route the data.
To get started, navigate to the Database tab in your dashboard and click "Create Collection". Specify a name (e.g., products) to initialize your endpoint.
💡 Pro Tip: You can define a detailed schema during creation, or simply create the collection and start POSTing arbitrary JSON right away—urBackend will handle the rest.
⚠️ Note: Write operations (POST, PUT, PATCH, DELETE) require your Secret Key by default and should be performed from a secure backend environment.If you enable collection-level RLS in the dashboard, publishable-key writes are allowed with
Authorization: Bearer <user_jwt>, but only for the authenticated owner.The
userscollection is a special case and should be accessed via/api/userAuth/*, not/api/data/users*.
fetch('https://api.ub.bitbros.in/api/data/products', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_SECRET_KEY' // Use secret key for write operations
},
body: JSON.stringify({
name: "Cyber Node Logo",
category: "Graphics",
premium: true
})
})
.then(res => res.json())
.then(data => console.log("Product saved:", data));While urBackend is flexible, we recommend defining Schemas in the dashboard. This ensures data integrity and enables features like:
- Type Checking: (e.g., ensuring
priceis always a Number). - Required Fields: Preventing incomplete documents from being saved.
- Complex Types: Using Objects, Arrays, and References properly.
Store your keys in an .env file for safety:
VITE_URBACKEND_KEY=pk_live_xxxxxx
URBACKEND_SECRET=sk_live_yyyyyyNow you're ready to dive into Authentication or Database Management!