e2-module3-roles-specialist

Implements role enforcement and specialist registration for the EOS skincare app backend and frontend.

Updated May 1, 2026
One-click install
npx skills add https://github.com/RomeroSilvia/Eos --skill e2-module3-roles-specialist-romerosilvia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2-module3-roles-specialist
Source: https://github.com/RomeroSilvia/Eos/tree/main/agents/skills/e2-module3-roles-specialist
Command: npx skills add https://github.com/RomeroSilvia/Eos --skill e2-module3-roles-specialist-romerosilvia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It guides the implementation of Módulo 3 of the EOS academic project: enforcing user roles in an Express/Supabase backend and building the specialist registration flow with license verification status in the React Native app. ## Core Features & Use Cases - Role Enforcement: Extends JWT authentication to attach the user's role and adds a requireRole middleware that rejects unauthorized requests with a 403 ApiError. - Specialist Registration: Implements a backend module (routes, controller, service, repository) with multipart upload of DNI and title photos to the specialist-docs bucket, duplicate license detection, and pending license status. - Frontend Flow: Adds a conditional specialist registration path, a specialist status screen showing pending/rejected/verified states, and role-based navigation. - Use Case: A student building the EOS app uses this Skill to implement the complete M3 deliverable, including Spanish-language Jest tests for duplicate licenses, uploads, and role middleware, while keeping the integration contract stable for M4 and M5. ## Quick Start Use this skill to implement Módulo 3 role enforcement and specialist registration for the EOS project on branch feature/e2-roles-specialist-register.

Frequently Asked Questions about e2-module3-roles-specialist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement role-based access control in Express with Supabase?

Extend the authenticate middleware to read the user's role from the Supabase profiles table and attach it to req.user, then create a requireRole middleware that checks req.user.role against allowed roles and throws a 403 ApiError when access is denied.

How do I build a specialist registration endpoint with file uploads?

Create a POST /api/specialist/register route protected by authenticate that uses multer multipart handling, validates specialty and license number, checks for duplicate licenses, uploads DNI and title photos to the specialist-docs bucket, and inserts the profile with license_status pending.

Does this skill cover the specialist admin panel or search features?

No. The scope explicitly excludes M4 specialist panel, M5 specialist search and chat, M1 Apple Sign-In, and M2 push notifications. It only implements role enforcement, registration, status endpoint, and role-based navigation.

What tests are required for the specialist module?

Tests must be written in Spanish and cover duplicate license number returning 409, successful registration creating a pending profile, document upload using the specialist-docs bucket, and requireRole allowing matching roles while rejecting wrong roles or missing users with 403.

What integration contract does Módulo 3 expose to later modules?

M3 provides profiles.role and specialist_profiles.license_status in the database, the requireRole('specialist') middleware, and the GET /api/specialist/status endpoint. These are consumed by M4 and M5 and must remain stable.