Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Oct 31, 2024
1 parent 4651254 commit 575684c
Showing 1 changed file with 52 additions and 105 deletions.
157 changes: 52 additions & 105 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,69 +13,6 @@

</div>

look at the canvas: [keypom]

key drop

it's a way to put it all together

- every.near : redeploy of the social contract, stores things and types
- near-bos-webcomponent : (thing), has the VM and definitions. Takes data and type.
-
- every.near.page

jsinrust

learn-anything, can I just use their app?
He sounds like a cracked dev and would probably appreciate it...

everything.dev
everything.market
everythingproject.org

graph.every.near - deploy socialdb contract

mega proposal along with the Keypom app

Editor - what does this do?

On each build, publish the json scehma of your types to your page. We can derive this from the data.

# Features

Local-first, decentralized data storage using Jazz
AI agent to create typed data from natural language
AI agent to ask questions about your inventory
AI agent to generate UI for data?
Private compute with Naptha?
Peer sharing via Calimero?
Deploy a custom marketplace
Sign transactions with OAuth OR login to session via NEAR wallet (web4?)

# Future

If everything can happen in the browser,
then everything can happen in a WASM environment.

It doesn't matter how this app is built. There are numerous ways to build it better.

This is your opportunity to integrate into it.

What is the goal that we want projects to do?

Race of sloths - create a pull request

everything is built for everyone.

Send for feedback.

## Acknowledgements

- learn-anything
- web4
- final form builder demo https://github.com/final-form/builder-demo
- tailwind rjsf https://github.com/m6io/rjsf-tailwind

<details>
<summary>Table of Contents</summary>

Expand All @@ -91,10 +28,6 @@ Send for feedback.

</details>

This project a [Vite](https://vitejs.dev/) app bootstrapped with [@near-js/client](https://github.com/near/near-api-js/tree/master/packages/client), [@tanstack/react-router](https://tanstack.com/router/latest), and [@tanstack/react-query](https://tanstack.com/query/latest). It uses [tailwind](https://tailwindcss.com/docs/installation) for styling, [shadcn](https://ui.shadcn.com/) components, and offers a [playwright suite](https://playwright.dev/) for testing.

To easily add more components, [browse the shadcn catalog](https://ui.shadcn.com/docs/components/button) and follow its installation guide. You can also easily generate themes through tools [like this one](https://zippystarter.com/tools/shadcn-ui-theme-generator), and copy and paste your colors into the [input.css](./src/input.css).

## Getting Started

### Installing dependencies
Expand Down Expand Up @@ -131,6 +64,32 @@ pnpm dlx shadcn@latest add <component-name>

See the full [testing guide](./playwright-tests/README.md).

## Project Structure

This project is a structured as a monorepo with [Turborepo](https://github.com/vercel/turborepo).

```cmd
.
├── apps
│   ├── api
│   └── www
├── packages
│   ├── config-eslint
│   ├── config-typescript
```

It consists of several components:

- [Vite](https://vitejs.dev/) project using [near-vite-starter template](https://github.com/NEARBuilders/near-vite-start), bundle stored on [NEARFS](https://github.com/vgrichina/nearfs), served through [Web4](https://web4.near.page/)

- Web4 NEAR login to authorize a local-first session with [Jazz](https://jazz.tools/) for data storage and sync

- Types stored on-chain in the [social-db](https://github.com/NearSocial/social-db)

- Express proxy server for Open AI requests to gpt-4o-mini for NLP and structured outputs

- Automatic form generation based on JSON Schemas, using [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/docs/)

## Learn more about NEAR

To learn more about NEAR, take a look at the following resources:
Expand All @@ -141,6 +100,32 @@ To learn more about NEAR, take a look at the following resources:

You can check out [the NEAR repository](https://github.com/near) - your feedback and contributions are welcome!

## Running locally

1. Install [mkcert](https://mkcert.dev/).
2. Install local certificate authority (this allows browser to trust self-signed certificates):
```bash
mkcert -install
```
3. Create `*.near.page` SSL certificate:
```bash
mkcert "*.near.page"
```
4. Run `web4` man-in-the-middle proxy locally:
```bash
IPFS_GATEWAY_URL=https://ipfs.near.social NODE_ENV=mainnet WEB4_KEY_FILE=./_wildcard.near.page-key.pem WEB4_CERT_FILE=./_wildcard.near.page.pem npx web4-near
```
5. Setup browser to use [automatic proxy configuration file](https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file) at `http://localhost:8080/` or to use `localhost:8080` as an HTTPS proxy server.

I had to do:

`sudo sh -c 'echo "127.0.0.1 every.near.page" >> /etc/hosts'`

and

`pnpm run dev --host every.near.page`


## Deploy to web4

1. Build the project
Expand Down Expand Up @@ -184,41 +169,3 @@ If you're interested in contributing to this project, please read the [contribut
/>
</a>
</div>

### Checklist

- favicon, title, description, open graph share link
- expand to monorepo? apps, packages (marketplace)
- tests?
- auth vs unauth routes
- create thing from ai (structured outputs)
- clearer ai environment
- everything header
- how to handle offline?
- hide dev tools in production
- edit thing, wrapper around ThingForm

# Running locally

1. Install [mkcert](https://mkcert.dev/).
2. Install local certificate authority (this allows browser to trust self-signed certificates):
```bash
mkcert -install
```
3. Create `*.near.page` SSL certificate:
```bash
mkcert "*.near.page"
```
4. Run `web4` man-in-the-middle proxy locally:
```bash
IPFS_GATEWAY_URL=https://ipfs.near.social NODE_ENV=mainnet WEB4_KEY_FILE=./_wildcard.near.page-key.pem WEB4_CERT_FILE=./_wildcard.near.page.pem npx web4-near
```
5. Setup browser to use [automatic proxy configuration file](https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file) at `http://localhost:8080/` or to use `localhost:8080` as an HTTPS proxy server.

I had to do:

`sudo sh -c 'echo "127.0.0.1 every.near.page" >> /etc/hosts'`

and

`pnpm run dev --host every.near.page`

0 comments on commit 575684c

Please sign in to comment.