Skip to content

Oduduwa Platform

I wrote migration tooling for MongoDB records and an Express tenant resolver that selects Sequelize models per request. The MySQL design shares user identity and keeps membership and event data in separate tenant databases.

How it’s built

How it’s built

Oduduwa Platform · Two-tenant membership platform for the Oduduwa Society and ATUNTO movement

The Oduduwa platform runs the membership, dues, events and publications sites for two related organisations from one Express API. I built a tenant resolver that picks per-request Sequelize models from two MySQL databases with shared user identity, 80 API routes across 14 route files, 13 model definitions, Paystack dues payments, a 276-line MongoDB-to-MySQL migration script, and two React front ends with 29 pages each.

API routes
80
tenant databases (oduduwa, wrnm)
2
Sequelize model definitions
13
pages per front end (13 admin)
29
lines of backend TypeScript
6,417

Technology and what it does here

Express 4 + TypeScript
API for memberships, dues, events, posts, documents and chat
Sequelize 6 + mysql2
Same model definitions registered against each tenant database
MySQL
Oduduwa_db holds shared users; each tenant DB holds memberships and events
Mongoose
Source side of the MongoDB-to-MySQL migration script
Paystack
Membership dues payments
JWT + bcryptjs
Auth, with tenant derived from host, not token
Resend / Nodemailer
Transactional email with per-tenant branding
React 18 + Vite + TanStack Query
Two branded front ends (frontend, wrnm-frontend)
TinyMCE
Rich-text editing of posts in the admin
Vitest
Front-end test setup

Implementation details

  • resolveTenant derives the tenant from Origin/Host or an X-Tenant header so a token minted on one host cannot be replayed on the other.
  • registry.ts defines User only on the oduduwa connection and registers all per-tenant models with real foreign keys on each DB.
  • ensureOduduwaMembership mirrors a membership across tenants.
  • migrateMongoToMysql.ts moves legacy MongoDB records into the MySQL schema.

Technologies

  • Express
  • MySQL
  • Sequelize
  • Multitenancy

Next project · Full Stack Software Engineer

Sigmant

Portfolio assistant

Gabriel’s projects, experience, and research