Skip to content
Brian Jiménez Landa
Student access platform with MetaMask sign-in, delivered in Feb 2026

Student sign-in that ties a MetaMask wallet to one verified university email

I built the API and most of the web app for a state university in Ecuador. Students register with their institutional email, verify it, link a MetaMask wallet and sign in with a wallet signature. Staff manage accounts from a role-based admin panel.

The problem

The university wanted students to sign in with a MetaMask wallet, and only students: each wallet had to belong to one verified institutional email address. Staff also needed a panel to see who had registered and to shut an account off right away.

What I built

  • An Express API for registration, email verification, password recovery and sign-in. Sign-up accepts only the university's email domain, and passwords are hashed with bcrypt.
  • Two ways to sign in: email and password plus a MetaMask signature, or the wallet alone. The API verifies each signature with ethers and allows one wallet per student. Linking a new wallet sends the student an email notice.
  • Server-side sessions. The API stores only a SHA-256 hash of each session token and checks the session on every request, so it can end a session at once. Each student keeps one active session: a new sign-in closes the old one inside a single SQLite transaction.
  • A role-based admin panel with registration stats, a paginated and searchable student list, and a detail view with the student's history. Disabling a student ends their sessions in the same transaction. A seed script creates the first admin account.
  • The student side: a portal of institutional modules with search, a My Account page, a wallet-linking step right after email verification and a session expiry check every 60 seconds. The registration field fixes the university's domain, so students type only their username.
  • A 15-page user manual and a 24-page technical manual covering architecture, database, REST API, auth flows, security and deployment, with Mermaid diagrams, in PDF and DOCX.

How it works

The API is ESM Node.js on Express, split into routes, services and small crypto and validation utilities. better-sqlite3 keeps users, wallets and sessions in one SQLite file. The schema script also upgrades an existing database in place when a column is added.

A JWT carries the user's role, but the token alone does not grant access. Middleware looks up the hashed session in the database on every request. That costs one read per call, and in exchange sign-out, the single-session rule and account disabling take effect immediately instead of when the 24-hour token expires.

I tightened the defaults. Helmet sets the security headers, and CORS compares the parsed hostname of the origin instead of doing a substring match that a look-alike domain could pass.

The front end is React 18 with TypeScript, Vite and Bootstrap 5. One shared MetaMask hook drives both sign-in screens: it requests the account and asks the wallet to sign through personal_sign. React Router splits student and admin routes by role, and the app re-validates the session with the API when it loads.

Mail goes out through Nodemailer over SMTP. The verification email walks a student through installing MetaMask and linking a wallet, and it is laid out with HTML tables so older mail clients render it. In production the API ran under pm2 behind nginx with TLS, and nginx served the front end as a static build.

Results

10 days
from first commit to the production deploy
15 + 24 pages
user manual and technical manual, in PDF and DOCX
17 of 19
commits across the API and the web app

Who else worked on it

The front end started from an earlier React prototype with sign-in, registration and password screens, and that prototype predates my first commit. On top of it I added the wallet-only sign-in, the session layer, the student portal, the account page and both admin screens, and I removed six files that were no longer used. I wrote the API. Git credits me with 17 of the 19 commits across both repos; the other 2 are production settings changed directly on the server. MetaMask and the SMTP mail service are third-party.

Full stack

JavaScript (ESM), Node.js 18+, Express 4, better-sqlite3 (SQLite), bcrypt, jsonwebtoken (JWT), ethers 6, Nodemailer, Helmet, React 18, TypeScript 5, Vite 5, React Router 7, Bootstrap 5, react-hot-toast, MetaMask (EIP-1193, personal_sign), pm2, nginx