Skip to content

s3bc40/eth-online-2025-rosca

Repository files navigation

ETHOnline 2025 Rosca

Overview

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.

Tech stack

Getting Started

Prerequisites

  • 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)

Installation

When you first clone the repository, you have two ways to install dependencies:

  1. Locally if you have the prerequisites installed and a UNIX-like environment (Linux, macOS, WSL2)
  2. Using the devcontainer if you have Docker and VSCode installed (or any IDE that supports devcontainers)

Local Installation

When you have the prerequisites installed, run the following commands:

cd ethonline-2025-rosca
pnpm install

It should install all dependencies for the monorepo. You can then proceed to set up Envio by:

cd apps/envio-indexer
pnpm run codegen

Or run from the root:

pnpm run envio:codegen

This 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:dev

If 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.local

Set the necessary environment variables in .env.local, then start the web app:

pnpm run dev

Using the Devcontainer

If 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.

  1. Open the project in VSCode
  2. When prompted, reopen the project in a devcontainer or use the command palette (Ctrl+Shift+P) and select "Dev Containers: Reopen in Container"
  3. 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)
  4. 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!

Build

WIP

Remote Caching

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 login

This 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 link

Useful Links

Learn more about the power of Turborepo:

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributors

Thanks to everyone who has contributed to ETHOnline 2025!