DEV Community

Daniel Ioni
Daniel Ioni

Posted on

πŸ€– Technical Guide for AI – Full Project Recovery (MyZubster)

πŸ€– Technical Guide for AI – Full Project Recovery (MyZubster)

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

The AI must use this guide as an internal search engine and persistent memory 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 (Data Structure)
MongoDB Models (Backend)
javascript

// models/User.js
{
username: String,
email: String,
password: String (bcrypt),
reputationScore: Number,
completedTrades: Number,
rating: Number,
role: ['user', 'admin', 'issuer']
}

// models/Token.js
{
name: String,
symbol: String (unique),
totalSupply: Number,
assetValue: Number,
tokenPrice: Number,
assetType: ['realestate', 'equity', 'art', 'commodity', 'debt', 'revenue'],
issuer: ObjectId(User),
status: ['draft', 'active', 'closed']
}

// models/TokenHolding.js
{
user: ObjectId(User),
token: ObjectId(Token),
amount: Number,
lockedAmount: Number
}

// models/OrderBook.js
{
token: ObjectId(Token),
seller: ObjectId(User),
amount: Number,
price: Number,
totalPrice: Number,
status: ['open', 'filled', 'cancelled', 'expired'],
moneroTxid: String
}

// models/MoneroTransaction.js
{
orderId: ObjectId(OrderBook),
buyerId: ObjectId(User),
subaddress: String,
amount: Number,
amountPaid: Number,
moneroTxid: String,
status: ['pending', 'confirmed', 'expired', 'failed'],
confirmations: Number
}

// models/Escrow.js
{
orderId: ObjectId(OrderBook),
buyerId: ObjectId(User),
sellerId: ObjectId(User),
amount: Number,
currency: ['XMR', 'token'],
status: ['pending', 'held', 'released', 'disputed', 'refunded', 'escalated'],
aiDecision: Object,
expiresAt: Date
}

// models/NFT.js (Tari)
{
tokenId: String,
name: String,
description: String,
imageUrl: String,
owner: ObjectId(User),
value: Number,
metadata: Object,
transferHistory: Array
}

βš™οΈ 2. Core Services
2.1 – Monero Service (moneroService.js)
javascript

const MONERO_RPC_URL = 'http://localhost:18083/json_rpc';

async function createPayment(orderId, buyerId, amount) {
const subaddress = await createSubaddress(0, Order ${orderId});
const transaction = new MoneroTransaction({
orderId, buyerId, subaddress, amount, status: 'pending'
});
await transaction.save();
return { transactionId: transaction._id, address: subaddress };
}

async function checkPayment(transactionId) {
const transfers = await rpcRequest('get_transfers', { in: true });
// Find matching transaction
}

2.2 – Escrow Service (disputeService.js)
javascript

async function resolveDisputeWithAI(escrowId) {
const escrow = await Escrow.findById(escrowId)
.populate('buyerId', 'username reputationScore')
.populate('sellerId', 'username reputationScore');

const prompt = You are a mediator...;
const decision = await deepseekService.askDeepSeek(prompt);
// Apply decision
}

2.3 – Tari Service (tariService.js)
javascript

const TARI_WALLET_RPC = 'http://localhost:12820/json_rpc';

async function mintNFT(name, description, owner, metadata) {
return tariWalletRequest('mint_nft', { name, description, owner, metadata });
}

async function createEscrow(amount, buyer, seller, arbiter) {
return tariWalletRequest('create_multisig_escrow', {
amount, buyer, seller, arbiter, timeout: 604800
});
}

🌐 3. API Endpoints Summary
Method Endpoint Description
POST /api/auth/register Register user
POST /api/auth/login Login (JWT)
POST /api/tokens Create token
GET /api/tokens/holdings User holdings
POST /api/marketplace/sell Create sell order
POST /api/marketplace/buy/:id Buy order
GET /api/marketplace/orders/:tokenId List orders
POST /api/payments Create Monero payment
GET /api/payments/:id Payment status
POST /api/escrow Create escrow
POST /api/escrow/:id/dispute Open dispute
POST /api/tari/nft/mint Mint NFT on Tari
POST /api/tari/escrow Create Tari escrow
POST /api/ai/ask Query DeepSeek AI
GET /api/health Health check
πŸ–₯️ 4. System Commands (Reference)
4.1 – Gateway
bash

