Skip to content

Commit 8b73ce1

Browse files
author
Pangea 3
committed
fix: docs: add DEPLOYMENT.md and link in README (fixes #42)
1 parent 058c311 commit 8b73ce1

2 files changed

Lines changed: 39 additions & 44 deletions

File tree

DEPLOYMENT.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 🚀 Deployment Guide
2+
3+
This guide explains how to self-host and deploy **urBackend** using popular free-tier platforms like Render/Railway (Backend) and Vercel (Frontend).
4+
5+
## 1. Deploying the Backend (Node.js)
6+
7+
You can deploy the backend to platforms like [Render](https://render.com) or [Railway.app](https://railway.app).
8+
9+
### Prerequisites
10+
- A [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) cluster (Free tier available).
11+
- A [Redis](https://upstash.com/) instance (Upstash is recommended for a managed free-tier).
12+
13+
### Deployment Steps
14+
1. Connect your GitHub repository to Render/Railway.
15+
2. Set the **Build Command** to `npm install` and the **Start Command** to `npm start` (ensure it points to the `backend` directory).
16+
3. Add the following **Environment Variables**:
17+
```env
18+
MONGODB_URI=your_mongodb_connection_string
19+
REDIS_URL=your_redis_connection_string
20+
JWT_SECRET=your_super_secret_string
21+
# Add other variables from .env.example
22+
```
23+
24+
## 2. Deploying the Frontend (Vite/React)
25+
26+
The frontend is a static site that can be easily hosted on [Vercel](https://vercel.com) or Render.
27+
28+
### Deployment Steps
29+
1. Import the repository into Vercel.
30+
2. Set the **Root Directory** to `frontend`.
31+
3. Vercel should automatically detect the framework as Vite. The Build Command is `npm run build` and the Output Directory is `dist`.
32+
4. **Important**: Configure the API connection by adding the following Environment Variable in your dashboard:
33+
- `VITE_API_BASE_URL`: The URL of your deployed backend (e.g., `https://your-backend.onrender.com`)
34+
35+
## 💡 Tips
36+
- Ensure your MongoDB Atlas IP access list allows connections from everywhere (`0.0.0.0/0`) if using shared hosting.
37+
- Check your platform logs if the build fails; verify that all dependencies are installed via `npm install`.

README.md

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<a href="https://urbackend.bitbros.in"><strong>Dashboard</strong></a> ·
1414
<a href="docs/introduction.md"><strong>Docs</strong></a> ·
1515
<a href="docs/getting-started.md"><strong>Quick Start</strong></a> ·
16+
<a href="DEPLOYMENT.md"><strong>Self-Hosting</strong></a> ·
1617
<a href="https://discord.gg/CXJjvJkNWn"><strong>Discord</strong></a>
1718
</p>
1819

@@ -48,47 +49,4 @@ Go from zero to a live backend in **under 60 seconds**.
4849

4950
1. **Initialize**: Create a project on the [Dashboard](https://urbackend.bitbros.in).
5051
2. **Model**: Visually define your collections and schemas.
51-
3. **Execute**: Push and pull data immediately using your Instant API Key.
52-
53-
```javascript
54-
// Power your UI with zero backend boilerplate
55-
const res = await fetch('https://api.urbackend.bitbros.in/api/data/products', {
56-
headers: { 'x-api-key': 'your_pk_live_key' }
57-
});
58-
```
59-
60-
---
61-
62-
## 🏗️ How it Works (The Visual Flow)
63-
64-
```mermaid
65-
graph LR
66-
A[1. Connect MongoDB] --> B[2. Define Collections]
67-
B --> C[3. 🚀 Instant REST APIs]
68-
C --> D[4. Scale & Monitor]
69-
```
70-
71-
---
72-
73-
## 🏗️ Architecture
74-
75-
Explore our [Architecture Diagram](ARCHITECTURE_DIAGRAM.md) to understand the system design, core components, and data flow in detail.
76-
77-
---
78-
## 🤝 Community
79-
80-
Join hundreds of developers building faster without the backend headaches.
81-
82-
- [GitHub Issues](https://github.com/yash-pouranik/urbackend/issues): Report bugs & request features.
83-
- [Discord Channel](https://discord.gg/CXJjvJkNWn): Join the conversation.
84-
- [Contributing](CONTRIBUTING.md): Help us grow the ecosystem.
85-
86-
---
87-
88-
## Contributors
89-
90-
<a href="https://github.com/yash-pouranik/urbackend/graphs/contributors">
91-
<img src="https://contrib.rocks/image?repo=yash-pouranik/urbackend" />
92-
</a>
93-
94-
Built with ❤️ by the **urBackend** community.
52+
3. **Execute**: Push and pull data immediately using your

0 commit comments

Comments
 (0)