Skip to content

StefChatz/ares

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ares Terminal

The open-source perpetuals trading terminal for DeFi protocols

Build production-ready DEX interfaces in days, not months

Live Demo β€’ Documentation β€’ Twitter β€’ Telegram

MIT License TypeScript Next.js


🎯 What is Ares?

Ares is a professional, terminal-style trading UI template for building DEX perpetuals, futures, and margin trading platforms. It's the fastest way to launch a production-grade trading interface β€” just fork it, customize it, and ship.

Built by traders for traders, Ares delivers the speed, precision, and aesthetic of professional platforms like Hyperliquid, dYdX, and GMX β€” with 100% open-source code you can adapt to any protocol.

Built with: Next.js 16 β€’ TypeScript β€’ shadcn/ui β€’ Radix UI β€’ Tailwind CSS β€’ wagmi β€’ viem β€’ TradingView β€’ Zustand

Ares Trading Terminal Professional terminal interface with real-time charting, order management, and position tracking


πŸ“– The Story

Ares was originally developed behind the scenes as a standalone perpetuals product for the Mars Protocol ecosystem. After months of solo development and refinement, the decision was made to wind down the protocol's perpetuals ambitions.

Rather than let this work disappear, I'm open-sourcing it so the DeFi community can benefit from a production-ready trading terminal that was built to real-world standards.

This isn't a proof-of-concept or a hackathon project β€” it's a battle-tested interface designed to handle real trading volume, built by someone who's shipped production DeFi applications at scale.

My background:

  • Core contributor to Mars Protocol (Gen-3 DeFi leverage platform)
  • Built Delta-Mars (delta-neutral strategies on Neutron)
  • Manage Lore Capital (delta-neutral hedge fund, 20% APY, 0.8% max drawdown)

Now it's yours to fork, customize, and launch. πŸš€


Perfect For

  • 🏦 DeFi protocols launching perps/futures products
  • πŸ”„ Trading aggregators building multi-protocol interfaces
  • 🏒 White-label solutions for institutional clients
  • πŸŽ“ Educational platforms and trading simulators
  • πŸ› οΈ Protocol integrators needing professional UX

πŸ” Perfect For Searching

Looking for these? You found the right repo:

  • πŸ”Ž "shadcn terminal" β€” Built with shadcn/ui components
  • πŸ”Ž "web3 trading ui" β€” Complete crypto trading interface
  • πŸ”Ž "nextjs trading platform" β€” Next.js 16 App Router
  • πŸ”Ž "defi perpetuals template" β€” Ready-to-deploy perps UI
  • πŸ”Ž "react crypto terminal" β€” Professional trading terminal
  • πŸ”Ž "tailwind trading dashboard" β€” Tailwind CSS 4 styling
  • πŸ”Ž "wagmi trading app" β€” wagmi v2 + viem integration
  • πŸ”Ž "open source dex" β€” MIT licensed, fully customizable

✨ Key Features

Advanced Charting Order Form
Positions Management Mobile Trading

Multi-panel layout with charting, order entry, positions tracking, and account management


🎨 Professional Terminal UI

  • shadcn/ui components with Radix UI primitives for accessibility
  • High-contrast design optimized for rapid decision-making
  • Information density without clutter
  • Customizable panels with drag-and-resize functionality
  • Mobile responsive for trading on the go
  • Hugeicons for consistent, professional iconography

πŸ“Š Advanced Charting

  • TradingView integration (with license) for professional traders
  • Lightweight-charts (Apache 2.0) for open-source deployments
  • Multiple timeframes and chart types
  • Technical indicators ready to integrate

⚑ Real-Time Architecture

  • WebSocket-ready data pipeline
  • Zustand stores for optimized state management
  • Middleware layer for batching high-frequency updates
  • TanStack Query for efficient caching

πŸ’Ό Complete Trading Features

  • Order types: Market, Limit, Stop-Loss, Take-Profit
  • Leverage trading with risk calculations
  • Position management with PnL tracking
  • Account overview panel (Hyperliquid-inspired)
  • Order book and recent trades
  • Market search and favorites

πŸ”Œ Plug-and-Play Integration

  • Mock mode for frontend-first development
  • Modular service layer β€” swap implementations easily
  • Multi-chain support via wagmi + viem
  • WalletConnect integration included
  • Environment-based configuration

