DEV Community

Daniel Ioni
Daniel Ioni

Posted on

🧭 MyZubster Developer Guide – How to Resume Work

🧭 MyZubster Developer Guide – How to Resume Work

Purpose: This guide allows you (or any developer) to fully restore the MyZubster development/production environment starting from a fresh VPS or after a long break. It is part of the DEV.to series (30+ guides) and is meant to be self-contained, actionable, and clone‑friendly.
Enter fullscreen mode Exit fullscreen mode

πŸ“¦ 1. Repository Structure (GitHub)

The project is a monorepo with submodules:
text

MyZubster/ ← main repo (contains submodules)
β”œβ”€β”€ backend-api/ ← MyZubsterAPP (API Gateway, Node.js)
β”œβ”€β”€ marketplace/ ← MyZubster-Marketplace (service listings)
β”œβ”€β”€ frontend-web/ ← MyZubsterWeb (React + Vite)
β”œβ”€β”€ mobile-app/ ← MyZubster-App (React Native / Expo)
β”œβ”€β”€ assets/ ← myzubster-assets (images, screenshots)
└── docs/ ← myzubster-docs (documentation)

Repo URL Role
MyZubster github.com/DanielIoni-creator/MyZubster Main (submodules)
MyZubsterAPP github.com/DanielIoni-creator/MyZubsterAPP Backend API
MyZubster-Marketplace github.com/DanielIoni-creator/MyZubster-Marketplace Marketplace service
MyZubsterWeb github.com/DanielIoni-creator/MyZubsterWeb Frontend (React/Vite)
MyZubster-App github.com/DanielIoni-creator/MyZubster-App Mobile app (React Native)
myzubster-assets github.com/DanielIoni-creator/myzubster-assets Static assets
πŸ–₯️ 2. Production Server Setup (VPS)

OS: Ubuntu 24.04 (Noble)
Domain: myzubster.com (proxied via Cloudflare Tunnel)
Onion Service: http://myzubster.onion (Tor hidden service - optional)
2.1 Services managed by PM2
PM2 Name Directory Command Port
myzubster-backend /opt/MyZubster/backend-api node server.js 5000
myzubster-marketplace /opt/MyZubster/marketplace node server.js 5001 (adjust if needed)
myzubster-frontend /opt/MyZubster/frontend-web npm run dev -- --host 5173
2.2 System Services
Service Role
nginx Reverse proxy for frontend (5173) and API (5000)
mongod MongoDB (port 27017) – main database
cloudflared Cloudflare Tunnel to myzubster.com
tor (optional) Onion service for myzubster.onion
2.3 Nginx Configuration

File: /etc/nginx/sites-available/myzubster
nginx

