DEV Community

Daniel Ioni
Daniel Ioni

Posted on

πŸ€– AI Technical Guide – MyZubster Project Recovery



 πŸ€– AI Technical Guide – MyZubster Project Recovery

This guide is designed exclusively for an AI system to read, understand, and resume the MyZubster project from any point, and provide accurate technical assistance.
πŸ“Œ Purpose of This Guide

This guide serves as an internal search engine and persistent memory for an AI to:

Understand the complete system architecture.

Resume work from where it was interrupted.

Provide precise technical answers with commands and code.

Suggest next steps based on the current state.
Enter fullscreen mode Exit fullscreen mode

πŸ—οΈ 1. System Overview
Project Name

MyZubster Gateway – A decentralized marketplace for tokenizing real‑world assets.
Core Features

βœ… Tokenization – fungible tokens with full metadata

βœ… Monero Payments – private, untraceable transactions

βœ… Kali Linux + DeepSeek AI – self‑defending security bot

βœ… Tari + NFTs – programmable assets on Monero's sidechain

βœ… Escrow & AI Dispute Resolution – trustless mediation

βœ… Tor Onion Service – censorship‑resistant access
Enter fullscreen mode Exit fullscreen mode

Tech Stack
Layer Technology
Backend Node.js + Express
Database MongoDB + Mongoose
Authentication JWT + bcrypt
Payments Monero (XMR) – stagenet
Security Kali Linux tools + DeepSeek AI (Ollama)
Programmable Assets Tari (Rust node & wallet)
Frontend React + Vite
Reverse Proxy Nginx
SSL Let's Encrypt
Privacy Tor (onion service)
Deployment Ubuntu 24.04 + Systemd
πŸ“‚ 2. Directory Structure
text

/root/
β”œβ”€β”€ MyZubsterGateway/ # Backend (Node.js)
β”‚ β”œβ”€β”€ models/ # MongoDB models
β”‚ β”‚ β”œβ”€β”€ User.js
β”‚ β”‚ β”œβ”€β”€ Token.js
β”‚ β”‚ β”œβ”€β”€ TokenHolding.js
β”‚ β”‚ β”œβ”€β”€ OrderBook.js
β”‚ β”‚ β”œβ”€β”€ MoneroTransaction.js
β”‚ β”‚ β”œβ”€β”€ Escrow.js
β”‚ β”‚ └── NFT.js (if present)
β”‚ β”œβ”€β”€ routes/ # API routes
β”‚ β”‚ β”œβ”€β”€ auth.js
β”‚ β”‚ β”œβ”€β”€ tokens.js
β”‚ β”‚ β”œβ”€β”€ marketplace.js
β”‚ β”‚ β”œβ”€β”€ payments.js
β”‚ β”‚ β”œβ”€β”€ escrow.js
β”‚ β”‚ β”œβ”€β”€ tari.js
β”‚ β”‚ └── ai.js
β”‚ β”œβ”€β”€ services/ # Business logic
β”‚ β”‚ β”œβ”€β”€ moneroService.js
β”‚ β”‚ β”œβ”€β”€ tokenService.js
β”‚ β”‚ β”œβ”€β”€ marketplaceService.js
β”‚ β”‚ β”œβ”€β”€ deepseekService.js
β”‚ β”‚ β”œβ”€β”€ disputeService.js
β”‚ β”‚ β”œβ”€β”€ tariService.js
β”‚ β”‚ └── paymentMonitor.js
β”‚ β”œβ”€β”€ middleware/ # Middleware
β”‚ β”‚ └── auth.js
β”‚ β”œβ”€β”€ server.js # Entry point
β”‚ β”œβ”€β”€ .env # Environment variables
β”‚ └── package.json
β”‚
β”œβ”€β”€ myzubster-frontend/ # Frontend (React/Vite)
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ pages/
β”‚ β”‚ β”‚ β”œβ”€β”€ Login.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ Register.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ Dashboard.jsx
β”‚ β”‚ β”‚ └── Marketplace.jsx
β”‚ β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ contexts/
β”‚ β”‚ β”œβ”€β”€ utils/
β”‚ β”‚ └── App.jsx
β”‚ β”œβ”€β”€ dist/ # Build (served by Nginx)
β”‚ └── package.json
β”‚
β”œβ”€β”€ monero/ # Monero wallet
β”‚ └── myzubster_wallet
β”‚
β”œβ”€β”€ tari/ # Tari (compiled)
β”‚ └── target/release/
β”‚ β”œβ”€β”€ minotari_node
β”‚ └── minotari_console_wallet
β”‚
β”œβ”€β”€ security_bot.py # Kali Linux + AI bot
└── README.md