systemctl status myzubster-gateway
systemctl restart myzubster-gateway
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
tail -20 /var/log/nginx/error.log

4.4 – Monero
bash

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

Test RPC

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

4.5 – Tari
bash

Node

nohup ~/tari/target/release/minotari_node --network testnet --base-path ~/tari-data > ~/tari_node.log 2>&1 &

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"}'

4.6 – Security Bot (Kali Linux)
python

/root/security_bot.py

def scan_gateway():
return subprocess.run(['nmap', '-p', '3000,80,443', 'localhost'], capture_output=True, text=True).stdout

def ask_deepseek(prompt):
resp = requests.post(f"{MYZUBSTER_API}/ai/ask", json={"prompt": prompt}, headers={'Authorization': f'Bearer {TOKEN}'})
return resp.json().get('response')

πŸ”§ 5. Troubleshooting (Quick Diagnostics)
5.1 – Gateway not responding
bash

curl http://localhost:3000/api/health
journalctl -u myzubster-gateway -n 30 --no-pager
cd ~/MyZubsterGateway && node server.js

5.2 – Frontend not loading
bash

ls -la /var/www/myzubster-frontend/
curl -I https://myzubster.com
tail -20 /var/log/nginx/error.log

5.3 – Monero RPC not responding
bash

ps aux | grep monero-wallet-rpc
curl -X POST http://localhost:18083/json_rpc -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":"0","method":"get_balance"}'

5.4 – Tari not responding
bash

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

5.5 – Ports in use
bash

netstat -tlnp | grep -E ":80|:443|:3000|:18083|:12820"
lsof -i :80

πŸ“Š 6. 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 (or journalctl -u monerod)
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
🧩 7. 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

πŸ” 8. Environment Variables (.env)
env

PORT=3000
MONGODB_URI=mongodb://localhost:27017/myzubster
JWT_SECRET=supersecretkey
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

πŸš€ 9. Roadmap (Next Steps)
Priority Task Status
High Test marketplace from browser πŸ”΄ To do
High Test Monero payment (end‑to‑end) πŸ”΄ To do
High Verify security bot (cron job) πŸ”΄ To do
Medium Migrate Tor onion service to new VPS 🟑 In progress
Medium Integrate NFTs into marketplace 🟑 To do
Low Admin Dashboard 🟒 Future
πŸ’¬ 10. AI Response Format

When responding using this guide, the AI 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:3000/api/health

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

This guide is a living document. The AI should update it with new findings, commands, and configurations as the project evolves.

Top comments (17)

Collapse
 
topstar_ai profile image
Luis Cruz

The use of MongoDB models, such as the Token and TokenHolding models, provides a clear structure for managing token-related data, and the inclusion of fields like reputationScore in the User model suggests a robust system for evaluating user trustworthiness. I appreciate the implementation of the createPayment function in the Monero Service, which creates a new subaddress for each order and saves the transaction details. However, I'd like to discuss the potential benefits of adding additional error handling mechanisms to the checkPayment function to account for scenarios where the transaction is not found or the RPC request fails. What considerations were taken into account when designing the dispute resolution mechanism in the Escrow Service, particularly with regards to the use of AI-driven decision making?

Collapse
 
danielioni profile image
Daniel Ioni

Luis Cruz ha commentato πŸ€– Guida tecnica per l’IA – Full Project Recovery (MyZubster)

circa 7 ore fa

L'uso di modelli MongoDB, come il Tokene TokenHoldingmodelli, fornisce una struttura chiara per la gestione dei dati relativi ai token, e l'inclusione di campi come reputationScorenel Usermodello suggerisce un sistema robusto per valutare l'affidabilitΓ  degli utenti. Apprezzo l'attuazione della createPaymentfunzione nel Servizio Monero, che crea un nuovo subindirizzo per ogni ordine e salva i dettagli della transazione. Tuttavia, vorrei discutere i potenziali vantaggi dell'aggiunta di ulteriori meccanismi di gestione degli errori al checkPaymentfunzione per tenere conto degli scenari in cui la transazione non viene trovata o la richiesta RPC non riesce. Quali considerazioni sono state prese in considerazione nella progettazione del meccanismo di risoluzione delle controversie nel servizio di deposito a garanzia, in particolare per quanto riguarda l'uso del processo decisionale guidato dall'IA?