server {
listen 80;
server_name myzubster.com www.myzubster.com;

location / {
    proxy_pass http://localhost:5173;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

location /api {
    proxy_pass http://localhost:5000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}
Enter fullscreen mode Exit fullscreen mode

}

2.4 Cloudflare Tunnel

Tunnel name: myzubster-tunnel

Service: cloudflared (systemd)

DNS records: CNAME myzubster.com and www.myzubster.com point to the tunnel.
Enter fullscreen mode Exit fullscreen mode

πŸ—‚οΈ 3. Folder Structure on the Server

All active code lives under /opt/MyZubster/.
text

/opt/
β”œβ”€β”€ MyZubster/ # main repo (submodules)
β”‚ β”œβ”€β”€ backend-api/ # API Gateway
β”‚ β”œβ”€β”€ marketplace/ # Marketplace service
β”‚ β”œβ”€β”€ frontend-web/ # React/Vite frontend
β”‚ β”œβ”€β”€ mobile-app/ # React Native app
β”‚ β”œβ”€β”€ assets/ # Images and static files
β”‚ └── docs/ # Documentation
β”œβ”€β”€ myzubster/ # (legacy – no longer used)
β”œβ”€β”€ myzubster-app/ # (legacy)
β”œβ”€β”€ myzubster-assets/ # (legacy)
└── myzubster-frontend/ # (legacy)

Important: All active development happens inside /opt/MyZubster/. You can safely delete the legacy folders.
Enter fullscreen mode Exit fullscreen mode

βš™οΈ 4. Critical Configuration Files
4.1 Backend API – .env

Path: /opt/MyZubster/backend-api/.env
text

PORT=5000
MONGODB_URI=mongodb://localhost:27017/myzubster

Add any other env vars (JWT secret, Monero RPC, etc.)

4.2 Frontend – .env (optional)

Path: /opt/MyZubster/frontend-web/.env
text

VITE_API_URL=/api

πŸ§ͺ 5. Essential Commands to Resume Work
πŸ”„ Clone the entire project from scratch
bash

git clone --recursive git@github.com:DanielIoni-creator/MyZubster.git /opt/MyZubster

πŸ”„ Update all submodules to latest
bash

cd /opt/MyZubster
git submodule update --remote --recursive

πŸ“¦ Install dependencies for each component
bash

cd /opt/MyZubster/backend-api && npm install
cd /opt/MyZubster/marketplace && npm install
cd /opt/MyZubster/frontend-web && npm install
cd /opt/MyZubster/mobile-app && npm install

▢️ Start all services with PM2
bash

cd /opt/MyZubster/backend-api
pm2 start server.js --name myzubster-backend

cd /opt/MyZubster/marketplace
pm2 start server.js --name myzubster-marketplace

cd /opt/MyZubster/frontend-web
pm2 start npm --name myzubster-frontend -- run dev -- --host

πŸ’Ύ Save PM2 configuration and enable startup
bash

pm2 save
pm2 startup

then run the command that appears (e.g., sudo env PATH=...)

πŸ”„ Reload Nginx
bash

sudo nginx -t && sudo systemctl reload nginx

πŸ”„ Restart Cloudflare Tunnel
bash

sudo systemctl restart cloudflared

πŸ“Š Check logs in real time
bash

pm2 logs # all processes
pm2 logs myzubster-backend # specific service
sudo tail -f /var/log/nginx/error.log
journalctl -u cloudflared -f

πŸ›‘οΈ 6. Backup & Security

MongoDB dump:
bash

mongodump --db myzubster --out /backup/mongodb/

Backup config files:
Save /etc/nginx/sites-available/myzubster and the whole /opt/MyZubster/ directory.

UFW firewall: active with ports 22, 80, 443, 4000 (for dev) open.
Enter fullscreen mode Exit fullscreen mode

🚨 7. Quick Recovery After a Crash / Reboot

If the server reboots, PM2 (if enabled) and system services should restart automatically. If not:

Check MongoDB: sudo systemctl status mongod

Check Tunnel: systemctl status cloudflared

Check PM2 processes: pm2 list

If any service is down, restart it with the commands in section 5.
Enter fullscreen mode Exit fullscreen mode

πŸ”„ 8. Development Workflow – Updating Submodules

Make changes inside a submodule (e.g., frontend-web).

Commit and push inside that submodule.

Return to the main repo, add the updated submodule, and push.
Enter fullscreen mode Exit fullscreen mode

bash

cd /opt/MyZubster/frontend-web
git add .
git commit -m "fix: new component"
git push origin main

cd /opt/MyZubster
git add frontend-web
git commit -m "update frontend-web to commit XYZ"
git push origin main

βœ… 9. Health Check

Frontend: https://myzubster.com β†’ should show the React app.

Backend: https://myzubster.com/api/health β†’ returns {"status":"OK"}.

PM2: pm2 list β†’ all processes should be online.
Enter fullscreen mode Exit fullscreen mode

🌐 10. Live Sites
Service URL
Main Website https://myzubster.com
Onion Service (Tor) http://myzubster.onion
🀝 11. Connect with the Team

Follow the development of MyZubster and connect with us on social media:

πŸ“– Blog & Articles: DEV.to - Daniel Ioni

🐦 X (Twitter): @myzubster

πŸ’Ό LinkedIn: Daniel Ioni

πŸ™ GitHub: DanielIoni-creator

🎡 TikTok: @h4x0r_23
Enter fullscreen mode Exit fullscreen mode

Stay updated on the journey! πŸš€

Built with ❀️ for the Monero and Tari community.

Happy coding! πŸš€
β€” The MyZubster Team
markdown

MyZubster Developer Guide – How to Resume Work

Purpose: This guide allows you (or any developer) to fully restore the MyZubster development/production environment starting from a fresh VPS or after a long break. It is part of the DEV.to series (30+ guides) and is meant to be self-contained, actionable, and clone‑friendly.

πŸ“¦ 1. Repository Structure (GitHub)

The project is a monorepo with submodules:

MyZubster/ ← main repo (contains submodules)
β”œβ”€β”€ backend-api/ ← MyZubsterAPP (API Gateway, Node.js)
β”œβ”€β”€ marketplace/ ← MyZubster-Marketplace (service listings)
β”œβ”€β”€ frontend-web/ ← MyZubsterWeb (React + Vite)
β”œβ”€β”€ mobile-app/ ← MyZubster-App (React Native / Expo)
β”œβ”€β”€ assets/ ← myzubster-assets (images, screenshots)
└── docs/ ← myzubster-docs (documentation)
text

Repo URL Role
MyZubster github.com/DanielIoni-creator/MyZubster Main (submodules)
MyZubsterAPP github.com/DanielIoni-creator/MyZubsterAPP Backend API
MyZubster-Marketplace github.com/DanielIoni-creator/MyZubster-Marketplace Marketplace service
MyZubsterWeb github.com/DanielIoni-creator/MyZubsterWeb Frontend (React/Vite)
MyZubster-App github.com/DanielIoni-creator/MyZubster-App Mobile app (React Native)
myzubster-assets github.com/DanielIoni-creator/myzubster-assets Static assets

πŸ–₯️ 2. Production Server Setup (VPS)

OS: Ubuntu 24.04 (Noble)

Domain: myzubster.com (proxied via Cloudflare Tunnel)

Onion Service: http://myzubster.onion (Tor hidden service - optional)

2.1 Services managed by PM2

PM2 Name Directory Command Port
myzubster-backend /opt/MyZubster/backend-api node server.js 5000
myzubster-marketplace /opt/MyZubster/marketplace node server.js 5001 (adjust if needed)
myzubster-frontend /opt/MyZubster/frontend-web npm run dev -- --host 5173

2.2 System Services

Service Role
nginx Reverse proxy for frontend (5173) and API (5000)
mongod MongoDB (port 27017) – main database
cloudflared Cloudflare Tunnel to myzubster.com
tor (optional) Onion service for myzubster.onion

2.3 Nginx Configuration

File: /etc/nginx/sites-available/myzubster


nginx
server {
    listen 80;
    server_name myzubster.com www.myzubster.com;

    location / {
        proxy_pass http://localhost:5173;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /api {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

2.4 Cloudflare Tunnel

    Tunnel name: myzubster-tunnel

    Service: cloudflared (systemd)

    DNS records: CNAME myzubster.com and www.myzubster.com point to the tunnel.

πŸ—‚οΈ 3. Folder Structure on the Server

All active code lives under /opt/MyZubster/.
text

/opt/
β”œβ”€β”€ MyZubster/                    # main repo (submodules)
β”‚   β”œβ”€β”€ backend-api/              # API Gateway
β”‚   β”œβ”€β”€ marketplace/              # Marketplace service
β”‚   β”œβ”€β”€ frontend-web/             # React/Vite frontend
β”‚   β”œβ”€β”€ mobile-app/               # React Native app
β”‚   β”œβ”€β”€ assets/                   # Images and static files
β”‚   └── docs/                     # Documentation
β”œβ”€β”€ myzubster/                    # (legacy – no longer used)
β”œβ”€β”€ myzubster-app/                # (legacy)
β”œβ”€β”€ myzubster-assets/             # (legacy)
└── myzubster-frontend/           # (legacy)

    Important: All active development happens inside /opt/MyZubster/. You can safely delete the legacy folders.

βš™οΈ 4. Critical Configuration Files
4.1 Backend API – .env

Path: /opt/MyZubster/backend-api/.env
text

PORT=5000
MONGODB_URI=mongodb://localhost:27017/myzubster
# Add any other env vars (JWT secret, Monero RPC, etc.)

4.2 Frontend – .env (optional)

Path: /opt/MyZubster/frontend-web/.env
text

VITE_API_URL=/api

πŸ§ͺ 5. Essential Commands to Resume Work
πŸ”„ Clone the entire project from scratch
bash

git clone --recursive git@github.com:DanielIoni-creator/MyZubster.git /opt/MyZubster

πŸ”„ Update all submodules to latest
bash

cd /opt/MyZubster
git submodule update --remote --recursive

πŸ“¦ Install dependencies for each component
bash

cd /opt/MyZubster/backend-api && npm install
cd /opt/MyZubster/marketplace && npm install
cd /opt/MyZubster/frontend-web && npm install
cd /opt/MyZubster/mobile-app && npm install

▢️ Start all services with PM2
bash

cd /opt/MyZubster/backend-api
pm2 start server.js --name myzubster-backend

cd /opt/MyZubster/marketplace
pm2 start server.js --name myzubster-marketplace

cd /opt/MyZubster/frontend-web
pm2 start npm --name myzubster-frontend -- run dev -- --host

πŸ’Ύ Save PM2 configuration and enable startup
bash

pm2 save
pm2 startup
# then run the command that appears (e.g., `sudo env PATH=...`)

πŸ”„ Reload Nginx
bash

sudo nginx -t && sudo systemctl reload nginx

πŸ”„ Restart Cloudflare Tunnel
bash

sudo systemctl restart cloudflared

πŸ“Š Check logs in real time
bash

pm2 logs                     # all processes
pm2 logs myzubster-backend   # specific service
sudo tail -f /var/log/nginx/error.log
journalctl -u cloudflared -f

πŸ›‘οΈ 6. Backup & Security

    MongoDB dump:
    bash

    mongodump --db myzubster --out /backup/mongodb/

    Backup config files:
    Save /etc/nginx/sites-available/myzubster and the whole /opt/MyZubster/ directory.

    UFW firewall: active with ports 22, 80, 443, 4000 (for dev) open.

🚨 7. Quick Recovery After a Crash / Reboot

If the server reboots, PM2 (if enabled) and system services should restart automatically. If not:

    Check MongoDB: sudo systemctl status mongod

    Check Tunnel: systemctl status cloudflared

    Check PM2 processes: pm2 list

    If any service is down, restart it with the commands in section 5.

πŸ”„ 8. Development Workflow – Updating Submodules

    Make changes inside a submodule (e.g., frontend-web).

    Commit and push inside that submodule.

    Return to the main repo, add the updated submodule, and push.

bash

cd /opt/MyZubster/frontend-web
git add .
git commit -m "fix: new component"
git push origin main

cd /opt/MyZubster
git add frontend-web
git commit -m "update frontend-web to commit XYZ"
git push origin main

βœ… 9. Health Check

    Frontend: https://myzubster.com β†’ should show the React app.

    Backend: https://myzubster.com/api/health β†’ returns {"status":"OK"}.

    PM2: pm2 list β†’ all processes should be online.

🌐 10. Live Sites
Service URL
Main Website    https://myzubster.com
Onion Service (Tor) http://myzubster.onion
🀝 11. Connect with the Team

Follow the development of MyZubster and connect with us on social media:

    πŸ“– Blog & Articles: DEV.to - Daniel Ioni

    🐦 X (Twitter): @myzubster

    πŸ’Ό LinkedIn: Daniel Ioni

    πŸ™ GitHub: DanielIoni-creator

    🎡 TikTok: @h4x0r_23

http://olqcnbdlt35k2stmmwvzhvuetu2fc4us2jnn5wg6y6wlcddihfmdomid.onion/

myzubster.com

Stay updated on the journey! πŸš€

Built with ❀️ for the Monero and Tari community.

Happy coding! πŸš€
β€” The MyZubster Team
text


---

La guida Γ¨ ora completa, pronta per essere pubblicata su DEV.to, con tutti i tuoi link social e i siti live. πŸš€

Questa risposta Γ¨ generate da IA. Controllarne l'accuratezza.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)