Skip to content

0xrupamp34/AccordFolio

Repository files navigation

<<<<<<< HEAD

AccordFolio - Tokenized Baskets on Aptos

AccordFolio Banner

AccordFolio is a decentralized application (dApp) built on the Aptos blockchain that allows users to invest in tokenized baskets of digital assets. With AccordFolio, users can easily diversify their crypto portfolios, set up systematic investment plans (SIP), and benefit from automated rebalancing based on predefined allocation targets.

🌟 Features

  • Tokenized Baskets: Invest in diversified portfolios with a single transaction
  • Automated Rebalancing: Maintain target allocations with minimal effort
  • Systematic Investment Plans (SIP): Dollar-cost average into your favorite baskets
  • Price Oracle Integration: Real-time price feeds via Pyth Network
  • Gas-Efficient Swaps: Optimal routing through Hippo Aggregator
  • Verifiable Proofs: Transparent and auditable on-chain operations
  • User-Friendly Interface: Intuitive UI/UX for both beginners and advanced users

🏗️ Project Structure

.
├── contracts/           # Move smart contracts
│   ├── sources/         # Core contract logic
│   └── Move.toml        # Move package configuration
├── web/                 # Next.js frontend
│   ├── src/             # Source code
│   │   ├── app/         # App router pages and layouts
│   │   ├── components/  # Reusable UI components
│   │   ├── config/      # App configuration
│   │   └── lib/         # Utility functions
│   └── public/          # Static assets
├── backend/             # Node.js backend API (Coming Soon)
├── indexer/             # Rust indexer (Coming Soon)
├── .env.example         # Example environment variables
└── README.md            # This file

🚀 Quick Start

Prerequisites

  • Node.js 18.x or later
  • pnpm 7.x or later
  • Aptos CLI (for contract deployment)
  • Git

Local Development

  1. Clone the repository

    git clone https://github.com/your-username/accordfolio-aptos.git
    cd accordfolio-aptos
  2. Install dependencies

    # Install web dependencies
    cd web
    pnpm install
  3. Set up environment variables

    # Copy the example environment file
    cp .env.example .env.local

    Update the values in .env.local with your configuration.

  4. Run the development server

    pnpm dev

    Open http://localhost:3000 in your browser.

Deploying Smart Contracts

  1. Install Aptos CLI Follow the instructions at Aptos CLI Installation.

  2. Deploy contracts

    # Make the deployment script executable
    chmod +x deploy_contracts.sh
    
    # Run the deployment script
    ./deploy_contracts.sh

    Follow the prompts to complete the deployment.

📚 Documentation

🤝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines to get started.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙋 Support

For support, questions, or feature requests, please open an issue or join our Discord community.

🌟 Acknowledgements

AccordFolio

Frontend for AccordFolio - A tokenized basket protocol on Aptos.

Features

  • Connect with Aptos wallets (Petra, Martian, Pontem, Rise)
  • Browse and invest in pre-defined token baskets
  • Create custom token baskets with custom allocations
  • View portfolio performance and history
  • Automatic rebalancing of baskets
  • Price feeds integration with Pyth Network
  • Transaction history and receipts

Prerequisites

  • Node.js 16.14 or later
  • pnpm 7.x or later
  • Aptos wallet browser extension (Petra, Martian, or Pontem)

Getting Started

  1. Install Dependencies

    pnpm install
  2. Set Up Environment Variables

    Copy .env.example to .env.local and update the variables:

    cp .env.example .env.local
  3. Run the Development Server

    pnpm dev

    Open http://localhost:3000 with your browser to see the result.

  4. Build for Production

    pnpm build
    pnpm start

Environment Variables

Variable Description Required Default
NEXT_PUBLIC_APTOS_NETWORK Aptos network to connect to (devnet, testnet, mainnet) Yes devnet
NEXT_PUBLIC_BASKET_CORE_ADDRESS Address of the deployed BasketCore contract Yes ``
NEXT_PUBLIC_BASKET_SHARE_ADDRESS Address of the BasketShare contract Yes ``
NEXT_PUBLIC_INDEXER_URL URL of the AccordFolio indexer No http://localhost:3001
NEXT_PUBLIC_PYTH_APT_USD_FEED_ID Pyth price feed ID for APT/USD Yes ``
NEXT_PUBLIC_PYTH_USDC_USD_FEED_ID Pyth price feed ID for USDC/USD Yes ``
NEXT_PUBLIC_PYTH_BTC_USD_FEED_ID Pyth price feed ID for BTC/USD Yes ``

Project Structure

src/
├── app/                    # App Router pages and layouts
│   ├── api/               # API routes
│   ├── components/        # Reusable UI components
│   ├── config/            # App configuration
│   ├── contexts/          # React contexts
│   ├── hooks/             # Custom React hooks
│   ├── lib/               # Utility functions
│   ├── styles/            # Global styles
│   └── types/             # TypeScript type definitions
├── public/                # Static files
│   ├── images/            # Image assets
│   └── tokens/            # Token icons
└── tests/                 # Test files

Tech Stack

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please open an issue or join our Discord.

d6c4295d457cc43a66662405aa7fc14a36a3e466

About

A non‑custodial crypto basket on Aptos: buy one token for a diversified mix, set weekly auto‑invest (SIP/DCA), auto‑rebalance to target weights, and get on‑chain receipts for every action.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors