Skip to content

Commit

Permalink
Merge pull request #1 from bamkfi/landing
Browse files Browse the repository at this point in the history
Landing
  • Loading branch information
remjx authored Aug 6, 2024
2 parents d941a49 + 4d451c5 commit cd2d809
Show file tree
Hide file tree
Showing 70 changed files with 665 additions and 7,320 deletions.
13 changes: 1 addition & 12 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
UNISAT_API_KEY=
INFURA_API_KEY=
COINGECKO_API_KEY=
MAGIC_EDEN_API_KEY=
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
SESSION_SECRET=
AUTOSWAP_BASE_URL=
AUTOSWAP_API_KEY=
AUTOSWAP2_BASE_URL=
AUTOSWAP2_API_KEY=
NEXT_PUBLIC_REDEEM_BASE_URL=
OPI_BASE_URL=
OPI_API_KEY=
NEXT_PUBLIC_MINIMUM_DEPOSIT_USD=
NEXT_PUBLIC_MINIMUM_REDEEM_USD=
MAGIC_EDEN_API_KEY=
24 changes: 24 additions & 0 deletions .github/workflows/fly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
--build-arg UNISAT_API_KEY="${{ secrets.UNISAT_API_KEY }}"
--build-arg COINGECKO_API_KEY="${{ secrets.COINGECKO_API_KEY }}"
--build-arg MAGIC_EDEN_API_KEY="${{ secrets.MAGIC_EDEN_API_KEY }}"
--build-arg INFURA_API_KEY="${{ secrets.INFURA_API_KEY }}"
--build-secret UNISAT_API_KEY="${{ secrets.UNISAT_API_KEY }}"
--build-secret COINGECKO_API_KEY="${{ secrets.COINGECKO_API_KEY }}"
--build-secret MAGIC_EDEN_API_KEY="${{ secrets.MAGIC_EDEN_API_KEY }}"
--build-secret INFURA_API_KEY="${{ secrets.INFURA_API_KEY }}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ RUN yarn install --frozen-lockfile --production=false
# Copy application code
COPY --link . .

# TODO: INJECT BUILD ARGS FROM ENV HERE:
# ----------------------------
#
# ----------------------------
ARG UNISAT_API_KEY
ARG COINGECKO_API_KEY
ARG MAGIC_EDEN_API_KEY
ARG INFURA_API_KEY

ENV UNISAT_API_KEY=$UNISAT_API_KEY
ENV COINGECKO_API_KEY=$COINGECKO_API_KEY
ENV MAGIC_EDEN_API_KEY=$MAGIC_EDEN_API_KEY
ENV INFURA_API_KEY=$INFURA_API_KEY

# Build application
RUN yarn run build
Expand Down
8 changes: 4 additions & 4 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# fly.toml app configuration file generated for bamkfi-frontend-usdt-preview on 2024-07-12T04:05:35-04:00
# fly.toml app configuration file generated for bamkfi-landing on 2024-07-28T15:52:41-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'bamkfi-frontend'
app = 'bamkfi-landing'
primary_region = 'ewr'

[build]
dockerfile = 'Dockerfile.prod'
dockerfile = 'Dockerfile'

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = false
auto_stop_machines = 'off'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
Expand Down
35 changes: 24 additions & 11 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// https://docs.family.co/connectkit/getting-started#getting-started-nextjs
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},
async redirects() {
return [
{
source: '/mint',
destination: '/swap/mint',
source: '/api/:path*',
destination: 'https://app.bamk.fi/api/:path*',
permanent: false,
},
{
source: '/calculator',
destination: 'https://app.bamk.fi/calculator',
permanent: false,
},
{
source: '/leaderboard',
destination: 'https://app.bamk.fi/leaderboard',
permanent: false,
},
{
source: '/swap',
destination: '/swap/mint',
destination: 'https://app.bamk.fi/swap',
permanent: false,
},
{
source: '/mint',
destination: 'https://app.bamk.fi/swap/mint',
permanent: false,
},
{
source: '/swap/:path',
destination: 'https://app.bamk.fi/swap',
permanent: false,
},

];
},
experimental: {
missingSuspenseWithCSRBailout: false, // https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
},
};

export default nextConfig;
18 changes: 2 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bamkfi-frontend",
"version": "0.2.2",
"name": "bamkfi-landing",
"version": "0.3.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -9,40 +9,26 @@
"lint": "next lint"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-form": "^0.20.3",
"@tanstack/react-query": "^5.40.1",
"@unisat/wallet-utils": "^1.0.0",
"class-variance-authority": "^0.7.0",
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"connectkit": "^1.8.0",
"connectkit-next-siwe": "^0.3.0",
"encoding": "^0.1.13",
"js-cookie": "^3.0.5",
"lucide-react": "^0.378.0",
"next": "14.2.3",
"next-themes": "^0.3.0",
"pino-pretty": "^11.1.0",
"react": "^18",
"react-dom": "^18",
"react-loader-spinner": "^6.1.6",
"react-toastify": "^10.0.5",
"sharp": "^0.33.4",
"siwe": "^2.3.2",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"viem": "^2.13.6",
"wagmi": "^2.9.8",
"web3": "^4.10.0"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.5.7",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
1 change: 0 additions & 1 deletion public/.well-known/walletconnect.txt

This file was deleted.

Binary file removed public/logos/okx2.png
Binary file not shown.
Binary file removed public/logos/unisat-icon.png
Binary file not shown.
Loading

0 comments on commit cd2d809

Please sign in to comment.