Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
1ef919e
Enhance DashboardStats styling and layout for improved UI/UX
msteiner96 Mar 18, 2025
50eba3d
Refactor SidebarNavigation styles for improved responsiveness and vis…
msteiner96 Mar 19, 2025
cc7fbcc
Refactor styles and layout for improved consistency and visual appeal…
msteiner96 Mar 19, 2025
f7f8e23
Fix build
msteiner96 Mar 19, 2025
b1b35e1
Refactor UI components for improved styling consistency and responsiv…
msteiner96 Mar 19, 2025
8435166
Refactor HelpCenter and Transactions components for improved styling …
msteiner96 Mar 19, 2025
4912456
Refactor AssetInfoModal and CryptoCTA components for improved styling…
msteiner96 Mar 19, 2025
a63367e
Enhance tooltip styling in FinancialChart for improved visual appeal …
msteiner96 Mar 19, 2025
8c41fbe
Increase gap in Grid component for improved layout spacing
msteiner96 Mar 19, 2025
9d22b19
Refactor Button component for improved styling and hover effects
msteiner96 Mar 21, 2025
7a21f02
Refactor Page component layout for improved responsiveness and structure
msteiner96 Mar 22, 2025
beea1cd
Refactor layout in Page component and FinancialChart for improved res…
msteiner96 Mar 22, 2025
9678d0f
Update Grid component height to 'auto' for improved layout flexibility
msteiner96 Mar 22, 2025
8cabe60
Add unique ticker filtering to API response for getTickers method
msteiner96 Mar 22, 2025
a24da2b
Enhance layout of FinancialChart container for better flexibility and…
msteiner96 Mar 22, 2025
24dc143
Refactor VolumeChart component to use CustomDropdown for pool selecti…
msteiner96 Mar 22, 2025
a868a89
Change display style in Page component from 'flex' to 'inline-flex' f…
msteiner96 Mar 22, 2025
553226a
Merge branch 'main' into improve-components
msteiner96 Mar 23, 2025
5fb1041
Update VolumeChart component to adjust grid stroke properties for imp…
msteiner96 Mar 25, 2025
b30f388
Add Earn page and update SideNav with new Earn section
msteiner96 Mar 25, 2025
210e0e5
Refactor SwapContainer layout for improved responsiveness and user in…
msteiner96 Mar 25, 2025
98b4287
Add Earn page components and stories for YieldSummary, StrategiesTabl…
msteiner96 Mar 25, 2025
97e0b4f
Update Earn page layout and component names for clarity and improved …
msteiner96 Mar 25, 2025
0e282dd
Enhance FilterBar component with improved placeholder handling and st…
msteiner96 Mar 25, 2025
8239a7f
Refactor Earn page strategies to support multiple assets and update r…
msteiner96 Mar 25, 2025
39f6b05
Refactor strategies to support multiple assets and update reward toke…
msteiner96 Mar 25, 2025
f59a31c
Update StrategiesTable stories to use numeric unbondTime values for c…
msteiner96 Mar 25, 2025
1d17e09
Update EarnPage to use numeric unbondTime values for consistency
msteiner96 Mar 25, 2025
5bf3ea8
Add mobile support and bond/unbond functions to EarnPage and Strategi…
msteiner96 Mar 25, 2025
11713ad
Add new components and update theme for improved UI consistency
msteiner96 Mar 25, 2025
eabf682
Update ConnectWallet component to use gradient color for box shadow e…
msteiner96 Mar 25, 2025
a8bf9ad
Refactor SlippageSettings to use numeric options and update related c…
msteiner96 Mar 25, 2025
f70a2b7
Refactor SlippageSettings to improve input validation and handle nume…
msteiner96 Mar 25, 2025
049d509
Add wallet icons and update AssetInfoModal to include user balance an…
msteiner96 Mar 25, 2025
1eb14bf
Enhance WalletBalanceTable with hover effects and click handling for …
msteiner96 Mar 25, 2025
6ebe5db
Add userBalance and pools props to TokenInfoModal for improved data h…
msteiner96 Mar 25, 2025
7d6a0f1
Refactor TransactionsTable to enhance FilterMenu with default asset v…
msteiner96 Mar 25, 2025
3ff3ccb
Update NextJS to 15.2
msteiner96 Mar 25, 2025
896f846
Remove problematic resolveAlias configuration from turbo in next.conf…
msteiner96 Mar 25, 2025
db501f3
Refactor TransactionsTable to streamline FilterMenu by removing defau…
msteiner96 Mar 25, 2025
1c22c72
Add React imports and Storybook configuration for improved component …
msteiner96 Mar 25, 2025
a1b48bc
Add framer-motion dependency to enhance animation capabilities
msteiner96 Mar 26, 2025
e7bd18f
Add ClientOnly component for client-side rendering and improve RootLa…
msteiner96 Mar 26, 2025
add08fa
Fix loading state management in SwapPage and ensure pools data loads …
msteiner96 Mar 26, 2025
a6a1b31
Enhance welcome banner styling and layout in Page component for impro…
msteiner96 Mar 26, 2025
14e496c
Refactor toast handling by integrating UI library's ToastProvider and…
msteiner96 Mar 26, 2025
c6a7e2d
Update welcome message and description in Page component for clarity …
msteiner96 Mar 26, 2025
dc250c1
Refactor useEffect dependencies and enhance type safety in ToastProvi…
msteiner96 Mar 26, 2025
7e16f35
Integrate TradeAPI for price fetching and enhance error handling in g…
msteiner96 Mar 26, 2025
c32d915
Update Page component styling and background image for enhanced visua…
msteiner96 Mar 26, 2025
b43be61
Enhance AssetInfoModal with loading state and trading volume data; ex…
msteiner96 Apr 3, 2025
8e2094d
Fix calculation of total volume in AssetInfoModal by removing unneces…
msteiner96 Apr 3, 2025
b0781c5
Add strategies package with TypeScript configuration, registry, and m…
msteiner96 Apr 16, 2025
b73c416
Add Phoenix strategies and provider; export additional components and…
msteiner96 May 7, 2025
f3ce097
Update liquidity strategies to set unbondTime to 0 and include XLM-US…
msteiner96 May 7, 2025
2daa864
Add IndividualStake interface and update StrategiesTable for bond/unb…
msteiner96 May 9, 2025
9c9c1b2
Adjust strategy features
msteiner96 May 15, 2025
a26f2f2
Adjust modal styles
msteiner96 May 15, 2025
ff71bea
Add setup script, update package configurations, and integrate Turbor…
msteiner96 May 22, 2025
b8b7a69
Update package.json and yarn.lock to ensure correct dependency versio…
msteiner96 May 22, 2025
8e2bffe
Add @phoenix-protocol/types as a dependency in package.json
msteiner96 May 22, 2025
dd3e11d
Update package.json and yarn.lock to consolidate @phoenix-protocol/ty…
msteiner96 May 23, 2025
60c2942
Update test scripts to prevent execution errors across packages
msteiner96 May 23, 2025
1d0c3c8
Update documentation across packages to enhance clarity and detail, i…
msteiner96 May 23, 2025
63bbad1
Update packages/core/hooks/useContractTransaction.tsx
msteiner96 May 23, 2025
4431c6f
Update packages/core/app/help-center/page.tsx
msteiner96 May 23, 2025
4b4e72e
Add @phoenix-protocol/strategies dependency to package.json
msteiner96 May 27, 2025
27d356d
Fix missing dependency array in useCallback for data fetching
msteiner96 May 27, 2025
bfc5a63
Fix dependency array in useCallback for proper loading state management
msteiner96 May 27, 2025
af501b2
Refactor phoenix-vesting contract: Update error codes, add new interf…
msteiner96 May 27, 2025
564d75b
Update tsconfig.json and page.tsx: Add module option and set auto_sta…
msteiner96 May 27, 2025
1a1df98
Add auto_stake and auto_unstake options to liquidity strategies for X…
msteiner96 May 27, 2025
fab2bf2
Enhance user stake management: Store detailed individual stakes for u…
msteiner96 May 27, 2025
48bb314
Fix package.json and yarn.lock: Ensure correct workspace references f…
msteiner96 May 27, 2025
2e8d7fc
Add custom transaction fee option to useContractTransaction hook
msteiner96 May 27, 2025
9d9b0e0
Refactor StrategyEntry component: Simplify Grid item layout and clean…
msteiner96 May 27, 2025
5ccaaa1
Enhance StrategyEntry component: Update APR display to include "Up to…
msteiner96 May 27, 2025
ad843ee
Refactor layout styles: Change display property to flex and set width…
msteiner96 May 28, 2025
1098a31
Add trade size and value filters to FilterMenu component
msteiner96 May 28, 2025
3b3b551
Improve ConnectWallet component: Manage connector state more effectiv…
msteiner96 May 28, 2025
eb20636
Update background styles: Change gradient to radial for improved visu…
msteiner96 May 28, 2025
65833c9
Refactor AssetInfoModal and CustomDropdown components: Improve stylin…
msteiner96 May 29, 2025
e720a8c
Enhance BondModal component: Fetch user token balances on modal open,…
msteiner96 Jun 4, 2025
b25b20c
feat: Enhance wallet actions and UI components
msteiner96 Jun 5, 2025
4b3f135
fix: Update ListItem component to handle XLM token interactions and i…
msteiner96 Jun 5, 2025
a5bc789
feat: Enhance SwapPage and SwapContainer components with improved tok…
msteiner96 Jun 5, 2025
8a613c6
feat: Enhance SwapPage and SwapContainer components with improved ope…
msteiner96 Jun 5, 2025
895ccfe
feat: Enhance Pools Page with TVL Calculation and UI Improvements
msteiner96 Jun 5, 2025
ea35f50
feat: Revamp Transaction History Page with Enhanced UI, Animation Eff…
msteiner96 Jun 5, 2025
46d692f
Enhance UI components and improve styling across the PoolSingle module
msteiner96 Jun 5, 2025
093c661
feat: Update liquidity strategies to enhance unbonding logic and impr…
msteiner96 Jun 5, 2025
918d3c6
feat: Optimize loading state management and enhance UI responsiveness…
msteiner96 Jun 5, 2025
d721239
feat: Refactor StakingList component for improved styling and structure
msteiner96 Jun 5, 2025
bec45bd
Merge branch 'main' into improve-components
msteiner96 Jun 5, 2025
936bb6b
feat: Update GlowingChart colors to enhance visual appeal
msteiner96 Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NextJS
SKIP_NODE_VERSION_CHECK=1

