Skip to content

Here Not There's exploration into realtime Web3

License

Notifications You must be signed in to change notification settings

mwyatt896/chatwallette

 
 

Repository files navigation

ChatWallette is an experiment by Here Not There Labs - say hi hello@hntlabs.com.

ChatWallette matches users based on their NFTs and sets them up for peer-to-peer conversations. If no matches are found based on the user's wallet, users can choose to randomly match with others online.

Contact oss@hntlabs.com with questions about the code - following are instructions to run ChatWallette.

Getting Started

To run the development servers you will need to run two seperate dev instances, one to serve the Client (via Next.js), and the other for the backend server.

They will both need to be served with TLS to enable the code served to the client to make requests against the server. To support this you will need to install local-ssl-proxy and mkcert.

 npm install -g local-ssl-proxy
 brew install mkcert

First, create the certificates needed by both servers.

mkcert localhost

In Chrome, paste this in the URL to allow the locally generated ssl cert: chrome://flags/#allow-insecure-localhost

Next start the Next.JS server behind a local-ssl-proxy:

cd client
yarn install
yarn dev-ssl

Then in another Terminal window start the server backend:

cd server
yarn install
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Deployment

This project is built by Google Cloud Build and deployed to Google Cloud Run

The Cloud Build Project watched the main branch and dpeloys anything that hits it

The Docker image created by Cloud Build is then deployed to Cloud Run

You can create the docker image locally and run it using these commands

docker build . -t here-web3-server
docker run -p 3000:3000 here-web3-server

Local development with redis

docker pull redis
docker run -p 6379:6379 redis

Use the client tool (redis-cli) to connect to the redis instance:

Install redis/redis-cli using brew

redis-cli ping

# You should see PONG as a response.

About

Here Not There's exploration into realtime Web3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.3%
  • SCSS 0.9%
  • GLSL 0.9%
  • HTML 0.7%
  • Dockerfile 0.6%
  • JavaScript 0.5%
  • Shell 0.1%