βš™οΈ 3. Environment Variables (.env)
env

PORT=3002
NODE_ENV=production
MONGODB_URI=mongodb://localhost:27017/myzubster
JWT_SECRET=fd2cb60aba88af3ffc3832c8354cd1c8d4e0a9bb47dcd0f105ecaaa11dc23831801e214087c5745ec8ba675c43b05f387222714b047253a4cc405e43ac395f92
JWT_EXPIRES_IN=7d
MONERO_WALLET_RPC_URL=http://localhost:18083/json_rpc
MONERO_DAEMON_RPC_URL=http://localhost:18081/json_rpc
MONERO_NETWORK=stagenet
TARI_RPC_URL=http://localhost:12810/json_rpc
TARI_WALLET_RPC=http://localhost:12820/json_rpc
TARI_NETWORK=testnet
FRONTEND_URL=https://myzubster.com
PAYMENT_MODE=real
LOG_LEVEL=info

πŸ–₯️ 4. Essential Commands
4.1 – Gateway Management (Port 3002)
bash

Start the gateway

cd ~/MyZubsterGateway
node server.js

Or with systemd

systemctl start myzubster-gateway
systemctl stop myzubster-gateway
systemctl restart myzubster-gateway
systemctl status myzubster-gateway

View logs

journalctl -u myzubster-gateway -n 50 --no-pager

4.2 – Frontend Build & Deploy
bash

