Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
1# Hey Monorepo 2 3## Requirements 4 5To start working with the Hey monorepo, ensure the following tools are installed: 6 7- [Node.js](https://nodejs.org/en/download/) (v18 or higher) – the JavaScript runtime used in this project. 8- [pnpm](https://pnpm.io/installation) – the package manager used throughout this repository. 9- [Postgres App](https://postgresapp.com/) – the Postgres database used in development. 10 11## Installation 12 13This repository uses [pnpm workspaces](https://pnpm.io/workspaces) to manage multiple packages within a monorepo structure. 14 15### Clone the Repository 16 17```bash 18git clone git@github.com:heyverse/hey.git 19``` 20 21### Install NVM and pnpm 22 23On macOS, you can install both with Homebrew: 24 25```bash 26brew install nvm pnpm 27``` 28 29### Install Node.js 30 31Use `nvm` to install the required Node.js version: 32 33```bash 34nvm install 35``` 36 37### Install Dependencies 38 39From the repository root, install dependencies with pnpm: 40 41```bash 42pnpm install 43``` 44 45### Set up Environment Variables 46 47Copy the `.env.example` file to `.env` for each package or application that requires configuration: 48 49```bash 50cp .env.example .env 51``` 52 53Repeat this process for all relevant packages and applications in the monorepo. 54 55### Environment Variables 56 57The example environment files define the following variables: 58 59#### API (`apps/api/.env.example`) 60 61- `LENS_NETWORK` – Lens network to use (`mainnet`, `testnet`, or `staging`). 62- `LENS_DATABASE_URL` – Read-only Postgres connection for Lens data. 63- `PRIVATE_KEY` – Private key used to sign Lens requests. 64- `EVER_ACCESS_KEY` – Access key for 4EVERLAND storage. 65- `EVER_ACCESS_SECRET` – Secret key for 4EVERLAND storage. 66- `SHARED_SECRET` – Token for internal API authorization. 67 68#### Web (`apps/web/.env.example`) 69 70- `LENS_NETWORK` – Lens network used by the web app. 71 72### Start the Development Server 73 74To run the application in development mode: 75 76```bash 77pnpm dev 78``` 79 80## Build 81 82### Build the application 83 84Compile the application: 85 86```bash 87pnpm build 88``` 89 90### Type-check the project 91 92Validate the codebase with the TypeScript type checker: 93 94```bash 95pnpm typecheck 96``` 97 98### Lint and Format Code 99 100Check code quality and formatting with Biome: 101 102```bash 103pnpm biome:check 104``` 105 106Automatically fix linting and formatting issues: 107 108```bash 109pnpm biome:fix 110``` 111 112### Maintenance Scripts 113 114Convenient Node.js helpers are in the `script` directory: 115 116- `node script/clean.mjs` removes all `node_modules`, `.next` directories, 117 `pnpm-lock.yaml`, and `tsconfig.tsbuildinfo` files. 118- `node script/update-dependencies.mjs` updates packages across the monorepo, 119 removes old installs and commits the changes in a new branch. 120- `node script/sort-package-json.mjs` sorts all `package.json` files in the 121 repository. 122 123## License 124 125This project is released under the **GNU AGPL-3.0** license. See the [LICENSE](./LICENSE) file for details. 126 127🌸