Hackathon project around Rosca (Rotating Savings and Credit Association) built with Turborepo, Next.js, Envio and Foundry. The goal is to create a decentralized platform for managing Roscas using smart contracts. Basically we move the organizer role to a smart contract and allow users to create/join roscas, contribute funds, and withdraw their share when it's their turn. To avoid trust issues, we use a multisig wallet for the organizer role, SafeWallet for the multisig wallet. This project is bootstrapped with Turborepo, for easy monorepo management and high performance builds.
- Foundry - Smart contract development framework
- Pyth network - Real-time market data
- Envio - Perfomant blockchain indexer
- PaypalUSD - Paypal Stablecoin
- Turborepo - Monorepo management tool
- Next.js - React framework for building web applications
- TypeScript - Typed superset of JavaScript
- RainbowKit - React library for wallet connection
- Wagmi - React hooks for Ethereum
- Tailwind CSS - Utility-first CSS framework
- SafeWallet - Multisig wallet for secure fund management
- Node.js (version 18 or later)
- pnpm (version 9 or later)
- Foundry (version 1.3.0 or later)
- Docker (for devcontainer and/or running Envio)
When you first clone the repository, you have two ways to install dependencies:
- Locally if you have the prerequisites installed and a UNIX-like environment (Linux, macOS, WSL2)
- Using the devcontainer if you have Docker and VSCode installed (or any IDE that supports devcontainers)
When you have the prerequisites installed, run the following commands:
cd ethonline-2025-rosca
pnpm installIt should install all dependencies for the monorepo. You can then proceed to set up Envio by:
cd apps/envio-indexer
pnpm run codegenOr run from the root:
pnpm run envio:codegenThis will generate the necessary packages and containers for Envio.
Then you can start the Envio indexer:
cd apps/envio-indexer
pnpm run dev
# or from the root
pnpm run envio:devIf you manage to start the indexer, you can proceed to start the web app.
First setup the environment variables by copying the example file:
cd apps/web
cp .env.example .env.localSet the necessary environment variables in .env.local, then start the web app:
pnpm run devIf you have Docker and VSCode installed, you can open the project in a devcontainer. This will set up a container with all the necessary dependencies installed.
- Open the project in VSCode
- When prompted, reopen the project in a devcontainer or use the command palette (Ctrl+Shift+P) and select "Dev Containers: Reopen in Container"
- Wait for the container to build and start (or use the command palette and select "Dev Containers: Rebuild Container" if you don't get prompted)
- Once the container is running, you should be able to run the same commands as above to set up Envio and start the web app.
You should be ready to develop!
WIP
Tip
Vercel Remote Cache is free for all plans. Get started today at vercel.com.
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo login
# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo login
yarn exec turbo login
pnpm exec turbo loginThis will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo link
# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo link
yarn exec turbo link
pnpm exec turbo linkLearn more about the power of Turborepo:
This project is licensed under the MIT License. See the LICENSE file for details.
Thanks to everyone who has contributed to ETHOnline 2025!