Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

269 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Wrytes - Software Development Platform for Distributed Ledger Technologies

Next.js React TypeScript Tailwind CSS Wagmi

A software development platform specializing in Distributed Ledger Technology solutions and AI

Live Demo β€’ AI Agent Guide β€’ In-App Docs β€’ API Docs


🎯 Platform Vision

Wrytes is a Swiss R&D company specializing in software development for Distributed Ledger Technologies and AI. We create cutting-edge tools, protocol adapters, and full-stack applications. Our proprietary Bitcoin option trading strategies provide independent funding for continuous innovation and research.

πŸ—οΈ Core Business Philosophy:

  • πŸ’° Profit-Driven Independence - Operating exclusively with company assets, trading profits fund R&D
  • πŸ”¬ Research-First Development - Every tool serves our research and innovation goals
  • 🧩 Component Reusability - Maximize reuse of existing components before building new ones
  • πŸ“± Mobile-First Responsive - Consistent patterns across all features
  • 🏒 Swiss Precision - Built with meticulous attention to detail and quality
  • πŸ”§ Feature-Based Structure - Each major feature is self-contained and pluggable

πŸš€ Business & Technology Roadmap:

  • πŸ’» Software Development (Core) - Full-stack solutions for Distributed Ledger Technologies and AI
  • πŸ› οΈ Technical Services (Revenue) - Development services for clients and partners
  • πŸš€ Platform Development (Innovation) - Proprietary tools and research prototyping
  • 🀝 Strategic Partnerships (Growth) - Technology sharing and collaboration agreements
  • πŸ”— Protocol Integrations (Current) - Multi-protocol adapters and system integrations
  • πŸ”„ Transaction Management Systems (Current) - Advanced deployment and monitoring tools
  • βš™οΈ Platform Operations Tools (Future) - Enhanced infrastructure and automation systems
  • πŸ” R&D Innovation Tools (Future) - Cutting-edge technology research and development

🏒 About Wrytes AG

Wrytes AG is a Swiss company based in Zug, Switzerland (Crypto Valley), specializing in:

  • Software Development & Distributed Ledger Technologies - Full-stack solutions from smart contracts to applications
  • Protocol Adapters & System Integrations - Advanced tools for Distributed Ledger ecosystems
  • Technical Consulting & Development Services - Expert development services for clients and partners
  • Platform Development & Innovation - Cutting-edge technology research and prototyping
  • Proprietary Asset Management - Independent revenue through Bitcoin option trading strategies funding R&D
  • Strategic Partnerships - Technology sharing and collaboration agreements

✨ Current Features

πŸ” Wallet + Telegram Authentication

  • No Passwords - Identity proven by signing a cryptographic challenge with a connected wallet
  • Telegram 2FA - Every login is approved or denied from a linked Telegram account
  • Multi-Wallet Support - MetaMask, WalletConnect, Coinbase Wallet, Safe (multisig)
  • Scope-Based Access Control - JWT-encoded scopes gate features at the component and page level (ADMIN bypasses all checks)

πŸ€– Deribit Agent

  • RL Trading Agents - Train and run PPO/DQN/A2C reinforcement-learning agents for Bitcoin options
  • Backtest, Paper & Live Runs - Promote a trained model from historical replay to live Deribit orders
  • Training Sessions & Model Registry - Track hyperparameters, rewards, and model artifacts per run

πŸ“Š Coin Tracking / Accounting

  • Token Transfer Classification - Categorize on-chain transfers against a chart of accounts
  • Journal Templates - Configurable accounting templates per quarter
  • Native Browser Export - Print/export reports without a PDF dependency

🧾 Invoices / Bills

  • AI Document Extraction - Upload a bill; the platform extracts line items and assigns a payment address
  • Payment Tracking - Manage bills end-to-end from upload to settlement

πŸ’± Routes (On/Off-Ramp)

  • Kraken Integration - Convert between fiat and crypto using linked Kraken API credentials
  • Execution History - Full audit trail of on-ramp and off-ramp conversions

🎨 User Experience

  • Warm Off-White Light Theme - Professional Swiss design aesthetic with a consistent brand-orange accent
  • Responsive Design - Mobile-first, works on all devices
  • Loading States - Skeleton components and smooth transitions
  • Error Handling - Graceful fallbacks and user-friendly messages
  • Transaction Queue - Redux-powered batch transaction management UI

πŸ› οΈ Technology Stack

Core Framework

Web3 & Blockchain

UI & Styling

State Management

Forms & Validation

Development Tools

πŸ“ Project Structure

