8000 GitHub - taylorjdawson/suCiphus
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

taylorjdawson/suCiphus

Repository files navigation

Turborepo starter

This is an official starter Turborepo.

Using this example

Run the following command:

npx create-turbo@latest

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • @repo/eslint-config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • @repo/typescript-config: tsconfig.jsons used throughout the monorepo
  • @repo/suciphus-suapp: the main app
  • suciphus-mainframe: a frontend application served at http://localhost:3001
  • admin: an admin dashboard served at http://localhost:3000

Each package/app is 100% TypeScript.

Utilities

This Turborepo has some additional tools already setup for you:

Build

To build all apps and packages, run the following command:

pnpm build

Develop

Start geth

Using installed suave-geth

suave-geth --suave-dev

Local suave-geth build

./build/bin/geth \
 --dev \
 --dev.gaslimit 5000000000 \
 --http \
 --http.addr "0.0.0.0" \
 --http.port 8545 \
 --http.api "eth,web3,net,clique,debug" \
 --http.corsdomain "*" \
 --allow-insecure-unlock \
 --keystore "$HOME/.suave-dev/keystore" \
 --unlock "0xB5fEAfbDD752ad52Afb7e1bD2E40432A485bBB7F" \
 --password "$HOME/.suave-dev/password.txt" \
 --ws \
 --suave.eth.remote_endpoint "http://localhost:8548" \
 --miner.gasprice 0 \
 --rpc.gascap 10000000000 \
 --networkid 16813125 \
 --suave.eth.external-whitelist "*" \
 --verbosity 3

Set up Supabase

To get supabase running locally, follow their self-hosting guide.

Make note of these variables from your supabase deployment's environment (or .env file):

  • POSTGRES_PASSWORD
  • POSTGRES_HOST
  • POSTGRES_DB
  • POSTGRES_PORT
  • SERVICE_ROLE_KEY

Build & Deploy contracts

Build contracts & generate typescript bindings:

cd ./packages/suciphus-suapp
pnpm i
pnpm contracts:build
pnpm contracts:deploy
pnpm build
cd -

Populate environment files:

  • In the admin app's .env file, the SUPABASE_URL variable should point to the supabase postgres DB; it's composed of the postgres-related variables we noted earlier:

    SUPABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}

    This example assumes you're using the default user postgres; you may need to change this if not self-hosting supabase.

    SUPABASE_SERVICE_KEY should be populated with SERVICE_ROLE_KEY from earlier.

    cd apps/admin && cp .env.example .env
    vim .env
    cd -
  • The user-facing app can use default values:

    cd apps/suciphus-mainframe && cp .env.example .env && cd -

Install dependencies:

pnpm i

To develop all apps and packages, run the following command:

pnpm dev

This will start both suciphus-mainframe and admin apps:

  • suciphus-mainframe is accessible at http://localhost:3001/player for testing prompts.
  • admin can be accessed at http://localhost:3000/admin/ to view the admin dashboard.

Remote Caching

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd my-turborepo
npx turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

npx turbo link

Useful Links

Learn more about the power of Turborepo:

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0