// Yeison Cruz — real data

const STATS = [
  { value: '10+', label: 'years shipping' },
  { value: '6+',  label: 'teams led' },
  { value: '40+', label: 'clients delivered' },
  { value: '500+',label: 'scripts shipped' },
];

const STACK = [
  {
    label: 'backend',
    items: ['Rust', 'Go', 'TypeScript', 'Node.js', 'Python', 'Java', 'C / C++', 'C#', 'gRPC', 'Axum', 'Tokio / async', 'WebSockets'],
  },
  {
    label: 'frontend',
    items: ['TypeScript', 'Next.js', 'React', 'HTML', 'CSS3', 'Tailwind'],
  },
  {
    label: 'blockchain',
    items: ['Solidity', 'Yul', 'EVM', 'Solana', 'Anchor', 'gRPC', 'geth / reth (custom)', 'Foundry', 'V2 / V3 / V4'],
  },
  {
    label: 'low-level · hardware',
    items: ['ARM', 'MIPS', 'x86', 'Verilog', 'Arduino'],
  },
  {
    label: 'netsuite',
    items: ['SuiteScript 1.0 / 2.x', 'Suitelets', 'RESTlets', 'User Events', 'Client Scripts', 'Scheduled Scripts', 'Map/Reduce', 'Mass Update', 'Workflow Action', 'Portlets', 'SuiteQL', 'Saved Searches', 'SuiteTalk', 'SDF', 'SuiteFlow'],
  },
  {
    label: 'ai · agents',
    items: ['LLM training', 'fine-tuning', 'inference infra', 'agent pipelines', 'evals', 'Claude', 'Codex', 'Gemini', 'Qwen', 'Grok', 'Llama', 'DeepSeek', 'Mistral'],
  },
  {
    label: 'data · architecture',
    items: ['PostgreSQL', 'PostgREST', 'Redis', 'Elasticsearch', 'RabbitMQ', 'Kafka', 'Zookeeper', 'event_driven', 'microservices', 'monolithic', 'distributed systems'],
  },
  {
    label: 'cloud · devops',
    items: ['AWS', 'Azure', 'Docker', 'Kubernetes', 'CI/CD', 'Linux/Unix'],
  },
];

const EXPERIENCE = [
  {
    company: 'Code Solutions',
    role: 'System Architect',
    period: '2021 – Apr 2026',
    bullets: [
      'Launched a blockchain trading product — Rust/Go backend with 30+ services, replacing a 15-engineer team.',
      'Owned product + platform architecture: service boundaries, shared libs, APIs, dev tools, Docker orchestration.',
      'Designed a low-latency event-driven backbone (RabbitMQ, Redis, PostgreSQL, gRPC, WebSockets, Zookeeper).',
      'Built the entire Next.js frontend solo — sniping, copy trading, triggers, wallet ops, cross-chain swaps.',
      'Real-time Solana + EVM monitoring (Yellowstone gRPC, Laserstream, custom DEX parsers).',
      'Execution + relay infra: per-chain executors, bloXroute, bundle-tip streaming, gas-cache prewarming.',
      'Led 5 backend engineers — cut feature delivery time 50%.',
    ],
  },
  {
    company: 'Independent',
    role: 'MEV Searcher',
    period: '2019 – 2021',
    bullets: [
      'Built and operated MEV infra: arbitrage, sandwich, and salmonella-style adversarial patterns across EVM.',
      'BSC arbitrage bot ranked top-3 during peak activity as a solo dev.',
      'Mempool-aware searcher pipelines, low-latency tx construction, gas strategy, private/public submission.',
      'Custom geth + reth variants for faster propagation.',
      'Reverse-engineered other searchers\' contracts to learn execution patterns and stay competitive.',
    ],
  },
  {
    company: 'Midware',
    role: 'NetSuite Architect',
    period: '2017 – Apr 2026',
    bullets: [
      'Delivered NetSuite solutions for 40+ client accounts.',
      'Led 25 engineers across SuiteScript + integrations — set technical direction, mentored, ran CI/CD.',
      '500+ scripts across User Events, Client Scripts, Suitelets, RESTlets — TypeScript foundation.',
      'Custom NetSuite dev engine + cloud-backed file-management platform (AWS S3, approvals, versioning).',
      'Warehouse / fulfillment automations cut operational cost 96.5%.',
      'Migrated client data from Excel and QuickBooks via SuiteTalk.',
    ],
  },
  {
    company: 'OuterSense',
    role: 'Software Developer',
    period: '2016 – 2017',
    bullets: [
      'Built an integration platform from scratch — C#/.NET services + TypeScript web layers.',
      'Connector / transformation / orchestration layers backed by Redis, PostgREST, Elasticsearch.',
      'Reverse-engineered proprietary protocols, wrote parsers/translators for legacy systems.',
      'Hardened with secure auth, cryptographic controls, HSM integrations, threat modeling.',
    ],
  },
];