# Turborepo
TURBO_TEAM=phoenix-protocol
TURBO_TOKEN=your-token-here

# Build Options
NODE_ENV=development
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ next-env.d.ts

.idea/

.yarn/cache
.yarn/cache

.turbo
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.14.0
Binary file modified .yarn/install-state.gz
Binary file not shown.
97 changes: 88 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Phoenix Frontend

Phoenix Frontend is built with TypeScript and leverages yarn workspaces for package management. You'll find multiple packages in the `/packages` directory, each serving a unique function in the overall application ecosystem.
Phoenix Frontend is built with TypeScript and leverages yarn workspaces for package management. You'll find multiple packages in the `/packages` directory, each serving a unique function in the overall application ecosystem. The project is optimized with Turborepo for efficient monorepo management.

## Packages

Expand All @@ -22,21 +22,100 @@ Housing a range of utility and helper functions, the `Utils` package offers a on

### [Core](https://github.com/Phoenix-Protocol-Group/phoenix-frontend/tree/main/packages/core)

As the heart of the application, the `Core` package orchestrates the UI, state management, and utility functions. It's built on Next.js and serves as the primary entry point, setting the architectural groundwork and facilitating inter-package interactions.
As the heart of the application, the `Core` package orchestrates the UI, state management, and utility functions. It's built on Next.js 15 and serves as the primary entry point, setting the architectural groundwork and facilitating inter-package interactions.

