Morocco Medication API — Pharmaceutical Data Platform
A secure REST API for centralized access, management, and synchronization of Moroccan pharmaceutical data.
Morocco Medication API is a backend platform built with Node.js, Express, and PostgreSQL to centralize and manage Moroccan pharmaceutical data. It provides a documented REST API, advanced medication search, pricing and reimbursement information, JWT authentication with role-based access control, and automated CNOPS data synchronization. Its modular architecture, automated tests, and serverless configuration support maintainability and deployment.

Problem addressed
Information about medications available in Morocco, including prices, active ingredients, manufacturers, and reimbursement conditions, comes from multiple sources and datasets with different structures. This fragmentation makes the data difficult to access, maintain, and integrate into digital applications. Developers need structured, secure, and standardized access to pharmaceutical information without having to implement their own data ingestion, search, and synchronization mechanisms.
Objectives
Architecture
I developed a modular backend platform using Node.js, Express, and PostgreSQL, with Prisma ORM for database access and persistence. The solution exposes REST endpoints for medication search, detailed pharmaceutical information, manufacturers, active ingredients, prices, and reimbursement data. Public read operations are separated from administrative functions secured through JWT authentication and RBAC. A synchronization mechanism connected to official CNOPS sources, together with a scheduled Vercel Cron job, enables automated data updates. The project also integrates Swagger for API documentation, automated testing with Jest and Supertest, and a web interface featuring medication search, filtering, sorting, and pagination.