wrytes/
β”œβ”€β”€ components/              # 🧩 Reusable UI Components
β”‚   β”œβ”€β”€ ui/                 # Generic UI primitives (ALWAYS REUSE THESE)
β”‚   β”‚   β”œβ”€β”€ input/          # ButtonInput, TextInput, TokenInput, SelectInput, ...
β”‚   β”‚   β”œβ”€β”€ layout/          # PageHeader, Section, Breadcrumb
β”‚   β”‚   β”œβ”€β”€ modal/           # Modal system with confirm variants
β”‚   β”‚   β”œβ”€β”€ stats/           # Metric display components
β”‚   β”‚   └── table/           # Table, TableRow, TableHeadSearchable, ...
β”‚   β”œβ”€β”€ features/           # πŸš€ Feature-specific components
β”‚   β”‚   β”œβ”€β”€ accounting/      # Coin-tracking / accounting feature module
β”‚   β”‚   β”œβ”€β”€ routes/          # On/off-ramp routes feature
β”‚   β”‚   β”œβ”€β”€ deribitAgent/    # Deribit Agent shared components
β”‚   β”‚   └── [feature]/       # Other feature modules
β”‚   β”œβ”€β”€ layouts/             # πŸ“ Layout components (AppLayout, section variants)
β”‚   └── landing/             # 🏠 Landing page sections
β”œβ”€β”€ hooks/                  # πŸ”— Custom React hooks
β”‚   β”œβ”€β”€ redux/              # Redux state hooks
β”‚   β”œβ”€β”€ ui/                 # Generic UI hooks
β”‚   β”œβ”€β”€ web3/               # Web3 interaction hooks
β”‚   └── [feature]/          # Feature-specific hooks
β”œβ”€β”€ lib/                    # πŸ› οΈ Business logic & integrations
β”‚   β”œβ”€β”€ navigation/         # Nav configs β€” one file per section
β”‚   β”œβ”€β”€ web3/               # Web3 configuration
β”‚   β”œβ”€β”€ graphql/             # GraphQL client & queries
β”‚   β”œβ”€β”€ deribit-agent/       # Deribit Agent API client
β”‚   └── utils/               # Utility functions
β”œβ”€β”€ redux/                  # πŸ“Š Global state management
β”‚   └── slices/             # Feature-specific slices
β”œβ”€β”€ docs/                   # πŸ“– In-app documentation content (rendered at /docs)
└── pages/                  # πŸš€ Next.js pages (dashboard, deribit-agent, routes,
                             #    invoices, coin-tracking, legal, docs, auth)

See CLAUDE.md for the full, actively-maintained structure reference.

🧩 Component Reusability Strategy

CRITICAL: Always Reuse Existing Components

Before building new components, check these locations:

  1. components/ui/ - Generic UI primitives

    • input/ButtonInput.tsx - Variants: primary | secondary | outline | ghost | error
    • Card.tsx - Flexible card with header, content, footer
    • modal/ - Complete modal system with confirm variants
    • stats/ - Metric display with various layouts
    • table/ - Generic table/row components with searchable headers
  2. components/layouts/ - Shared layout pieces

    • AppLayout.tsx - Generic layout shell β€” inject logo, navItems, isActive, headerRight, mobileExtra
    • actions/WalletButton.tsx - Self-contained wallet connect/display
    • footers/FooterSimple.tsx - Minimal footer strip rendered by AppLayout automatically
  3. components/features/[existing-feature]/ - Feature-specific patterns

    • Reuse patterns from routes/ or tokenTransfers/ for data-heavy features
  4. hooks/ui/ - Generic UI hooks

    • useModal.ts - Modal state management
  5. hooks/redux/ - Redux state management hooks

    • useTransactionQueue.ts - Transaction queue management

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Yarn (required, not npm)
  • Git

Installation

# Clone the repository
git clone https://github.com/wrytes/wrytes-app.git
cd wrytes-app

# Install dependencies
yarn install

# Copy environment variables
cp .env.example .env.local

# Configure your environment variables
# Edit .env.local with your API keys and endpoints

# Start development server
yarn dev

Environment Setup

Create .env.local from .env.example and configure:

# API Configuration
NEXT_PUBLIC_APP_URL=https://wrytes.io
NEXT_PUBLIC_API_URL=https://api.wrytes.io
NEXT_PUBLIC_INDEXER_URL=https://indexer.wrytes.io
NEXT_PUBLIC_DERIBIT_AGENT_URL=https://deribit-agent.api.wrytes.io

# Web3 Configuration
NEXT_PUBLIC_REOWN_PROJECT_ID=your_project_id_here
NEXT_PUBLIC_RPC_URL=your_alchemy_api_key

# Optional: App Analytics
NEXT_PUBLIC_UMAMI_URL=https://analytics.wrytes.io
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your_umami_website_id

