Logo Lanfrica

makebelief/LMS-fee-payment-react-mpesa

Domain:

educationdigital infrastructure

Record type:

software
Creator:
mak
Host:
Student fee payment module for a Learning Management System built with React and Node.js, featuring M-Pesa STK Push integration. # 🏫 LMS Fee Payment System with M-Pesa Integration A modern Next.js and Express.js application for managing school fee payments via M-Pesa. ## 📋 Table of Contents - Prerequisites - Quick Start - Detailed Setup - Environment Setup - M-Pesa Integration - API Documentation - Database Setup - Testing - Deployment - Troubleshooting - Development Guidelines - Support ## 🚀 Prerequisites - Node.js (v18 or higher) - pnpm (v8 or higher) - ngrok (for M-Pesa callback URL) - MySQL (v8.0 or higher) - Make (for using Makefile commands) ## ⚡ Quick Start Using Makefile commands: ```bash # Install all dependencies make install # Set up environment files make setup-env # Start development servers make dev # Run tests make test # Build for production make build # Start production servers make start ``` ## 🔧 Detailed Setup 1. **Clone the Repository** ```bash git clone github.com cd LMS-fee-payment-react-mpesa ``` 2. **Install Dependencies** ```bash # Using make make install # Manual installation pnpm install cd frontend && pnpm install cd ../backend && pnpm install ``` ## 🔐 Environment Setup 1. **Create Environment Files** ```bash # Using make make setup-env # Manual setup cp .env.example .env cp frontend/.env.example frontend/.env.local cp backend/.env.example backend/.env ``` 2. **Configure Environment Variables** Frontend (.env.local): ```env NEXT_PUBLIC_MPESA_CONSUMER_KEY=your_consumer_key_here NEXT_PUBLIC_MPESA_CONSUMER_SECRET=your_consumer_secret_here NEXT_PUBLIC_MPESA_BUSINESS_SHORT_CODE=174379 NEXT_PUBLIC_MPESA_PASSKEY=your_passkey_here NEXT_PUBLIC_MPESA_CALLBACK_URL=your-domain NEXT_PUBLIC_API_URL=localhost NEXT_PUBLIC_BASE_URL=localhost ``` Backend (.env): ```env PORT=3001 MPESA_CONSUMER_KEY=your_consumer_key_here MPESA_CONSUMER_SECRET=your_consumer_secret_here MPESA_BUSINESS_SHORT_CODE=174379 MPESA_PASSKEY=your_passkey_here MPESA_CALLBACK_URL=yo

Languages

Licenses