Skip to content

Commit

Permalink
Merge branch 'master' into fix/spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Pronoss authored Mar 7, 2025
2 parents cdb1852 + 1675024 commit c230da3
Show file tree
Hide file tree
Showing 1,679 changed files with 76,752 additions and 85,669 deletions.
6 changes: 1 addition & 5 deletions .codeflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ secure:
required_reviews: 1
requires_mfa: true
requires_verified: true
upstream_repository: base-org/web
upstream_repository: base/web

build:
engines:
Expand All @@ -15,10 +15,6 @@ build:
name: docs
path: ./apps/base-docs/Dockerfile
architecture: amd64
- BaldurECR:
name: bridge
path: ./apps/bridge/Dockerfile
architecture: amd64
multi_arch: true

operate:
Expand Down
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
],
rules: {
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
},
},
],
Expand All @@ -29,14 +30,15 @@ module.exports = {
'import/extensions': ['error', 'never'],
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx', '.mdx'] }],
'react/react-in-jsx-scope': 'off',

// We utilize prop spreading
'react/jsx-props-no-spreading': 'off',

// We utilize class properties
'react/state-in-constructor': 'off',

// Dont use prop types since we are using TypeScript
// Don't use prop types since we are using TypeScript
'react/default-props-match-prop-types': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/forbid-prop-types': 'off',
Expand Down Expand Up @@ -66,7 +68,7 @@ module.exports = {

'react/jsx-one-expression-per-line': 'off',

// We dont use flow
// We don't use flow
'relay/generated-flow-types': 'off',

// Shorthand types
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,5 @@ persisted_queries.json

# eslint
.eslintcache

.vercel
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code of Conduct for base-org/web
# Code of Conduct for base/web

## 1. Purpose

Expand Down Expand Up @@ -41,4 +41,4 @@ This Code of Conduct applies within all project spaces, and it also applies when

## 7. Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ This project and everyone participating in it is governed by our [Code of Conduc

### Reporting Bugs

1. **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/base-org/web/issues).
1. **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/base/web/issues).

2. If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/base-org/web/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
2. If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/base/web/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

### Suggesting Enhancements

