| 1 | # bhvr-forge âī¸đĻĢ |
| 2 | |
| 3 |  |
| 4 | |
| 5 | A full-stack TypeScript and Solidity monorepo starter with shared types, using Bun, Hono, Vite, React, and Forge. Based of the existing [bhvr stack](https://bhvr.dev). |
| 6 | |
| 7 | > [!WARNING] |
| 8 | > This repo is still under testing, please report any bugs you might have! |
| 9 | |
| 10 | ## Quickstart |
| 11 | |
| 12 | First make sure you have Foundry installed on your machine. If you do not follow [these instructions](https://getfoundry.sh/introduction/installation/) and then run the command below to verify it's installed. |
| 13 | |
| 14 | ```bash |
| 15 | forge --version |
| 16 | ``` |
| 17 | |
| 18 | Start a new `bhvr-forge` project with the CLI command below |
| 19 | |
| 20 | ```bash |
| 21 | bun create bhvr-forge@latest |
| 22 | ``` |
| 23 | |
| 24 | `bhvr-forge` by default uses the local `Anvil` testnet that comes with Foundry. Start up the testnet in a separate terminal with the following command: |
| 25 | |
| 26 | ```bash |
| 27 | anvil |
| 28 | ``` |
| 29 | |
| 30 | Then inside your project move into the `contracts` package and deploy it locally. |
| 31 | |
| 32 | ```bash |
| 33 | cd contracts |
| 34 | bun run deploy:local |
| 35 | ``` |
| 36 | |
| 37 | This will compile the contracts, export types, and deploy to the Anvil testnet. |
| 38 | |
| 39 | Now move back into the root of the project and run the dev command to start up the whole app. |
| 40 | |
| 41 | ```bash |
| 42 | cd ../ |
| 43 | bun run dev |
| 44 | ``` |
| 45 | |
| 46 | You should be able to call the contract counter state as well as the API in the server, with type sharing across the entire repo! |
| 47 | |
| 48 | ## Docs |
| 49 | |
| 50 | Please visit the [official docs site](https://forge.bhvr.dev) for more info. |
| 51 | |
| 52 | ## Questions |
| 53 | |
| 54 | [Feel free to contact me!](https://stevedylan.dev/links) |