Skip to content

kadioko/Mamamtu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MamaMtu – Maternal & Newborn Health Support

License: MIT Next.js TypeScript

A comprehensive healthcare management system for maternal and newborn health services, built with Next.js 16, Prisma, and Tailwind CSS.

✨ Features

  • 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-themes with 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

🛠️ Tech Stack

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
Email Resend
Testing Jest + Testing Library

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm, yarn, or pnpm

Installation

  1. Clone the repository

    git clone https://github.com/kadioko/Mamamtu.git
    cd Mamamtu
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env

    Update .env with your configuration:

    • NEXTAUTH_SECRET - Generate with openssl rand -base64 32
    • RESEND_API_KEY - Optional, for email functionality
    • GOOGLE_CLIENT_ID/SECRET - Optional, for Google OAuth
  4. Initialize the database

    npm run prisma:generate
    npm run prisma:migrate
    npm run prisma:seed
  5. Start the development server

    npm run dev
  6. Open http://localhost:3000

Default Test Accounts

After seeding, you can login with:

📂 Project Structure

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

🧪 Testing

# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

📜 Available Scripts

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

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Healthcare workers and professionals for their invaluable input
  • Open source community for amazing tools and libraries

Built with ❤️ for maternal and newborn health

About

Maternal & Newborn Health Support System - A comprehensive healthcare management platform built with Next.js, Prisma, and TypeScript

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors