Skip to content

paucotan/btc-minotaur-simulator

Repository files navigation

BTC Minotaur Investment Simulator

A beautiful, interactive web application for simulating BTC Minotaur investment scenarios. Visualize the compounding power of algorithmic trading combined with Bitcoin's growth trajectory.

Features

  • 🎨 Modern UI: Built with React, TypeScript, and Tailwind CSS
  • 📊 Interactive Charts: Beautiful visualizations using Recharts
  • 🎯 Real-time Calculations: Instant simulation results as you adjust parameters
  • 💰 Comprehensive Metrics: KPI cards showing key investment metrics
  • 🎭 Smooth Animations: Framer Motion for polished user experience
  • 📱 Responsive Design: Works beautifully on desktop and mobile

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • Backend: Express.js + TypeScript
  • Styling: Tailwind CSS + shadcn/ui components
  • Charts: Recharts
  • Animations: Framer Motion
  • Database: PostgreSQL (optional - uses in-memory storage if not configured)

Prerequisites

  • Node.js 18+ and npm
  • (Optional) PostgreSQL database for saving simulations

Installation

  1. Clone or navigate to the project directory

    cd "Minotaur-Sim (replit)"
  2. Install dependencies

    npm install
  3. Set up environment variables (optional)

    cp .env.example .env

    Edit .env and add your database URL if you want to save simulations:

    DATABASE_URL=postgresql://user:password@localhost:5432/minotaur_sim

    Note: The app works without a database! Without DATABASE_URL, simulations will use in-memory storage (data is lost on server restart, but calculations work perfectly).

  4. Set up database (optional - only if you want to save simulations)

    If you want to persist simulations, set up PostgreSQL:

    # Create database
    createdb minotaur_sim
    
    # Run migrations
    npm run db:push

Running the Application

Development Mode

npm run dev

The app will be available at http://localhost:3000

Production Build

npm run build
npm start

Usage

  1. Enter Parameters:

    • Initial BTC Stack
    • Current BTC Price (USD)
    • Bot Monthly Return (%)
    • Annual BTC Growth (%)
    • Total Fees (USD)
    • Duration (Months)
  2. Click "Run Simulation" to see results

  3. View Results:

    • KPI cards showing key metrics
    • Interactive charts showing portfolio growth
    • Hover over chart points for detailed information

Project Structure

├── client/              # React frontend
│   └── src/
│       ├── components/  # UI components
│       ├── hooks/       # Custom React hooks
│       ├── pages/       # Page components
│       └── lib/          # Utilities
├── server/              # Express backend
│   ├── routes.ts        # API routes
│   ├── db.ts            # Database connection
│   └── storage.ts        # Data storage layer
├── shared/              # Shared types and schemas
└── package.json         # Dependencies and scripts

API Endpoints

  • POST /api/simulation/calculate - Calculate simulation
  • POST /api/simulation/save - Save simulation (requires database)
  • GET /api/simulation/list - List saved simulations (requires database)

Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run check - Type check with TypeScript
  • npm run db:push - Push database schema changes

Environment Variables

Variable Description Required Default
PORT Server port No 3000
NODE_ENV Environment mode No development
DATABASE_URL PostgreSQL connection string No (uses in-memory storage)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT

Disclaimer

This simulation is for educational purposes only. Past performance does not guarantee future results. The Power Law model is a theoretical projection and market conditions vary.

About

Interactive BTC Minotaur investment simulator with modern React UI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published