# Run Locally

The official website that you can run locally is available here ⇒ <https://tap-5.vercel.app/>

### Run the frontend locally

You need to:

* clone the repo
* install dependencies (e.g. with pnpm)
* configure environment variables (PostgreSQL database, API keys for 1inch and DeBank)
* setup the Prisma database schema, and start the dev server on port 3000.

Repository is available here ⇒ <https://github.com/fberger-xyz/tycho-tap5-front>

### **Tech Stack**

* TypeScript&#x20;
* Next.js&#x20;
* React
* TailwindCSS (styling)
* Prisma (PostgreSQL ORM)
* pnpm (package manager)

### Local Setup

1. Clone or fork the repository (or fork on GitHub first, then clone your fork)

```
git clone https://github.com/fberger-xyz/tycho-tap5-front.git
cd tycho-tap5-front
```

2. Install dependencies

```
pnpm install
```

3. Setup environment variables

```
cp .env.example .env
```

* **Required variables in .env**
  * DATABASE\_URL - PostgreSQL connection string
    * E.g. `postgresql://user:password@localhost:5432/tycho`
    * Expected database schema (Prisma models):
      * Configuration - Strategy configs with fields: id, chainId, baseTokenAddress, quoteTokenAddress, baseTokenSymbol, quoteTokenSymbol, values (JSON), hash
        * Instance - Running strategy instances with fields: id, configurationId, config (JSON), startedAt, endedAt, commit, identifier
        * Trade - Trade records with fields: id, instanceId, values (JSON), createdAt, updatedAt
        * Price - Price data with fields: id, instanceId, value (JSON), createdAt, updatedAt
  * ONEINCH\_API\_KEY - API key from <https://portal.1inch.dev/> for price candles
  * DEBANK\_ACCESS\_KEY - API key from <https://docs.cloud.debank.com/> for wallet data
  * NEXT\_PUBLIC\_APP\_URL - Your local URL (typically <http://localhost:3000>)
* **Optional variables**
  * INFURA\_API\_KEY - Infura RPC provider
  * ALCHEMY\_API\_KEY - Alchemy RPC provider
  * NEXT\_PUBLIC\_GOOGLE\_ANALYTICS\_ID - Google Analytics tracking

4. **Setup database**

This generates Prisma client and runs migrations

```sh
pnpm db:setup
## Or run separately
pnpm prisma:generate # Generate Prisma client pnpm prisma:migrate # Run migrations
```

5. **Run development server**

<pre><code><strong>pnpm dev        
</strong></code></pre>

Frontend should run on <http://localhost:3000> !

For each strategy, you will see a full dashboard like this:

<figure><img src="https://755909824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh5Z828Hh3eHrVg9DlmPO%2Fuploads%2FGBTJr6R4txekoSP9gpyv%2FScreenshot%202025-11-03%20at%2013.03.28.png?alt=media&#x26;token=8cbf2344-3789-41be-b090-187c474da679" alt=""><figcaption></figcaption></figure>