1. **Check the [Issues](https://github.com/base-org/web/issues)** to see if there's someone who has already suggested the same enhancement.
1. **Check the [Issues](https://github.com/base/web/issues)** to see if there's someone who has already suggested the same enhancement.

2. If it doesn't exist, [create a new issue](https://github.com/base-org/web/issues/new). Provide a clear and detailed explanation of the feature you want and why it's important to add.
2. If it doesn't exist, [create a new issue](https://github.com/base/web/issues/new). Provide a clear and detailed explanation of the feature you want and why it's important to add.

### Pull Requests

Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the ne

<!-- Badge row 1 - status -->

[![GitHub contributors](https://img.shields.io/github/contributors/base-org/web)](https://github.com/base-org/web/graphs/contributors)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base-org/web)](https://github.com/base-org/web/graphs/contributors)
[![GitHub Stars](https://img.shields.io/github/stars/base-org/web.svg)](https://github.com/base-org/web/stargazers)
![GitHub repo size](https://img.shields.io/github/repo-size/base-org/web)
[![GitHub](https://img.shields.io/github/license/base-org/web?color=blue)](https://github.com/base-org/web/blob/master/LICENSE.md)
[![GitHub contributors](https://img.shields.io/github/contributors/base/web)](https://github.com/base/web/graphs/contributors)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base/web)](https://github.com/base/web/graphs/contributors)
[![GitHub Stars](https://img.shields.io/github/stars/base/web.svg)](https://github.com/base/web/stargazers)
![GitHub repo size](https://img.shields.io/github/repo-size/base/web)
[![GitHub](https://img.shields.io/github/license/base/web?color=blue)](https://github.com/base/web/blob/master/LICENSE.md)

<!-- Badge row 2 - links and profiles -->

Expand All @@ -22,8 +22,8 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the ne

<!-- Badge row 3 - detailed status -->

[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/base-org/web)](https://github.com/base-org/web/pulls)
[![GitHub Issues](https://img.shields.io/github/issues-raw/base-org/web.svg)](https://github.com/base-org/web/issues)
[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/base/web)](https://github.com/base/web/pulls)
[![GitHub Issues](https://img.shields.io/github/issues-raw/base/web.svg)](https://github.com/base/web/issues)

## Setup

Expand Down Expand Up @@ -98,11 +98,12 @@ If you're a builder who wants to add or update your project on the [Base Ecosyst
- description: A brief description of your project, must be less than 200 characters
- url: Your project's website URL
- imageUrl: Path to your project's logo image
- category: Your project's category, _one_ of: `consumer`, `defi`, `infra`, `onramp`, `wallet`
- category: Your project's category, _one_ of: `ai`, `consumer`, `defi`, `infra`, `onramp`, `wallet`
- subcategory: Your project's subcategory, with the following options associated with each category
- `ai`: Simply add `ai` as the subcategory as well
- `consumer`: _One_ of `creator`, `crypto taxes`, `dao`, `gaming`, `messaging`, `music`, `nft`, `payments`, `real world`, `social`
- `defi`: _One_ of `dex`, `dex aggregator`, `insurance`, `lending/borrowing`, `liquidity management`, `portfolio`, `stablecoin`, `yield vault`
- `infra`: _One_ of `ai`, `bridge`, `data`, `depin`, `developer tool`, `identity`, `node provider`, `raas`, `security`
- `infra`: _One_ of `bridge`, `data`, `depin`, `developer tool`, `identity`, `node provider`, `raas`, `security`
- `onramp`: _One_ of `centralized exchange`, `fiat on-ramp`
- `wallet`: _One_ of `account abstraction`, `multisig`, `self-custody`

Expand All @@ -116,12 +117,12 @@ By opening a PR to add your project, you authorize and license Coinbase on a non

#### Submission requirements

- App content adheres to the [Base Editorial Style Guide](https://github.com/base-org/brand-kit/blob/main/guides/editorial-style-guide.md)
- App content adheres to the [Base Editorial Style Guide](https://github.com/base/brand-kit/blob/main/guides/editorial-style-guide.md)
- App has been live on Base for at least 30 days
- App has a Terms of Service and Privacy Policy
- App supports HTTPS and 301 redirects HTTP requests
- App is not a TGE (Token Generation Event), ICO (Initial Coin Offering), airdrop, claim, or similar
- Landing page is a Base-specific page for users who will becoming from base.org
- Landing page is a Base-specific page for users who will be coming from base.org
- Active development and community engagement can be observed without issue

---
Expand Down
1 change: 0 additions & 1 deletion apps/base-docs/.env.example

This file was deleted.

1 change: 0 additions & 1 deletion apps/base-docs/.eslintignore

This file was deleted.

15 changes: 15 additions & 0 deletions apps/base-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
node_modules/
docs/dist/
docs/build/
./vocs.config.tsx.timestamp*

# Yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# Environment variables
.env*.local
.env
1 change: 1 addition & 0 deletions apps/base-docs/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
10 changes: 0 additions & 10 deletions apps/base-docs/404.js

This file was deleted.

4 changes: 3 additions & 1 deletion apps/base-docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ ENV NODE_ENV=production
RUN yarn workspace @app/base-docs build
RUN yarn workspaces focus --all --production

RUN yarn add serve

EXPOSE 3000
CMD ["yarn", "workspace", "@app/base-docs", "start"]
CMD ["yarn", "serve", "apps/base-docs/docs/dist", "-p", "3000"]
61 changes: 59 additions & 2 deletions apps/base-docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
# Base Docs
This is a [Vocs](https://vocs.dev) project bootstrapped with the Vocs CLI.

This the Docusaurus app for the Base docs. You can run the dev server locally with `yarn workspace @app/base-docs dev`.
# Creating New Docs

You can create a new doc by adding a `.md` or `.mdx` file in
`apps/base-docs/docs/pages`.

The URL path for your doc will map to the file location. For instance, `bounty.mdx`
is found within `chain/security`. So the URL for this link will be:
`docs.base.org/chain/security/bounty`.


# Running Docs Locally

Follow these steps to run Base-Docs locally:

1. Make sure you have installed all dependencies by running `yarn install` at
the top-level of the monorepo

2. Start the base-docs workspace with the following command: `yarn workspace @app/base-docs dev`


# Building Docs Locally

Follow these steps to build Base-Docs locally:

1. Make sure you have installed all dependencies by running `yarn install` at
the top-level of the monorepo

2. Navigate into the base-docs service and then build the Vocs site:
```
cd apps/base-docs
yarn build
```

3. Start the local build: `yarn preview`


# Troubleshooting

You may encounter an error of the form:
```
TypeError: Cannot destructure property 'CookieBanner' of 'pkg' as it is undefined.
```

To resolve this:
1. navigate to `apps/base-docs/docs/contexts/CookieBannerWrapper.tsx`

2. comment out the lines:
```
import pkg from '@coinbase/cookie-banner';
const { CookieBanner } = pkg;
```

3. add the following line:
```
import { CookieBanner } from '@coinbase/cookie-banner';
```

NB: Do not commit this change, this is an issue in local dev only.
46 changes: 0 additions & 46 deletions apps/base-docs/algolia.json

This file was deleted.

73 changes: 73 additions & 0 deletions apps/base-docs/api/submitFeedback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { google } from '@googleapis/sheets';
import type { VercelRequest, VercelResponse } from '@vercel/node';

// Initialize Google Sheets client
const getGoogleSheetsClient = () => {
try {
const credentials = JSON.parse(
Buffer.from(process.env.GOOGLE_SERVICE_ACCOUNT_KEY || '', 'base64').toString(),
);

const auth = new google.auth.GoogleAuth({
credentials,
scopes: ['https://www.googleapis.com/auth/spreadsheets'],
});

return google.sheets({ version: 'v4', auth });
} catch (error) {
console.error('Failed to initialize Google Sheets client:', error);
throw new Error('Failed to initialize Google Sheets client');
}
};

type FeedbackPayload = {
likeOrDislike: boolean;
options: string[];
comment: string;
url: string;
ipAddress: string;
timestamp: number;
};

export default async function handler(req: VercelRequest, res: VercelResponse) {
if (req.method !== 'POST') {
return res.status(405).json({ error: 'Method not allowed' });
}

try {
const { likeOrDislike, options, comment, url, ipAddress, timestamp } =
req.body as FeedbackPayload;

const sheets = getGoogleSheetsClient();
const spreadsheetId = process.env.GOOGLE_SHEETS_ID;

if (!spreadsheetId) {
throw new Error('GOOGLE_SHEETS_ID environment variable is not set');
}

// Format the row data
const rowData = [
new Date(timestamp).toISOString(),
url,
ipAddress,
likeOrDislike ? 'Like' : 'Dislike',
options.join(', '),
comment,
];

// Append the row to the sheet
await sheets.spreadsheets.values.append({
spreadsheetId,
range: 'Sheet1!A:F', // Adjust range based on your sheet's structure
valueInputOption: 'USER_ENTERED',
requestBody: {
values: [rowData],
},
});

return res.status(200).json({ success: true });
} catch (error) {
console.error('Error submitting feedback:', error);
return res.status(500).json({ error: 'Failed to submit feedback' });
}
}
12 changes: 0 additions & 12 deletions apps/base-docs/assets/icons/caret-down-black.svg

This file was deleted.

Loading

0 comments on commit c230da3

Please sign in to comment.