### [Contracts](https://github.com/Phoenix-Protocol-Group/phoenix-frontend/tree/main/packages/contracts)

The `Contracts` package provides generated contract classes and associated types, created through Soroban bindings. For more information, refer to [Soroban's documentation](https://soroban.stellar.org/docs/getting-started/create-an-app#generate-an-npm-package-for-the-hello-world-contract).

### [Types](https://github.com/Phoenix-Protocol-Group/phoenix-frontend/tree/main/packages/types)

The `Types` package contains TypeScript type definitions used throughout the Phoenix Frontend ecosystem, ensuring type consistency across all packages.

### [Strategies](https://github.com/Phoenix-Protocol-Group/phoenix-frontend/tree/main/packages/strategies)

The `Strategies` package serves as a strategy provider registry for the Phoenix DeFi ecosystem, offering modular and extensible strategy implementations.

## Quick Start

1. Clone the repo locally.
2. Make sure Node.js and yarn are installed.
3. Cd into the project root.
4. Run `yarn install`.
5. Navigate to the package you're interested in under `/packages`.
6. Check the package-specific readme for setup and usage instructions.
### Setup Script

The easiest way to get started is to use the provided setup script:

```bash
./setup.sh
```

This script will:

1. Check for the correct Node.js version
2. Create a local environment file
3. Install dependencies
4. Build the required packages

### Development with Turborepo

This project uses Turborepo for efficient monorepo management. It optimizes builds, provides incremental builds, and manages dependencies between packages.

```bash
# Install dependencies
yarn install

# Start development with watch mode for all packages
yarn dev

# Run only the core app (Next.js)
yarn dev:core

# Run experimental features (if available)
yarn dev:experimental

# Run only the UI package development
yarn dev:ui

# Build all packages
yarn build

# Build specific packages
yarn build:core # Build the core Next.js app
yarn build:contracts # Build the contracts package
yarn build:state # Build the state package
yarn build:ui # Build the UI package
yarn build:utils # Build the utils package
yarn build:types # Build the types package
yarn build:strat # Build the strategies package

# Run Storybook for the UI package
yarn storybook
```

#### Understanding the Development Process

When you run `yarn dev`, Turborepo will:

1. Build all necessary dependencies in the correct order
2. Start watch mode for all packages, rebuilding them when files change
3. Start the Next.js development server for the core package

This means you can edit files in any package, and changes will automatically be reflected in the running application without manual rebuilds.

## Project Structure

- `/packages/core` - Next.js application (main entry point)
- `/packages/ui` - UI component library based on Material UI
- `/packages/state` - State management with Zustand
- `/packages/utils` - Utility functions
- `/packages/types` - TypeScript type definitions
- `/packages/contracts` - Generated Soroban contract bindings
- `/packages/strategies` - Strategy provider registry for Phoenix DeFi
- `/schemas` - JSON schemas for project configuration

## Requirements

- Node.js (version specified in .nvmrc)
- Yarn package manager
- Git

## Reach Out

Questions, feedback, or suggestions? Feel free to connect with our dev team. We value your input!
Questions, feedback, or suggestions? Feel free to connect with our dev team via [GitHub Issues](https://github.com/Phoenix-Protocol-Group/phoenix-frontend/issues). We value your input!
30 changes: 20 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
"description": "The Phoenix Frontend is a TypeScript-based web application utilizing yarn workspaces. It includes a UI kit (MUI-based), state management, utility functions, and a core package for seamless integration. It's written to use it with phoenix-contracts on Stellar's soroban platform.",
"version": "0.0.1",
"scripts": {
"test": "yarn workspace @phoenix-protocol/utils run test --passWithNoTests",
"build": "yarn workspace @phoenix-protocol/types run build && yarn workspace @phoenix-protocol/utils run build && yarn workspace @phoenix-protocol/contracts run build && yarn workspace @phoenix-protocol/state run build && yarn workspace @phoenix-protocol/ui run build && yarn workspace @phoenix-protocol/core run build",
"test": "turbo run test",
"build": "turbo run build",
"storybook": "yarn workspace @phoenix-protocol/ui storybook",
"dev": "yarn workspace @phoenix-protocol/core dev",
"build:core": "yarn workspace @phoenix-protocol/core build",
"build:contracts": "yarn workspace @phoenix-protocol/contracts build",
"build:state": "yarn workspace @phoenix-protocol/state build",
"build:ui": "yarn workspace @phoenix-protocol/ui build",
"build:utils": "yarn workspace @phoenix-protocol/utils build",
"build:types": "yarn workspace @phoenix-protocol/types build"
"dev": "turbo run dev",
"dev:core": "turbo run dev --filter=@phoenix-protocol/core",
"dev:ui": "turbo run dev --filter=@phoenix-protocol/ui",
"dev:experimental": "yarn workspace @phoenix-protocol/core dev:experimental",
"build:core": "turbo run build --filter=@phoenix-protocol/core",
"build:contracts": "turbo run build --filter=@phoenix-protocol/contracts",
"build:state": "turbo run build --filter=@phoenix-protocol/state",
"build:ui": "turbo run build --filter=@phoenix-protocol/ui",
"build:utils": "turbo run build --filter=@phoenix-protocol/utils",
"build:types": "turbo run build --filter=@phoenix-protocol/types",
"build:strat": "turbo run build --filter=@phoenix-protocol/strategies"
},
"repository": {
"type": "git",
Expand All @@ -36,14 +40,20 @@
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
"@types/jest": "^29.5.2",
"jest": "^29.5.0"
"concurrently": "^9.1.2",
"jest": "^29.5.0",
"turbo": "^2.5.3"
},
"packageManager": "[email protected]",
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@stellar/stellar-sdk": "^13.1.0",
"@storybook/react-webpack5": "^8.6.9",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.13.1",
"@walletconnect/types": "^2.13.1",
"framer-motion": "^12.6.0",
"next": "15.0.3"
}
}
5 changes: 3 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"buffer": "6.0.3"
},
"scripts": {
"test": "tsc && jest",
"build": "tsc"
"test": "echo \"Error: no test specified\" && exit 0",
"build": "tsc",
"dev": "tsc --watch"
},
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
64 changes: 54 additions & 10 deletions packages/contracts/readme.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
# Contracts Package for Phoenix Frontend