⌨️ Keyboard Shortcuts

  • Cmd/Ctrl + K β€” Quick market search (power user essential!)
  • Esc β€” Close modals and dialogs
  • Tab β€” Navigate between form fields
  • Enter β€” Submit orders quickly
  • More shortcuts β€” See KEYBOARD_SHORTCUTS.md

πŸ› οΈ Developer Experience

  • TypeScript throughout for type safety
  • ESLint + Prettier for code quality
  • React Compiler for automatic optimizations
  • Next.js App Router with SSR support
  • Comprehensive documentation

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/StefChatz/ares.git
cd ares

# Install dependencies (Bun recommended)
bun install
# or: npm install

# Run development server
bun run dev

The app starts in mock mode by default β€” perfect for UI development without a backend.

Visit http://localhost:3000 to see your trading terminal.

First Steps

  1. Explore the UI β€” All components work out of the box with mock data
  2. Try keyboard shortcuts β€” Press Cmd/Ctrl + K to search markets
  3. Configure your brand β€” Update colors, logo, and metadata
  4. Connect your protocol β€” Implement contract service layer
  5. Deploy β€” Ship to Vercel, Netlify, or self-host

πŸ“– Full setup guide: SETUP.md


🎨 Screenshots & Demo

Desktop Interface

Trading Layout Four-panel terminal layout: Chart, Order Form, Positions, and Account panels

Dark Terminal Aesthetic

Terminal Design High-contrast, grid-based design optimized for serious traders

Mobile Experience

Mobile Trading Fully responsive design for trading on the go

Customizable Themes

Green Theme Blue Theme Purple Theme

Easily customizable color schemes to match your brand


πŸ“¦ What's Included

βœ… Frontend Components

  • Chart panels with market info
  • Order entry forms with calculations
  • Positions & orders tables
  • Account summary dashboard
  • Market selector with search
  • Wallet connection modal
  • Mobile-optimized layouts

βœ… Infrastructure

  • State management (Zustand)
  • Data fetching (TanStack Query)
  • WebSocket architecture
  • Service abstraction layer
  • Mock data for development
  • TypeScript types

βœ… Blockchain Integration

  • wagmi v2 for Ethereum interactions
  • viem for low-level operations
  • WalletConnect support
  • Multi-chain configuration
  • Transaction handling

πŸ”§ What You Customize

Required Integration Points

  1. Smart Contracts β€” Connect your perps protocol

    • Edit src/services/contract/perp.ts
    • Add contract ABIs and addresses
  2. Price Feeds β€” Integrate oracles (Pyth, Chainlink, etc.)

    • Implement src/services/oracle/
    • Configure price update mechanisms
  3. Backend API β€” Your trading engine/indexer

    • Update src/services/api/api-client.ts
    • Implement WebSocket service
  4. Chain Configuration β€” Your supported networks

    • Edit src/lib/wagmi.ts
    • Add RPC endpoints
  5. Branding β€” Make it yours

    • Colors in src/app/globals.css
    • Logo and favicon in public/
    • Metadata in src/app/layout.tsx

πŸ“– Detailed customization guide: CUSTOMIZATION.md


πŸ—οΈ Architecture

Blockchain/API β†’ Service Layer β†’ Middleware β†’ Zustand Stores β†’ React Components
                                     ↓
                              TanStack Query (cache)

Modular Service Layer

Architecture Diagram Data flows from blockchain/API through service layer to stores and UI components

All external integrations are abstracted through a pluggable service layer:

// Easy to swap implementations
src/services/
β”œβ”€β”€ api/              # REST API client
β”œβ”€β”€ contract/         # Smart contract interactions
β”œβ”€β”€ oracle/           # Price feed integrations
β”œβ”€β”€ mock/             # Development mocks
└── data-middleware   # Normalizes real-time updates

Component Architecture

src/components/
β”œβ”€β”€ chart/           # Charting + market info
β”œβ”€β”€ trading/         # Order forms + account panel
β”œβ”€β”€ positions/       # Positions & orders tables
β”œβ”€β”€ market/          # Market selector + details
β”œβ”€β”€ wallet/          # Wallet connection
β”œβ”€β”€ layout/          # Panel layouts (desktop/mobile)
└── ui/              # Reusable primitives