const PROJECTS = [
  // ── BLOCKCHAIN ─────────────────────────────────────────────
  {
    id: 'arb-bot',
    category: 'blockchain',
    name: 'EVM Arbitrage Bot',
    role: 'Solo dev · architecture, contracts, infra',
    summary: 'MEV arbitrage system across EVM chains. Built it solo, end-to-end.',
    detail: "Custom Solidity execution contract, the rest is Rust with a couple of Go pieces handling side stuff. Local sims through REVM so I can validate an opportunity in microseconds before touching a real tx. Around 60 self-hosted nodes spread around the world to keep latency low everywhere it matters. There's a coordinator in the middle that takes the firehose, scores opportunities, and only fires when the simulated profit beats gas + slippage with margin. Heavy gas optimizations on the contract — packed calldata, hand-written Yul in the hot paths, dynamic fee bidding. The bot also peeks at the mempool and tries to predict block ordering before the block actually lands. Works on v2 and v3 across 20+ DEXs and pulls a flash loan when the route needs it. Strategies are hot-reloadable so I don't have to bring the engine down every time I want to try something new. Ran it for over a year and at peak it was a top-3 arbitrage bot on BSC. Eventually shut it down — a team came in with an offer too good to refuse, and maintaining the infra was a full-day job in itself, so something had to give.",
    stack: ['Rust', 'Go', 'Solidity', 'Yul', 'REVM', 'Foundry', 'geth/reth', 'gRPC'],
  },
  {
    id: 'salmonella',
    category: 'blockchain',
    name: 'Salmonella Counter-Sandwich Bot',
    role: 'Solo dev · adversarial design',
    summary: 'Bait sandwich bots into self-destructive trades. Predator becomes prey.',
    detail: "This one's a bit evil. The idea: sandwich bots are looking for juicy-looking transactions in the mempool, so I give them what they're looking for — except the token is rigged. Custom ERC20 logic where transfers behave differently depending on who's calling, the gas price, and where in the block they land. Anyone who isn't the original sender gets weird taxes or just dust back. On top of that, decoy transactions go out into the mempool tuned to look exactly like the kind of thing sandwich bots love. There's also a small profiling pipeline that fingerprints active sandwich bots by their submission patterns, so I can tailor the bait per target. Net result: bots chasing what looks like easy money, walking into pre-built losing positions, and my contract pulls the spread. Quiet little operation hiding in the noise.",
    stack: ['Solidity', 'Yul', 'Rust', 'EVM', 'Foundry', 'mempool tooling'],
  },
  {
    id: 'cex-scanner',
    category: 'blockchain',
    name: 'CEX Trading Scanner & Auto-Trader',
    role: 'Solo dev · live · serving real traders',
    summary: 'Multi-exchange futures scanner running automated strategies. Live, generating revenue.',
    detail: "Scans every futures pair across MEXC, Binance, BingX, KuCoin, Bybit, Bitunix, and OKX in real time. Pulls candles, depth, EMAs, Bollinger, RSI, MACD, volume, OI, funding — all of it — into one normalized stream. On top of that there's a strategy engine that watches thousands of pairs at once and trades on its own. It's running live and making money right now. Five high-volume traders also use it daily as their main scanner; they used to do all this stuff by hand and have told me it's the best tool they've used for someone who actually knows how to trade. The scanner surfaces tokens that are about to move (long or short) and ranks them by a confluence score across timeframes. There's an alerting layer, replayable signals, and a small dashboard if you want to dig into why a pair triggered.",
    stack: ['Rust', 'Go', 'TypeScript', 'Next.js', 'WebSockets', 'PostgreSQL', 'Redis'],
  },
  {
    id: 'polymarket',
    category: 'blockchain',
    name: 'Polymarket Trader Analyzer',
    role: 'Solo dev · reverse engineering',
    summary: 'Reverse-engineered a 30k/day Polymarket bot by analyzing on-chain trades.',
    detail: "Pulls every trade for any Polymarket trader straight from chain data — no Polymarket API, no rate limits, nothing missed. Specialized for BTC and ETH markets across all timeframes. It rebuilds PnL from raw transfers, figures out whether each fill was limit or market by looking at the tx structure, and draws the whole story out as visuals: equity curve, holding-time distribution, win-rate by regime. I used it to fully reverse-engineer a popular bot that was printing $30k+ a day, then built my own version of the same idea that's running live and making money daily. The visual layer is what makes it actually useful — instead of staring at hex you watch the strategy unfold trade by trade.",
    stack: ['Rust', 'Python', 'TypeScript', 'Next.js', 'PostgreSQL', 'gRPC', 'on-chain indexing'],
  },
  {
    id: 'trading-platform',
    category: 'blockchain',
    name: 'End-to-End Trading Platform',
    role: 'Solo dev · 2+ years · live in production',
    summary: 'Full trading platform — backend, frontend, infra, microservices. Solo build, thousands of concurrent users.',
    detail: "Two-plus years on this one as the only engineer (more engineers were added at the end). Backend in Rust and Go, frontend in Next.js, full database design, event-driven microservices, and all the ops to keep it alive. Live today with thousands of concurrent users hitting it daily. Local REVM and Solana simulation engines so quotes are accurate before anyone signs anything. Real-time price and position streaming over gRPC and WebSockets, fanned out by RabbitMQ. Sniping, copy trading, conditional triggers, wallet management, cross-chain swaps, per-chain executors, bundle-tip streaming, gas-cache prewarming — the works. Survives traffic spikes, validator outages, and chain reorgs without losing user state because every order is replayable from the event log. Same product replaced what used to be a 15-engineer team.",
    stack: ['Rust', 'Go', 'Next.js', 'TypeScript', 'PostgreSQL', 'Redis', 'RabbitMQ', 'gRPC', 'WebSockets'],
  },
  {
    id: 'sniper',
    category: 'blockchain',
    name: 'Launch Sniping Bot',
    role: 'Solo dev · low-latency execution',
    summary: 'Snipe new token launches mempool-side, with rug protection baked in.',
    detail: "Mempool-first sniper that catches launch events as early as physically possible — open-trading transactions, liquidity adds, tax reductions, ownership renouncements, blacklist removals — and fires the buy in the same block. Has commit/reveal modes for launches that try to block bots. Just as important: a wall of safety checks that have saved capital more times than I can count. Pre-buy contract scans (honeypot detection, tax sim, transfer-restriction checks), liquidity-lock verification, deployer wallet profiling, and tripwires that auto-exit if the contract starts misbehaving after launch. Configurable per chain, runs on EVM and Solana with the same control surface.",
    stack: ['Rust', 'Solidity', 'EVM', 'Solana', 'mempool tooling', 'REVM'],
  },
  {
    id: 'sim',
    category: 'blockchain',
    name: 'Low-Latency Contract Simulator',
    role: 'Solo dev · core infra',
    summary: 'Simulate any ERC20 — even unverified — and run strategies on top.',
    detail: "Give it any ERC20 address, verified or not, and it spits out a behavioral model: buy tax, sell tax, transfer restrictions, tradable state, blacklist behavior, max wallet, max tx, fee-on-transfer quirks, and any non-standard hooks the deployer thought they were hiding. Built on REVM with custom storage probing and bytecode inspection so it works without source. From there you can run strategies against the simulated token in microseconds — backtest a sniper, validate an arb path, stress-test a sandwich — before any real money touches the chain. It's the safety layer the rest of my trading stack leans on.",
    stack: ['Rust', 'REVM', 'Solidity', 'EVM', 'bytecode analysis'],
  },

  // ── AI / LLMs ──────────────────────────────────────────────
  {
    id: 'ai-trading-agent',
    category: 'ai',
    name: 'Autonomous Trading Research Agent',
    role: 'Solo dev · multi-agent system',
    summary: 'A swarm of LLM agents that research, propose, backtest, and deploy trading strategies on their own.',
    detail: "Multi-agent setup with a planner that takes 'find me alpha' and breaks it down into research, hypothesis, backtest, and deployment steps. Specialized agents for market research, on-chain forensics, code generation (the strategy gets written in Rust and compiled by the agent), and risk review. Strategies that pass the backtest go through paper trading, then into a live sandbox with capped capital. Built on a fine-tuned model trained on a bunch of trading literature, my own historical strategy code, and a curated set of profitable vs unprofitable on-chain patterns. Self-improves — every closed trade flows back into the eval set and shifts how the next round of agents decides things. Treats the model as a teammate that ships PRs, not a chatbot.",
    stack: ['Rust', 'Python', 'TypeScript', 'PyTorch', 'fine-tuned LLM', 'agent orchestration', 'evals'],
  },
  {
    id: 'ai-ops-copilot',
    category: 'ai',
    name: 'Operations Copilot for ERP Workflows',
    role: 'Solo dev · production · enterprise pilot',
    summary: 'AI copilot embedded in NetSuite that runs day-to-day operations end-to-end.',
    detail: "An LLM copilot that lives inside enterprise ERP environments and actually does work — not a search bar with a chat skin on it. Reads sales orders, inventory, POs, and shipment status in real time, flags weird stuff, drafts replenishment POs, reroutes fulfillment when a warehouse is over capacity, and writes the audit trail so finance can sign off. Tool-using agent built on a fine-tuned base model with NetSuite SuiteScript, SuiteQL, and policy docs in the training mix. The pilot enterprise customer is running it in production today and tells me it saves their ops managers double-digit hours per week. Whole point of this thing: take AI out of the chat box and put it inside the workflows people actually do all day.",
    stack: ['Rust', 'TypeScript', 'fine-tuned LLM', 'RAG', 'agent tools', 'NetSuite'],
  },
  {
    id: 'ai-code-arena',
    category: 'ai',
    name: 'Self-Hosted Coding Model Arena',
    role: 'Solo dev · training & inference infra',
    summary: 'Train, fine-tune, and benchmark open-weight coding models against each other on real engineering tasks.',
    detail: "Self-hosted arena where I pit open-weight coding models — Qwen, DeepSeek, Llama, Mistral, custom fine-tunes — against each other on real engineering tasks pulled from my own backlog and a few curated benchmarks. Custom training pipeline with LoRA + full fine-tunes, distributed across multi-GPU nodes, with a homegrown inference router that picks the right model per task and falls back gracefully when something OOMs. Eval harness scores correctness, latency, cost, and code quality, and the loser's failures get fed back into the next training round. Powers internal tools that write Rust services, Solidity contracts, and SuiteScript automations end-to-end. Doubles as a research surface for me — I learn what each model is actually good at, not what its leaderboard says. This is where I'm working right now and trying to improve. It's a super complex problem and as a solo guy it's hard to scale as fast as I'd like, but it's also the most interesting thing I've worked on in a while.",
    stack: ['Python', 'PyTorch', 'vLLM', 'Rust', 'distributed training', 'evals'],
  },

  // ── NETSUITE ───────────────────────────────────────────────
  {
    id: 'demand-planning',
    category: 'netsuite',
    name: 'Custom Demand Planning System',
    role: 'Lead architect · production',
    summary: 'Replaced NetSuite native demand planning. 60% warehouse cost reduction, near-zero stockouts.',
    detail: "A full replacement of NetSuite's native demand planning module for a multi-warehouse client whose forecasts were always off. The new engine pulls historical sales, seasonality, lead times, supplier reliability, and live order velocity, then spits out per-SKU per-location replenishment plans on a daily cycle. Built on SuiteScript Map/Reduce + Scheduled Scripts for the heavy work, RESTlets to expose the planner to external systems, and SuiteQL for the analytics that power the planner UI. Result: warehouse operating cost down ~60%, stockouts basically gone across the catalog, and buyers spending hours on strategy instead of fixing spreadsheets. It's the operational backbone of the company now.",
    stack: ['SuiteScript 2.x', 'Map/Reduce', 'Scheduled Scripts', 'SuiteQL', 'RESTlets', 'TypeScript'],
  },
  {
    id: 'grafana-dash',
    category: 'netsuite',
    name: 'Real-Time Grafana Dashboard for NetSuite',
    role: 'Solo dev · production',
    summary: 'Live operational dashboard pulling NetSuite data into Grafana — pies, bars, time-series, alerts.',
    detail: "Real-time bridge between NetSuite and Grafana so ops teams can look at the business the way an SRE looks at a system. Custom RESTlet + SuiteQL endpoints expose orders, inbound shipments, container ETAs, fulfillment SLAs, AR aging, and per-warehouse throughput. A small Go service polls and pushes everything into a time-series store, and Grafana takes care of the rest: pie breakdowns of order status, bar charts of warehouse output, time-series for SLA adherence, heatmaps for picking density, and threshold alerts that page the right team when something drifts. Replaced a stack of static Excel exports the ops team was running by hand.",
    stack: ['Grafana', 'Go', 'SuiteScript 2.x', 'RESTlets', 'SuiteQL', 'PostgreSQL', 'Prometheus'],
  },
  {
    id: 's3-cabinet',
    category: 'netsuite',
    name: 'NetSuite ↔ S3 File Cabinet Bridge',
    role: 'Solo dev · production',
    summary: 'Move NetSuite file storage to S3 transparently. ~90% file-cabinet cost reduction.',
    detail: "NetSuite's File Cabinet is one of the most expensive pieces of storage on the planet, so I built a transparent S3-backed replacement. Documents, attachments, and customer-uploaded files land in S3 instead, with a custom UI inside NetSuite that makes the swap invisible to end users. Versioning, signed-URL access, approvals, role-based ACLs, and an audit log on every read and write. Around 90% file-cabinet cost reduction at the pilot client, plus a much faster UI on big attachments since S3 scales where File Cabinet doesn't. Drop-in upgrade — no workflow changes for the people using NetSuite day to day.",
    stack: ['SuiteScript 2.x', 'Suitelets', 'RESTlets', 'AWS S3', 'TypeScript', 'IAM'],
  },
  {
    id: 'integrations',
    category: 'netsuite',
    name: 'Enterprise Integration Suite',
    role: 'Lead architect · 40+ client deployments',
    summary: 'Battle-tested integrations between NetSuite and the systems every business actually runs on.',
    detail: "Years of enterprise integration work distilled into a reusable suite. Two-way connectors for QuickBooks, Salesforce, HubSpot, Shopify, Magento, BigCommerce, Amazon Seller Central, ShipStation, ShipBob, EasyPost, FedEx, UPS, Avalara, Stripe, PayPal, ADP, Workday, Concur, Coupa, EDI partners, and custom 3PL APIs. Designed around an event-driven core: every external mutation comes in as an event, gets validated, transformed, and applied through SuiteTalk or SuiteScript with idempotent semantics. Replay, dead-letter queues, schema-drift detection, and a control plane so ops can reconcile mismatches in seconds instead of days. Deployed across 40+ client accounts.",
    stack: ['SuiteScript 2.x', 'SuiteTalk', 'RESTlets', 'TypeScript', 'Node.js', 'RabbitMQ', 'PostgreSQL'],
  },
  {
    id: 'ns-dev-engine',
    category: 'netsuite',
    name: 'Custom NetSuite Dev Engine',
    role: 'Solo dev · my central NetSuite tool',
    summary: 'Built my own SuiteScript framework because the native dev experience hurts. Now my team ships 3x faster.',
    detail: "I got tired of the SuiteScript dev loop, so I rebuilt it. A full TypeScript framework that compiles down to SuiteScript 2.x with proper modules, dependency injection, typed records, typed search, and a real testing layer with mocked NetSuite contexts. Hot deploy through SDF + a custom CLI that watches files and pushes only what changed in seconds. There's a local simulator that runs scripts against a snapshot of a sandbox account so you can debug User Events, Map/Reduce stages, and Workflow Actions without ever leaving your editor. Build pipeline lints for governance limits before deploy so nobody finds out about a 1000-unit script in production. This is my central tool for all the NetSuite work I do \u2014 feature delivery cut by more than half across every account that runs on it.",
    stack: ['TypeScript', 'SuiteScript 2.x', 'SDF', 'Node.js', 'CLI tooling', 'Jest'],
  },
  {
    id: 'ns-warehouse-os',
    category: 'netsuite',
    name: 'Multi-Warehouse Orchestration OS',
    role: 'Lead architect · production',
    summary: 'Real-time fulfillment brain that runs picking, packing, and routing across multiple warehouses. Cut ops cost 96.5%.',
    detail: "A full warehouse orchestration layer sitting on top of NetSuite. Think of it as the brain that decides, in real time, which warehouse fulfills which order, in what wave, with what carrier, on which truck \u2014 and then drives the people on the floor through it. Pulls live order velocity, on-hand inventory per bin, dock-door status, carrier cutoffs, and SLA timers, then runs a constraint solver every few seconds to re-optimize the queue. Pickers and packers get instructions on handheld scanners; supervisors get a live ops view with bottleneck alerts; managers get auto-generated daily reports. Carrier rate-shopping and label generation happen inline, so the cheapest valid option is picked at the last possible second. Operational cost down 96.5% at the launch client, and zero late shipments through Q4 peak.",
    stack: ['SuiteScript 2.x', 'Map/Reduce', 'Scheduled Scripts', 'RESTlets', 'TypeScript', 'Node.js', 'WebSockets', 'PostgreSQL'],
  },
  {
    id: 'ns-finance-close',
    category: 'netsuite',
    name: 'Automated Financial Close Engine',
    role: 'Lead architect · production',
    summary: 'Closes the books for multi-entity NetSuite tenants in hours instead of weeks. Audit-ready with one click.',
    detail: "A full month-end close engine that takes what used to be a 2 to 3 week ordeal and gets it done in a few hours. Walks every subsidiary through accruals, prepaid amortizations, FX revaluation, intercompany eliminations, and consolidation \u2014 all driven by configurable rules instead of manual journal entries. Each step generates a full audit trail with the supporting calculations attached, so external auditors get a one-click package instead of a chase. Variance detection compares the closing P&L against rolling forecasts and flags anomalies before the controller even opens the file. Built on Map/Reduce and Scheduled Scripts for the heavy lifting, RESTlets for the operator UI, and SuiteQL for the analytics. Currently running multi-entity, multi-currency closes across dozens of subsidiaries.",
    stack: ['SuiteScript 2.x', 'Map/Reduce', 'Scheduled Scripts', 'SuiteQL', 'RESTlets', 'TypeScript', 'PostgreSQL'],
  },
];

