-
Notifications
You must be signed in to change notification settings - Fork 68
docs: add DEPLOYMENT.md guide #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Deployment Guide | ||
|
|
||
| This guide will help you self-host your own instance of **urBackend** by deploying the backend and frontend to popular cloud platforms. | ||
|
|
||
| ## 1. Deploying the Backend | ||
| You can deploy the `backend/` directory to platforms like **Render** or **Railway.app**. | ||
|
|
||
| ### Prerequisites | ||
| - **MongoDB Atlas**: Create a free cluster and obtain your `MONGO_URI`. | ||
| - **Redis**: Use a service like [Upstash](https://upstash.com/) for a managed Redis instance. | ||
|
|
||
| ### Steps | ||
| 1. Connect your GitHub repository to Render/Railway. | ||
| 2. Set the root directory to `backend/`. | ||
| 3. Add the following **Environment Variables** in the platform's dashboard: | ||
| ```bash | ||
| PORT=3000 | ||
| MONGO_URI=your_mongodb_connection_string | ||
| REDIS_URL=your_redis_connection_url | ||
| JWT_SECRET=your_secure_random_string | ||
| # Add other variables from .env.example | ||
| ``` | ||
| 4. Set the Start Command to: `npm start` (or `node index.js`). | ||
| 5. Deploy and save the resulting URL (e.g., `https://your-backend.onrender.com`). | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Deploying the Frontend | ||
| The `frontend/` directory is a Vite/React application, ideal for **Vercel** or **Render**. | ||
|
|
||
| ### Steps | ||
| 1. Import your repository into Vercel. | ||
| 2. Set the Root Directory to `frontend/`. | ||
|
Comment on lines
+29
to
+33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align the frontend platform wording with the actual steps. This section says the frontend is suited for Vercel or Render, but the numbered instructions only cover Vercel. Either add the Render flow here or narrow the wording so users are not sent looking for steps that do not exist. 🤖 Prompt for AI Agents |
||
| 3. Set the Build Command to: `npm run build`. | ||
| 4. Set the Output Directory to: `dist`. | ||
| 5. **Required Environment Variables**: | ||
| - `VITE_API_BASE_URL`: Set this to the backend URL you generated in the previous step (e.g., `https://your-backend.onrender.com`). | ||
| 6. Deploy the project. | ||
|
|
||
| --- | ||
|
|
||
| ## 💡 Tips | ||
| - Always keep your `.env` variables secure. | ||
| - For production, ensure you set up CORS settings in your backend to allow requests only from your deployed frontend domain. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
| <a href="https://urbackend.bitbros.in"><strong>Dashboard</strong></a> · | ||
| <a href="docs/introduction.md"><strong>Docs</strong></a> · | ||
| <a href="docs/getting-started.md"><strong>Quick Start</strong></a> · | ||
| <a href="DEPLOYMENT.md"><strong>Self-Hosting</strong></a> · | ||
| <a href="https://discord.gg/CXJjvJkNWn"><strong>Discord</strong></a> | ||
| </p> | ||
|
|
||
|
|
@@ -48,47 +49,4 @@ Go from zero to a live backend in **under 60 seconds**. | |
|
|
||
| 1. **Initialize**: Create a project on the [Dashboard](https://urbackend.bitbros.in). | ||
| 2. **Model**: Visually define your collections and schemas. | ||
| 3. **Execute**: Push and pull data immediately using your Instant API Key. | ||
|
|
||
| ```javascript | ||
| // Power your UI with zero backend boilerplate | ||
| const res = await fetch('https://api.urbackend.bitbros.in/api/data/products', { | ||
| headers: { 'x-api-key': 'your_pk_live_key' } | ||
| }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🏗️ How it Works (The Visual Flow) | ||
|
|
||
| ```mermaid | ||
| graph LR | ||
| A[1. Connect MongoDB] --> B[2. Define Collections] | ||
| B --> C[3. 🚀 Instant REST APIs] | ||
| C --> D[4. Scale & Monitor] | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🏗️ Architecture | ||
|
|
||
| Explore our [Architecture Diagram](ARCHITECTURE_DIAGRAM.md) to understand the system design, core components, and data flow in detail. | ||
|
|
||
| --- | ||
| ## 🤝 Community | ||
|
|
||
| Join hundreds of developers building faster without the backend headaches. | ||
|
|
||
| - [GitHub Issues](https://github.com/yash-pouranik/urbackend/issues): Report bugs & request features. | ||
| - [Discord Channel](https://discord.gg/CXJjvJkNWn): Join the conversation. | ||
| - [Contributing](CONTRIBUTING.md): Help us grow the ecosystem. | ||
|
|
||
| --- | ||
|
|
||
| ## Contributors | ||
|
|
||
| <a href="https://github.com/yash-pouranik/urbackend/graphs/contributors"> | ||
| <img src="https://contrib.rocks/image?repo=yash-pouranik/urbackend" /> | ||
| </a> | ||
|
|
||
| Built with ❤️ by the **urBackend** community. | ||
| 3. **Execute**: Push and pull data immediately using your | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restore the truncated README content. Line 52 now ends mid-sentence, so the README renders as incomplete and drops the rest of the landing-page documentation. If the later sections were intentionally moved, please at least finish this step and add an explicit pointer to 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: yash-pouranik/urBackend
Length of output: 591
Update the documented start command: the backend entry point is
app.js, notindex.js.The deployment guide recommends
node index.jsas an alternative start command, butbackend/package.jsondefines the start script asnode app.js. Replace the suggested command to usenpm startonly, or if specifying the file directly, usenode app.jsinstead ofnode index.js. Thenpm startapproach is preferred and will work correctly.🤖 Prompt for AI Agents