Carbonable / carbonable-dapp

Carbonable dApp
https://app.carbonable.io
Apache License 2.0
6 stars 4 forks source link

Carbonable dApp

Carbonable dApp written in React with Remix

Usage

Set up the project

📦 Install the requirements

fly auth signup

🎉 Install

npm install

Environment variables

DATABASE_URL=""
AIRTABLE_API_KEY=""
AIRTABLE_USER_BASE=""
QUEST_SIGNER_PRIVATE_KEY=""
INDEXER_URL=""
NETWORK=sepolia|mainnet
GRAPHQL_ENDPOINT=""
RPC_API_KEY=""
AVNU_URL=""

MAPBOX=""
DMRV_API=""

WEB_WALLET_ENABLED=true|false
TRACKING_ACTIVATED=true|false #False if no DMRV API
DISPLAY_LAUNCHPAD_HEADER=true|false
PRESALE_TOKEN=presale_verification_token
PRESALE_OPEN=true|false
CUSTOMER_API_URL=customer_api_url

ACTIVATE_STRIPE_PAYMENT=true|false
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
PAYMENT_GATEWAY_URL=payment_gateway_url

⛏️ Run for dev

npm run dev

💾 Database

Dev

Installation

Install Postgres or you can use Docker

If you're using Docker :

make

Otherwise :

Start Postgres

Create a database named carbonable_dapp

Connection

Connection with pgAdmin: localhost:5432 postgres/[password]

Build database
# Push database schema locally
npx prisma db push

# Seed database
npx ts-node prisma/seed.ts

# Create migration file
npx prisma migrate dev --name [name of the migration]

If your database gets messed up, you can always delete the prisma/dev.db file and run npx prisma db push again. Remember to also restart your dev server with npm run dev.

Distant database

Connection
flyctl proxy 15432:5432 dev-carbonable-db.internal

Connection with pgAdmin: localhost:543154322 postgres/[password]