const ABOUT = {
  tagline: "Builder by heart. I ship every day, weekends included. I love systems that scale — and backends where latency actually matters.",
  short: "Senior software architect splitting time between three worlds: NetSuite, blockchain, and AI.",
  long: "Computer engineer with 10+ years building systems and actually getting them to production. I'm allergic to projects that live forever in design docs — what I enjoy is seeing them go live and run reliably under real load. I work across three tracks at the same time: Rust and Go low-latency backends, MEV bots on EVM and Solana — arbitrage, sandwich, the full searcher stack — and NetSuite ERP customization and integrations. More recently I've been going deep on training and running my own LLMs. The thread between them is the same — squeeze the performance, keep things simple, and make sure they actually work in production. I move fast, take ownership of what I build, and care a lot about leaving systems better than I found them. When I take something on, my goal is simple: ship it, ship it well, and ship it fast.",
  location: 'Costa Rica · GMT-6',
};

const CONTACT = {
  email:    'yeison.cl894@gmail.com',
  telegram: '@evmsal',
  linkedin: 'in/yeisoncl',
};

window.PROJECTS = PROJECTS;
window.STATS = STATS;
window.STACK = STACK;
window.EXPERIENCE = EXPERIENCE;
window.ABOUT = ABOUT;
window.CONTACT = CONTACT;