Collapse
 
topstar_ai profile image
Comment deleted
Thread Thread
 
danielioni profile image
Daniel Ioni

Dear team,

Thank you for your thoughtful message and for recognizing the deeper vision behind MyZubster. Your perspective on treating AI-assisted project recovery as an engineering discipline resonates deeply with what we're building.

You're absolutely right: the future isn't just about generating code faster β€” it's about building reliable workflows where humans and AI agents collaborate effectively. In MyZubster, we're putting this into practice with:

🧠 AI Agents – DeepSeek for security analysis and dispute resolution

πŸ“– Living Documentation – AI-readable guides that evolve with the project

πŸ”„ Reproducible Workflows – Scans, analyses, and recovery paths as part of the system

πŸ§ͺ Testing & Validation – Human review on every critical AI decision
Enter fullscreen mode Exit fullscreen mode

I'd love to explore how we can collaborate, whether on:

πŸ”¬ AI Architecture – local models, multi-agent systems

πŸ“Š Scalable Systems – from MVP to production

🌐 Open Source Ecosystems – building together, sharing knowledge

πŸ” AI Security – threat detection, compliance, and privacy
Enter fullscreen mode Exit fullscreen mode

I've already accepted your invitation and look forward to connecting. In the meantime, feel free to reach out on DEV.to, GitHub, or X.

Let's build the future together β€” one intelligent system at a time.

With respect and excitement,

Daniel Ioni
Lead Architect, MyZubster
πŸ”— I miei link

DEV.to: @danielioni

GitHub: DanielIoni-creator

X (Twitter): @myzubster

Live Demo: https://myzubster.com
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
topstar_ai profile image
Luis Cruz

Please confirm email and my profile and portfolio site.

Thread Thread
 
danielioni profile image
Daniel Ioni

non ce l'ho daniel ioni

Thread Thread
 
topstar_ai profile image
Comment deleted
Thread Thread
 
danielioni profile image
Daniel Ioni

io non do i miei dati a chiunque è perchè ho l'email su github non fare come me cambiala subito prima che sistemo metasploit XXXX

Thread Thread
 
topstar_ai profile image
Luis Cruz

Sono un po’ confuso riguardo ai problemi che hai.
Ti ho giΓ  condiviso la mia email e il mio contatto per la chat, quindi sentiti libero di contattarmi.
Anch’io vorrei entrare in contatto e collaborare con te.

Thread Thread
 
danielioni profile image
Daniel Ioni • Edited

scusami , ultimamente fatico a riconoscere se cè intelligenza artificiale, cmq lieto di conoscerti sono contento che apprezzi le mie guide se vuoi ti manda il anche il numero whats 3756806600 scrivimi pure se vuoi friend

Thread Thread
 
topstar_ai profile image
Luis Cruz

Thanks and +1 (361) 332-6512

Thread Thread
 
danielioni profile image
Daniel Ioni

quello era il mio vero numero perchè mi rispondi a codice? :)

Thread Thread
 
topstar_ai profile image
Luis Cruz

Non riesco a trovarti, per favore mandami un messaggio su WhatsApp.

Thread Thread
 
danielioni profile image
Daniel Ioni

hai monero?

Thread Thread
 
topstar_ai profile image
Luis Cruz

Ciao, Daniel Ioni.

Non ho un account Monero.
Ma se utilizzi solo quello, posso crearne uno.

Per favore, condividimi i tuoi account di comunicazione disponibili (chat live o altri strumenti) e la tua email.

Mentre me li condividi, proverΓ² a creare un account Monero.

A presto.

Thread Thread
 
danielioni profile image
Daniel Ioni

ho un profilo twitter e github tiktok puoi vedere cosa faccio nella vita reale

Thread Thread
 
topstar_ai profile image
Luis Cruz

Grazie per la condivisione.
Ho giΓ  dato un’occhiata e mi farebbe piacere poterci sentire e collaborare tramite una chat live.

Naturalmente, senza alcuna pressione: quando vuoi, fammi sapere cosa ne pensi.

A presto.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.