Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Mar 15, 2024
1 parent 381d210 commit 7cd0822
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 44 deletions.
31 changes: 24 additions & 7 deletions examples/nextjs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# Next.js example app

## Getting Started
Use this Next.js example app as a tool to start building an app with XMTP. This basic messaging app has an intentionally unopinionated UI to help make it easier for you to build with.

First, run the development server:
The app is built using the [React XMTP client SDK](/packages/react-sdk/README.md), [React](https://react.dev/), [Next.js](https://nextjs.org/), and [RainbowKit](https://www.rainbowkit.com/).

```bash
yarn dev
```
To keep up with the latest example app developments, see the [Issues tab](https://github.com/xmtp/xmtp-web/issues) in this repo.

Open [http://localhost:3000](http://localhost:3000) with your browser to see the app.
To learn more about XMTP and get answers to frequently asked questions, see the [XMTP documentation](https://xmtp.org/docs).

## Limitations

This example app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations.

## Developing

1. In `packages/react-sdk`, run `yarn build` to build the React SDK.
2. In `examples/nextjs`, run `yarn dev` to start the development server.

## Useful commands

- `yarn build`: Builds the example app
- `yarn clean`: Removes `node_modules`, `dist`, and `.turbo` folders
- `yarn dev`: Launches the example app and watches for changes, which will trigger a rebuild
- `yarn format`: Runs prettier format and write changes
- `yarn format:check`: Runs prettier format check
- `yarn lint`: Runs ESLint
- `yarn typecheck`: Runs `tsc`
16 changes: 5 additions & 11 deletions examples/react-vite/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
# React Vite example app

![Status](https://img.shields.io/badge/Project_Status-Beta-yellow)

Use this React Vite example app as a tool to start building an app with XMTP. This basic messaging app has an intentionally unopinionated UI to help make it easier for you to build with.

The app is built using the [React XMTP client SDK](/packages/react-sdk/README.md), [React](https://react.dev/), [Vite](https://vitejs.dev/), and [RainbowKit](https://www.rainbowkit.com/).

This app is in **beta** status and ready to serve as a reference for you to start building with.

However, we do not recommend using beta software in production apps.

To keep up with the latest quickstart app developments, see the [Issues tab](https://github.com/xmtp/xmtp-web/issues) in this repo.
To keep up with the latest example app developments, see the [Issues tab](https://github.com/xmtp/xmtp-web/issues) in this repo.

To learn more about XMTP and get answers to frequently asked questions, see the [XMTP documentation](https://xmtp.org/docs).

### Limitations
## Limitations

This React Vite example app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations.
This example app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations.

## Developing

1. In `packages/react-sdk`, run `yarn build` to build the SDK.
2. In `examples/react-vite`, run `yarn dev` to start developing.
1. In `packages/react-sdk`, run `yarn build` to build the React SDK.
2. In `examples/react-vite`, run `yarn dev` to start the development server.

## Useful commands

Expand Down
44 changes: 18 additions & 26 deletions examples/remix/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
# Welcome to Remix + Vite!
# Remix example app

📖 See the [Remix docs](https://remix.run/docs) and the [Remix Vite docs](https://remix.run/docs/en/main/future/vite) for details on supported features.
Use this Remix example app as a tool to start building an app with XMTP. This basic messaging app has an intentionally unopinionated UI to help make it easier for you to build with.

## Development
The app is built using the [React XMTP client SDK](/packages/react-sdk/README.md), [React](https://react.dev/), [Remix](https://remix.run/), and [RainbowKit](https://www.rainbowkit.com/).

Run the Vite dev server:
To keep up with the latest example app developments, see the [Issues tab](https://github.com/xmtp/xmtp-web/issues) in this repo.

```sh
yarn dev
```
To learn more about XMTP and get answers to frequently asked questions, see the [XMTP documentation](https://xmtp.org/docs).

## Deployment
## Limitations

First, build your app for production:
This example app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations.

```sh
yarn build
```
## Developing

Then run the app in production mode:
1. In `packages/react-sdk`, run `yarn build` to build the React SDK.
2. In `examples/remix`, run `yarn dev` to start the development server.

```sh
yarn start
```
## Useful commands

Now you'll need to pick a host to deploy it to.

### DIY

If you're familiar with deploying Node applications, the built-in Remix app server is production-ready.

Make sure to deploy the output of `yarn build`

- `build/server`
- `build/client`
- `yarn build`: Builds the example app
- `yarn clean`: Removes `node_modules`, `dist`, and `.turbo` folders
- `yarn dev`: Launches the example app and watches for changes, which will trigger a rebuild
- `yarn format`: Runs prettier format and write changes
- `yarn format:check`: Runs prettier format check
- `yarn lint`: Runs ESLint
- `yarn typecheck`: Runs `tsc`

0 comments on commit 7cd0822

Please sign in to comment.