DEV Community

Waichari
Waichari Subscriber

Posted on • Edited on

What if your neighbourhood was a DAO?

DEV Weekend Challenge: Community

This is a submission for the DEV Weekend Challenge: Community

The Community

Every community has the same unsolved problem: how do you pool resources, make collective decisions, and hold outcomes accountable β€” without a middleman taking a cut or a government that never shows up?
UjamaaDAO was built for that. The name comes from Ujamaa (Swahili for familyhood), the cooperative economics philosophy that says communities thrive when resources, labor, and governance belong to the people themselves.
The first real-world context is Kenyan wards β€” the smallest units of Kenya's devolved government, where informal economies are massive, trust in institutions is low, and M-Pesa already proves communities will adopt digital financial tools when they're built right. But the platform is designed for any organized community: a village, a diaspora group, a housing cooperative, a trade guild, an open-source project's contributor base.
And because a community sovereignty platform should practice what it preaches β€” the codebase is fully open source (MIT licensed). Community-owned software, for community-owned governance.

What I Built
UjamaaDAO is a neighborhood sovereignty platform β€” cooperative governance, community project funding, and a skills/goods marketplace, all in one.
Three interlocking layers:
πŸ›οΈ Governance β€” Communities vote on proposals, fund shared projects, and track real outcomes. On-chain governance records, off-chain UX. No one needs to know what a blockchain is to participate.
πŸ’° Economy β€” Two community tokens: PR (Participation) tokens earned by contributing (soulbound β€” non-transferable, non-cashable, a reputation layer), and UT (Utility) tokens that power internal transactions. Real money flows via M-Pesa to platform accounts β€” always auditable, never peer-to-peer.
πŸ›’ Marketplace β€” Members list skills and goods for discovery. Not a checkout flow β€” a trust layer. The community already knows each other; the marketplace makes that visible and searchable.
Current state (honest):
WhatStatusBackend API β€” 12 modules, 80-model Prisma schemaβœ… Running173 tests β€” auth, user, economyβœ… Green, CI passingFrontend β€” Next.js 15, 15 routes, Chai palette design systemβœ… ActiveMagic-link auth + Privy embedded walletsβœ… Working end-to-endFull Docker dev stack (make dev)βœ… One commandM-Pesa integrationπŸ”Ά Stubbed β€” Daraja API nextSmart contractsπŸ”Ά Foundry scaffold ready β€” Solidity next
It's not finished. But the foundation is real, tested, and running.

Demo

Running locally via Docker. One command starts the full stack β€” API, worker, PostgreSQL, Redis, frontend, and MailHog for dev email.

The landing page β€” where community members enter their email to get started:


To run it yourself:
bashgit clone https://github.com/waicharikim/UJAMAA_DAO.git
cd UJAMAA_DAO/backend
make dev # starts all 7 services
make db-migrate # first run only


Visit `http://localhost:3000` β†’ register β†’ check `http://localhost:8025` for your magic link.

---

## Code

**[github.com/waicharikim/UJAMAA_DAO](https://github.com/waicharikim/UJAMAA_DAO)** β€” MIT licensed, fully open source.
Enter fullscreen mode Exit fullscreen mode

UJAMAA_DAO/
β”œβ”€β”€ backend/ # Node.js 22 + Express + Prisma
β”‚ β”œβ”€β”€ src/modules/ # 12 feature modules (auth, user, economy, community…)
β”‚ β”œβ”€β”€ prisma/ # 80-model schema, migrations applied
β”‚ └── tests/ # 173 tests β€” auth (104), user (35), economy (34)
β”‚
β”œβ”€β”€ frontend/ # Next.js 15 (App Router)
β”‚ β”œβ”€β”€ app/ # 15 routes
β”‚ β”œβ”€β”€ components/ # Chai palette design system
β”‚ └── lib/api.ts # Typed HTTP client
β”‚
β”œβ”€β”€ contracts/ # Foundry scaffold β€” Base Sepolia β†’ Mainnet
└── docker/ # Full Compose dev stack (7 services)




Three design decisions worth highlighting:

**Blockchain is invisible.** No seed phrases, no wallet addresses, no gas warnings. Privy handles embedded wallets silently on Base L2. On-chain means governance records and tokens. Everything the user touches is off-chain.

**Auth without passwords.** Magic links only. Built for users who may have low digital literacy β€” and who definitely shouldn't have to manage a crypto wallet manually.

**M-Pesa as the money layer.** Not because it's exotic β€” because it's what Kenyan communities already use and trust. The platform meets people where they are.

---

## How I Built It

| Layer | Technology |
|---|---|
| Runtime | Node.js 22, TypeScript (strict) |
| Framework | Express |
| Database | PostgreSQL 15 + Prisma ORM (80 models) |
| Queue | BullMQ + Redis |
| Testing | Vitest + Supertest β€” 173 tests |
| Auth | Email magic links (JWT), Africa's Talking SMS |
| Frontend | Next.js 15, TanStack Query v5, Tailwind v3, shadcn/ui |
| Wallet | Privy embedded wallets on Base L2 |
| Contracts | Foundry β€” Base Sepolia β†’ Base Mainnet |
| Payments | M-Pesa / Daraja API (in progress) |
| Infra | Docker Compose + Traefik |
| CI | GitHub Actions |

The hardest part wasn't the tech stack β€” it was the design constraints. Every decision had to answer one question: *would this work for someone in a Kenyan ward with a mid-range Android, patchy data, and no interest in learning what a blockchain is?*

That question ruled out passwords β†’ magic links. Ruled out visible wallets β†’ Privy embedded. Ruled out card payments β†’ M-Pesa. Ruled out web3-native UX patterns entirely.

The result is a platform that uses blockchain infrastructure under the hood β€” and feels like a community app on the surface. That's the whole point.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)