πŸ“– Architecture deep-dive: TECH_STACK.md


🌐 Multi-Chain Support

Ares is designed for all EVM chains. Pre-configured examples for:

  • Ethereum Mainnet
  • Arbitrum
  • Optimism
  • Base
  • zkSync Era
  • Polygon
  • Avalanche
  • BNB Chain

Adding a new chain is as simple as updating src/lib/wagmi.ts with chain config and RPC endpoint.


πŸ“– Documentation

Document Description
SETUP.md Step-by-step integration guide
TECH_STACK.md Technology choices and architecture
CUSTOMIZATION.md Branding, theming, and features
DEPLOYMENT.md Hosting and production setup
CONTRIBUTING.md Guidelines for contributors
KEYBOARD_SHORTCUTS.md Complete keyboard shortcuts guide

🎨 Design Philosophy

Terminal-First Aesthetics

  • Sharp corners, high contrast, grid-based layouts
  • Inspired by professional trading platforms
  • Information density for serious traders
  • No unnecessary animations or rounded corners

Performance-Focused

  • React Compiler for automatic optimizations
  • Middleware batching for high-frequency updates
  • Granular Zustand subscriptions
  • Code splitting and lazy loading

Developer-Friendly

  • TypeScript for type safety
  • Clear separation of concerns
  • Comprehensive inline documentation
  • Easy to understand and modify

πŸ› οΈ Tech Stack

Category Technology
Framework Next.js 16 (App Router)
Language TypeScript 5.9
UI Library React 19
UI Components shadcn/ui + Radix UI + Base UI
State Zustand
Data Fetching TanStack Query
Styling Tailwind CSS 4
Blockchain wagmi 2 + viem
Charting TradingView / lightweight-charts
Icons Lucide React + Hugeicons

πŸ“– Full tech stack details: TECH_STACK.md


🚒 Deployment

Ares works on any Next.js-compatible hosting platform:

  • Vercel (recommended) β€” Zero config deployments
  • Netlify β€” Fast global CDN
  • Cloudflare Pages β€” Edge computing
  • Self-hosted β€” Docker or Node.js

πŸ“– Deployment guide: DEPLOYMENT.md


🀝 Contributing

We welcome contributions! Whether it's bug fixes, new features, or documentation improvements.

Guidelines:

  • Follow TypeScript best practices
  • Maintain terminal aesthetic (no rounded corners!)
  • Keep components focused and reusable
  • Add comments for complex logic

πŸ“– Contribution guide: CONTRIBUTING.md


πŸ” Security

This is a UI template β€” security of your trading platform depends on:

  • Your smart contract audits
  • Your backend API security
  • Your key management
  • Your hosting configuration

Best Practices:

  • Never store private keys in frontend code
  • Validate all user inputs
  • Use HTTPS everywhere
  • Implement rate limiting
  • Monitor for suspicious activity

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

TL;DR: You can use this commercially, modify it, distribute it, and use it privately. Just include the license and copyright notice.


🌟 Examples & Showcase

Built with Ares? We'd love to feature your project!

Open an issue or reach out on Telegram to be added to the showcase.


πŸ“ž Support & Community


πŸ™ Credits

Built with ❀️ by Stefanos Chatzakis β€” solo developer and core contributor to Mars Protocol.

Why I'm sharing this:

After months of solo development on this terminal for Mars Protocol's perpetuals product, the protocol decided to wind down that initiative. Rather than let this production-ready work disappear, I'm open-sourcing it so the DeFi community can benefit from a professional trading interface that was built to real-world standards.

Other projects:

  • Mars Protocol β€” Gen-3 DeFi leverage platform (core contributor)
  • Delta-Mars β€” Delta-neutral strategies on Neutron (creator)
  • Lore Capital β€” Delta-neutral hedge fund, 20% APY (manager)
  • Amber Finance β€” Yield optimization protocol (creator)

⭐ Star History

If you find Ares useful, consider giving it a star! It helps others discover the project.

Star History Chart


Made with ❀️ for the DeFi community

Website β€’ GitHub β€’ Twitter β€’ Telegram

About

Perpetual DEX Trading Terminal

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors