A comprehensive healthcare management system for maternal and newborn health services, built with Next.js 16, Prisma, and Tailwind CSS.
- Patient Management - Complete patient records with medical history tracking
- Appointment Scheduling - Calendar-based scheduling with status management
- Medical Records - Secure health records with lab results and vitals
- Education Portal - Health education content for patients and staff
- Real-time Notifications - In-app, email, and SMS notification support
- Role-Based Access - Admin, Healthcare Provider, Patient, and Receptionist roles
- Dark Mode - System-aware dark/light mode via
next-themeswith SSR-safe toggle - Responsive Design - Mobile-first UI for healthcare workers in the field
- Analytics Dashboard - Health metrics charts and statistics visualization
- PWA Support - Install as app with offline access capabilities
- Internationalization - English and Swahili language support
- API Documentation - OpenAPI/Swagger spec at
/api/docs
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Database | Prisma + SQLite |
| Authentication | NextAuth.js |
| Styling | Tailwind CSS |
| UI Components | shadcn/ui + Radix UI |
| Forms | React Hook Form + Zod |
| Theming | next-themes |
| Resend | |
| Testing | Jest + Testing Library |
- Node.js 18+
- npm, yarn, or pnpm
-
Clone the repository
git clone https://github.com/kadioko/Mamamtu.git cd Mamamtu -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Update
.envwith your configuration:NEXTAUTH_SECRET- Generate withopenssl rand -base64 32RESEND_API_KEY- Optional, for email functionalityGOOGLE_CLIENT_ID/SECRET- Optional, for Google OAuth
-
Initialize the database
npm run prisma:generate npm run prisma:migrate npm run prisma:seed
-
Start the development server
npm run dev
After seeding, you can login with:
- Admin: admin@mamamtu.com
- Healthcare Provider: doctor@mamamtu.com
- Patient: patient@mamamtu.com
src/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ ├── appointments/ # Appointment pages
│ ├── auth/ # Authentication pages (+ loading.tsx skeleton)
│ ├── dashboard/ # Dashboard pages (+ loading.tsx skeleton)
│ ├── education/ # Education content pages
│ └── patients/ # Patient management pages
├── components/ # React components
│ ├── ui/ # Base UI components (shadcn/ui)
│ ├── layout/ # Layout components
│ ├── providers/ # React context providers (Theme, Session, WebSocket)
│ ├── patients/ # Patient components
│ ├── appointments/ # Appointment components
│ ├── education/ # Education components
│ └── notifications/ # Notification components
├── lib/ # Utilities & configurations
│ ├── auth.ts # NextAuth configuration
│ ├── prisma.ts # Prisma client
│ ├── rbac.ts # Role-based access control
│ └── security.ts # Security utilities
├── services/ # Business logic services
└── types/ # TypeScript type definitions
prisma/
├── schema.prisma # Database schema
├── migrations/ # Database migrations
└── seed.js # Database seed script
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm test |
Run tests |
npm run test:coverage |
Run tests with coverage |
npm run prisma:generate |
Generate Prisma client |
npm run prisma:migrate |
Run database migrations |
npm run prisma:seed |
Seed the database |
Contributions are welcome! Please read our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Healthcare workers and professionals for their invaluable input
- Open source community for amazing tools and libraries
Built with ❤️ for maternal and newborn health