Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 29 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@
Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimism's open-source [OP Stack](https://stack.optimism.io/).

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

[![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 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)
[![![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 -->

[![Website base.org](https://img.shields.io/website-up-down-green-red/https/base.org.svg)](https://base.org)
[![Blog](https://img.shields.io/badge/blog-up-green)](https://base.mirror.xyz/)
[![Docs](https://img.shields.io/badge/docs-up-green)](https://docs.base.org/)
[![Discord](https://img.shields.io/discord/1067165013397213286?label=discord)](https://base.org/discord)
[![Twitter Base](https://img.shields.io/twitter/follow/Base?style=social)](https://twitter.com/Base)
[![![Website base.org](https://img.shields.io/website-up-down-green-red/https/base.org.svg)](https://base.org)
[![![Blog](https://img.shields.io/badge/blog-up-green)](https://base.mirror.xyz/)
[![![Docs](https://img.shields.io/badge/docs-up-green)](https://docs.base.org/)
[![![Discord](https://img.shields.io/discord/1067165013397213286?label=discord)](https://base.org/discord)
[![![Twitter Base](https://img.shields.io/twitter/follow/Base?style=social)](https://twitter.com/Base)

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

[![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)
[![![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 All @@ -41,96 +38,40 @@ yarn
yarn build
```

## Local development

To start a development server on localhost, run `yarn workspace @app/<project> dev`.

For example, to start the `web` app locally, you would run `yarn workspace @app/web dev`.

## Projects

There are three projects which can be run individually.
## Quick Start

### Web
Once you've completed the setup and installation steps above, you can quickly start a local development server:

```
```shell
# Start the web app development server
yarn workspace @app/web dev
```

## Contributing

We welcome contributions to Base! For guidelines on how to contribute please refer to [CONTRIBUTING.md](CONTRIBUTING.md).

### Updating the Base Ecosystem Page

If you're a builder who wants to add or update your project on the [Base Ecosystem](https://base.org/ecosystem) page, follow these steps:
The application will be available at `http://localhost:3000` (or the next available port).

1. Fork this repository.
For other projects, use the same pattern:

2. Create a new branch for your changes.

3. Update the `ecosystem.json` file in `apps/web/src/data/` with your project's details :
```shell
# Replace <project-name> with your target project
yarn workspace @app/<project-name> dev
```

```json
{
"name": "Your Project Name",
"description": "A brief description (less than 200 characters)",
"url": "https://your-project.com",
"imageUrl": "/images/partners/your-logo.png",
"category": "one of: ai, consumer, defi, infra, onramp, wallet",
"subcategory": "see categories below"
}
```
## Local development

- name: Your project's name
- 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: `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 `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`
To start a development server on localhost, run `yarn workspace @app/<project> dev`.

If your app supports multiple networks, ensure the URL provided points to a page
with Base already selected as the network, for people who will be visiting from
base.org.
For example, to start the `web` app locally, you would run `yarn workspace @app/web dev`.

4. Add your project's logo:
## Projects

- Place a 192x192 pixel PNG/WebP file in `apps/web/public/images/partners/`
- Name should match what you specified in imageUrl
- Use an App/Play Store style icon (not a full wordmark)
There are three projects which can be run individually.

5. Check if your project has been listed by running it locally:
### Web

```
yarn workspace @app/web dev
```

6. Make sure the build works properly before creating the PR:

```
yarn workspace @app/web build
```

By opening a PR to add your project, you authorize and license Coinbase on a non-exclusive, worldwide, irrevocable, sublicensable, and royalty-free basis to reproduce, distribute, transmit, make available, perform, display, or otherwise use the submitted Multimedia Assets for any purpose, including any marketing or promotional activities related to Base or Coinbase. Any goodwill associated with use of trademarks submitted in your Multimedia Assets will inure to your benefit. You further acknowledge and represent that you have all IP rights in the Multimedia Assets, that the Multimedia Assets do not infringe the rights of any third party, and that you have the right to grant this license to Coinbase.

**Note:** Submissions do not guarantee inclusion and all submissions are subject to review. Your project must be live on Base to potentially be included. Ensure all information is accurate and up-to-date.

#### Submission requirements

- 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 be coming from base.org
- Active development and community engagement can be observed without issue

---
## Contributing

If you have any questions, please reach out to us in #developer-chat in the [Base Discord](https://base.org/discord).
We welcome contributions to Base! For guidelines on how to contribute please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import classNames from 'classnames';
import { ConnectWallet } from '@coinbase/onchainkit/wallet';
import { Button, ButtonSizes, ButtonVariants } from 'apps/web/src/components/Button/Button';
import { useAccount } from 'wagmi';
// import your notification system here if available
// import { toast } from 'apps/web/src/components/Toast/toast';

type RegistrationButtonProps = {
correctChain: boolean;
Expand All @@ -20,15 +22,29 @@ export function RegistrationButton({
}: RegistrationButtonProps) {
const { isConnected } = useAccount();

// Error handler for wallet connection failures
const handleConnectWalletError = (err: Error) => {
// Show error notification to the user
// toast.error('Wallet connection failed! Please try again.');
// Optionally log the error if logEvent is available:
// if (typeof logEvent === 'function') {
// logEvent('wallet_connection_error', { error: err.message });
// }
// Fallback to console output if toast or logEvent do not exist:
console.error('Wallet connection error:', err);
};

if (!isConnected) {
return (
<ConnectWallet
className={classNames(
'bg-button-black text-white hover:bg-button-blackHover active:bg-button-blackActive', // ButtonVariants.Black
'px-10 py-3.5 text-sm md:text-lg', // ButtonSizes.Medium
'rounded-full', // rounded
'bg-button-black text-white hover:bg-button-blackHover active:bg-button-blackActive',
'px-10 py-3.5 text-sm md:text-lg',
'rounded-full',
)}
disconnectedLabel="Connect wallet"
// Added error handling for wallet connect
onError={handleConnectWalletError}
/>
);
}
Expand Down