The `Contracts` package is part of the larger Phoenix Frontend ecosystem and serves as a repository for generated contract classes and their associated types. This package is generated using [Soroban bindings](https://soroban.stellar.org/docs/getting-started/create-an-app#generate-an-npm-package-for-the-hello-world-contract).
The `Contracts` package is part of the larger Phoenix Frontend ecosystem and serves as a repository for generated contract classes and their associated types. This package is generated using [Soroban bindings](https://soroban.stellar.org/docs/getting-started/create-an-app#generate-an-npm-package-for-the-hello-world-contract) for seamless integration with the Stellar Soroban platform.

## Features

- Generated contract classes for seamless integration with blockchain platforms.
- Types associated with each contract class for type safety.
- Soroban bindings for compatibility and extendibility.
- Generated contract classes for Phoenix Protocol contracts
- TypeScript types for contract interactions
- Soroban bindings for the Stellar blockchain
- Predefined contract interaction methods
- Helper functions for interacting with Phoenix protocol

## Included Contracts

- `phoenix-factory` - Factory contract for creating and managing token pairs
- `phoenix-multihop` - Contract for multi-hop swaps between different token pairs
- `phoenix-pair` - Liquidity pair contract for token swaps
- `phoenix-stake` - Staking contract for liquidity provider rewards
- `phoenix-vesting` - Vesting contract for token distribution
- `soroban-token` - Token contract implementation for Soroban

## Installation

Navigate to the `Contracts` directory within the `/packages` directory of the main Phoenix Frontend project:
Navigate to the root directory of the Phoenix Frontend project:

```bash
cd path-to-your-project/packages/Contracts
cd /path/to/phoenix/frontend
```

Run the following command to install all dependencies:
Expand All @@ -22,16 +33,49 @@ Run the following command to install all dependencies:
yarn install
```

Build the contracts package:

```bash
yarn build:contracts
```

## Usage

After installation, you can import the contract classes and types into your project as needed.
After installation, you can import the contract classes and types into your project as needed:

```typescript
import { ContractClassName } from '@phoenix-frontend/contracts';
import {
PhoenixPairClient,
PhoenixFactoryClient,
PhoenixMultihopClient,
} from "@phoenix-protocol/contracts";

// Initialize a contract client
const pairClient = new PhoenixPairClient({
contractId: "your_contract_id",
networkPassphrase: "your_network_passphrase",
rpcUrl: "your_rpc_url",
});

// Interact with the contract
const poolInfo = await pairClient.getPoolInfo();
```

Refer to the main Phoenix Frontend readme for guidance on how this package interacts with the other packages in the ecosystem.
## Fetching PHO Token

This package also includes a utility for fetching PHO tokens from the faucet:

```typescript
import { fetchPho } from "@phoenix-protocol/contracts";

// Fetch PHO tokens to your wallet
await fetchPho(walletPublicKey);
```

## Additional Resources

For more information on generating contract classes and types, refer to the [Soroban documentation](https://soroban.stellar.org/docs/getting-started/create-an-app#generate-an-npm-package-for-the-hello-world-contract).
For more information on Soroban contracts and Stellar development:

- [Soroban Documentation](https://soroban.stellar.org/docs)
- [Stellar Developers Guide](https://developers.stellar.org/docs)
- [Phoenix Protocol Documentation](https://docs.phoenix-protocol.io)
Loading
Loading