cd ~/myzubster-frontend
npm run build
cp -r dist/* /var/www/myzubster-frontend/
chown -R www-data:www-data /var/www/myzubster-frontend
systemctl reload nginx

4.3 – Nginx
bash

nginx -t
systemctl reload nginx
systemctl restart nginx
tail -20 /var/log/nginx/error.log

4.4 – Monero Wallet RPC
bash

cd ~/monero
./monero-wallet-rpc \
--rpc-bind-port 18083 \
--daemon-address node.moneroworld.com:38081 \
--wallet-file ./myzubster_wallet \
--password 'Myzubster2026@!!' \
--disable-rpc-login \
--trusted-daemon \
--stagenet

Test RPC

curl -X POST http://localhost:18083/json_rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"0","method":"get_balance"}' | jq '.'

4.5 – Tari Node & Wallet
bash

Start Tari node

nohup ~/tari/target/release/minotari_node \
--network testnet \
--base-path ~/tari-data \

~/tari_node.log 2>&1 &

Start Tari wallet

nohup ~/tari/target/release/minotari_console_wallet \
--network testnet \
--password myzubster \
--wallet-file ~/tari-wallet \

~/tari_wallet.log 2>&1 &

Test RPC

curl -X POST http://localhost:12820/json_rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"0","method":"get_balance"}' | jq '.'

4.6 – Security Bot (Kali + DeepSeek)
bash

Run manually

python3 /root/security_bot.py

Check logs

tail -20 /var/log/security_bot.log

Cron job (runs every hour)

crontab -l | grep security_bot

🌐 5. API Endpoints
Method Endpoint Description Auth
POST /api/auth/register Register user No
POST /api/auth/login Login (JWT) No
GET /api/tokens List active tokens No
POST /api/tokens Create token Yes
GET /api/tokens/holdings User holdings Yes
POST /api/marketplace/sell Create sell order Yes
POST /api/marketplace/buy/:orderId Buy from order Yes
GET /api/marketplace/orders/:tokenId List open orders No
POST /api/payments Create Monero payment Yes
GET /api/payments/:id Payment status Yes
POST /api/escrow Create escrow Yes
POST /api/escrow/:id/dispute Open dispute Yes
POST /api/tari/nft/mint Mint NFT on Tari Yes
POST /api/ai/ask Query DeepSeek AI Yes
GET /api/health Health check No
πŸ”§ 6. Troubleshooting Common Issues
6.1 – Port Already in Use (EADDRINUSE)
bash

Find process using the port

lsof -i :3002

Kill the process

kill -9

Or kill all Node processes

pkill -f node

6.2 – Gateway Not Responding
bash

Check if gateway is running

ps aux | grep node
netstat -tlnp | grep 3002

Check logs

journalctl -u myzubster-gateway -n 30 --no-pager

6.3 – MongoDB Connection Failed
bash

Check MongoDB status

systemctl status mongod

Start MongoDB

systemctl start mongod

6.4 – Monero RPC Not Responding
bash

Check wallet RPC

ps aux | grep monero-wallet-rpc

Restart wallet RPC

cd ~/monero
./monero-wallet-rpc --rpc-bind-port 18083 --daemon-address node.moneroworld.com:38081 --wallet-file ./myzubster_wallet --password 'Myzubster2026@!!' --disable-rpc-login --trusted-daemon --stagenet

6.5 – Frontend Not Loading
bash

Rebuild and deploy

cd ~/myzubster-frontend
npm run build
cp -r dist/* /var/www/myzubster-frontend/
chown -R www-data:www-data /var/www/myzubster-frontend
systemctl reload nginx

πŸ“Š 7. Log Files Locations
Service Log File
Gateway journalctl -u myzubster-gateway
Nginx /var/log/nginx/error.log, /var/log/nginx/access.log
Monero Node ~/monero/monerod.log
Monero Wallet RPC ~/monero/monero-wallet-rpc.log
Tari Node ~/tari_node.log
Tari Wallet ~/tari_wallet.log
Security Bot /var/log/security_bot.log
MongoDB /var/log/mongodb/mongod.log
🧩 8. Frontend Structure (React/Vite)
text

src/
β”œβ”€β”€ pages/
β”‚ β”œβ”€β”€ Login.jsx
β”‚ β”œβ”€β”€ Register.jsx
β”‚ β”œβ”€β”€ Dashboard.jsx
β”‚ └── Marketplace.jsx
β”œβ”€β”€ components/
β”‚ └── ProtectedRoute.jsx
β”œβ”€β”€ contexts/
β”‚ └── AuthContext.jsx
β”œβ”€β”€ utils/
β”‚ └── axiosConfig.js
└── App.jsx

πŸš€ 9. Roadmap – Next Steps
Priority Task Status
High Test Monero payment (end‑to‑end) πŸ”΄ To do
High Verify security bot (cron) πŸ”΄ To do
High Migrate Tor onion to new VPS πŸ”΄ To do
Medium Integrate NFTs in marketplace 🟑 To do
Medium Admin dashboard 🟑 To do
Medium Monero mainnet migration 🟑 To do
Low CI/CD security integration 🟒 Later
Low Mobile app 🟒 Later
πŸ’¬ 10. AI Response Format

When the AI responds using this guide, it must:

Reference the section.

Provide the exact command/code.

Suggest the next logical step.

Ask the user for confirmation.
Enter fullscreen mode Exit fullscreen mode

Example AI response:
text

πŸ“Œ Section 4.1 – Gateway Management

πŸ’» Command: systemctl restart myzubster-gateway

πŸ”§ Next Step: After restart, run:
curl http://localhost:3002/api/health

πŸ€” Question: Would you like to proceed with testing the token creation?

πŸ”— 11. Important Links

Live Demo: https://myzubster.com

GitHub: DanielIoni-creator/MyZubsterGateway

X (Twitter): @myzubster

LinkedIn: Daniel Ioni

DEV.to: @danielioni
Enter fullscreen mode Exit fullscreen mode

This guide is a living document. The AI should update it with new findings, commands, and configurations as the project evolves.
Questa risposta Γ¨ generate da IA. Controllarne l'accuratezza.

Top comments (0)