πŸ“œ Available Scripts

Development

yarn dev          # Start development server (with Turbopack)
yarn build        # Build for production
yarn start        # Start production server
yarn type-check   # TypeScript type checking

Code Quality

yarn lint         # Run ESLint
yarn lint:fix     # Fix ESLint errors automatically
yarn format       # Format code with Prettier
yarn format:check # Check code formatting

Analysis

yarn analyze      # Analyze bundle size

πŸ—οΈ Architecture Overview

Component Architecture

  • Feature-Based Organization - Components grouped by business domain
  • Composition Pattern - Reusable component composition
  • Custom Hooks - Business logic extraction from components
  • TypeScript Interfaces - Comprehensive type definitions

State Management

  • Redux Toolkit - Global application state (transactions, user preferences, queue management)
  • Apollo Client Cache - GraphQL data caching and normalization
  • React Context - Authentication and namespace management
  • Local State - Component-level UI state

Data Flow

User Action β†’ Component β†’ Custom Hook/Adapter β†’ API/Contract β†’ Apollo Cache/Redux β†’ UI Update

πŸ” Authentication System

Wrytes uses wallet-based authentication with Telegram as a second factor β€” there are no passwords.

Login Flow

  1. User connects a wallet (MetaMask, WalletConnect, Coinbase, Safe)
  2. Backend issues a one-time challenge message with a nonce
  3. User signs the message with their wallet (no gas required)
  4. A request is sent to the user's linked Telegram account for approval; the app polls until it's approved, denied, or times out
  5. Once approved, the backend issues a JWT (scopes included) and the frontend stores it locally

Scope-Based Access Control

  • Each account holds an array of scopes encoded in its JWT
  • ADMIN bypasses all scope checks and grants full access
  • Named feature scopes gate individual sections via <RequireScope> at the component level

See the in-app Authentication and Access Control docs for full detail.

πŸš€ Feature Development Guidelines

New Feature Implementation Pattern:

  1. Create Feature Directory:

    components/features/[featureName]/
    β”œβ”€β”€ index.ts              # Feature exports
    β”œβ”€β”€ types.ts              # Feature-specific types
    β”œβ”€β”€ [FeatureName].tsx     # Main feature component
    └── [sub-components].tsx  # Feature sub-components
    
  2. Create Feature Hooks:

    hooks/[feature]/
    β”œβ”€β”€ index.ts              # Hook exports
    β”œβ”€β”€ use[Feature]Data.ts   # Data fetching
    └── use[Feature]Actions.ts # Feature actions
    
  3. Add to Navigation:

    lib/navigation/[section].ts
    
  4. Follow Existing Patterns:

    • Use routes/ or tokenTransfers/ as reference for data-heavy features
    • Reuse ui/ components extensively

Feature Integration Checklist:

  • Reuse existing UI components from components/ui/
  • Create feature-specific hooks in hooks/[feature]/
  • Add to navigation system
  • Implement proper loading states
  • Add error boundaries
  • Include proper TypeScript types
  • Add to Redux if global state needed
  • Integrate with transaction queue system if transactions required

🀝 Contributing

We welcome contributions from the community! Please read our contributing guidelines:

Development Setup

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (yarn type-check && yarn lint)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Standards

  • TypeScript strict mode - No any types
  • ESLint + Prettier - Consistent code formatting
  • Comprehensive type definitions - Full type safety
  • Component testing - Test critical functionality
  • Component reusability - Always check existing components first

πŸ“„ License

This project is proprietary software of Wrytes AG. All rights reserved.

πŸ“ž Contact & Support

Wrytes AG

Development Team

  • πŸ”§ Technical Issues: Create an issue on GitHub
  • πŸ’‘ Feature Requests: Create an issue on GitHub
  • πŸ› Bug Reports: hello@wrytes.io

Built with πŸ‡¨πŸ‡­ Swiss precision by Wrytes AG

Software Development & Distributed Ledger Technologies & AI

Remember: This is an R&D Platform for Profit-Driven Innovation

This platform serves Wrytes AG's core mission: using proprietary Bitcoin trading strategies to fund continuous blockchain research and development. Every technical decision should consider:

  1. How does this serve our R&D and trading operations?
  2. Can this pattern be reused for future research tools?
  3. Is this component generic enough for multiple business functions?
  4. Does this maintain Swiss precision and quality standards?
  5. How will this scale as our research and business operations grow?

Think software-development-first, research-driven-innovation, technical-excellence-always.

About

Software Development Platform for Distributed Ledger Technologies. Supports multiple protocols with institutional-grade tools for blockchain R&D and asset management.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages