Daniel Ioniπ§ MyZubster Developer Guide β How to Resume Work Purpose: This guide allows you (or any developer)...
π§ 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:
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;
}
}
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
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
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
Stay updated on the journey! π
Built with β€οΈ for the Monero and Tari community.
Happy coding! π
β The MyZubster Team
markdown
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.
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 |
OS: Ubuntu 24.04 (Noble)
Domain: myzubster.com (proxied via Cloudflare Tunnel)
Onion Service: http://myzubster.onion (Tor hidden service - optional)
| 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 |
| 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
|
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.