<<<<<<< HEAD
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.
- 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
.
├── 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
- Node.js 18.x or later
- pnpm 7.x or later
- Aptos CLI (for contract deployment)
- Git
-
Clone the repository
git clone https://github.com/your-username/accordfolio-aptos.git cd accordfolio-aptos -
Install dependencies
# Install web dependencies cd web pnpm install
-
Set up environment variables
# Copy the example environment file cp .env.example .env.localUpdate the values in
.env.localwith your configuration. -
Run the development server
pnpm dev
Open http://localhost:3000 in your browser.
-
Install Aptos CLI Follow the instructions at Aptos CLI Installation.
-
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.
- Smart Contract Architecture
- Frontend Development Guide
- API Reference (Coming Soon)
- Deployment Guide (Coming Soon)
We welcome contributions from the community! Please read our Contributing Guidelines to get started.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, questions, or feature requests, please open an issue or join our Discord community.
Frontend for AccordFolio - A tokenized basket protocol on Aptos.
- 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
- Node.js 16.14 or later
- pnpm 7.x or later
- Aptos wallet browser extension (Petra, Martian, or Pontem)
-
Install Dependencies
pnpm install
-
Set Up Environment Variables
Copy
.env.exampleto.env.localand update the variables:cp .env.example .env.local
-
Run the Development Server
pnpm dev
Open http://localhost:3000 with your browser to see the result.
-
Build for Production
pnpm build pnpm start
| 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 | `` |
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
- Framework: Next.js 14 with App Router
- UI: Tailwind CSS
- Wallet: @aptos-labs/wallet-adapter-react
- State Management: Zustand
- Form Handling: React Hook Form
- Data Fetching: TanStack Query
- Type Safety: TypeScript
- Testing: Jest + React Testing Library
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue or join our Discord.
d6c4295d457cc43a66662405aa7fc14a36a3e466
