A SvelteKit web application that allows well-wishers to anonymously donate to various social projects. No signup is required for donors. The platform provides an admin interface for tracking donations per project and integrates Mpesa for secure payments.
git clone https://github.com/yourusername/
HelpingHand.git
cd HelpingHand
npm install
.env
file in the root directory by copying the example:cp .env.example .env
Then edit .env
with your actual M-Pesa credentials:
# Server Configuration
PORT=5173
# M-Pesa Configuration
MPESA_ENVIRONMENT=sandbox
MPESA_CONSUMER_KEY=your_actual_consumer_key
MPESA_CONSUMER_SECRET=your_actual_consumer_secret
MPESA_BUSINESS_SHORT_CODE=your_actual_shortcode
MPESA_PASSKEY=your_actual_passkey
MPESA_CALLBACK_URL=https://your-ngrok-url.ngrok-free.app/api/mpesa/callback
MPESA_TIMEOUT_URL=https://your-ngrok-url.ngrok-free.app/api/mpesa/timeout
Note:
database/
folder and created automaticallyThe application includes automatic database initialization:
database/
folder if it doesn't existdonations.db
file automaticallyadmin
, password: admin123
)npx prisma migrate dev --name init
npx prisma db seed
Optional: Test database setup
npm run test:db
This will verify that the database directory and file are created correctly and that all tables are properly initialized.
npm run dev
ormake
Visit http://localhost:5173 to view the app.M-Pesa requires publicly accessible URLs for webhooks during development. ngrok creates secure tunnels to your localhost, making it perfect for testing M-Pesa integrations.
Option A: Download from website
Option B: Install via package manager
On macOS (using Homebrew):
brew install ngrok/ngrok/ngrok
On Windows (using Chocolatey):
choco install ngrok
On Linux (using Snap):
sudo snap install ngrok
ngrok config add-authtoken YOUR_AUTH_TOKEN
First, start your SvelteKit application:
npm run dev
Your app should be running on http://localhost:5173
In a new terminal window, create a tunnel to your local server:
ngrok http 5173
You'll see output similar to:
ngrok
Session Status online
Account [email protected]
Version 3.x.x
Region United States (us)
Latency -
Web Interface http://127.0.0.1:4040
Forwarding https://abc123.ngrok-free.app -> http://localhost:5173
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Use the ngrok HTTPS URL (e.g., https://abc123.ngrok-free.app
) in your M-Pesa configuration:
Update your .env file:
# Add your ngrok URL for M-Pesa callbacks
MPESA_CALLBACK_URL=https://abc123.ngrok-free.app/api/mpesa/callback
MPESA_RESULT_URL=https://abc123.ngrok-free.app/api/mpesa/result
Important Notes:
http://127.0.0.1:4040
to see incoming webhook requestssrc/lib/api/mpesa.ts
and exposed via src/routes/api/mpesa/+server.ts
.env
Enhanced Visual Design
User Experience Enhancements
Donation Features
Project Management
Admin Dashboard Improvements
User Engagement
Comprehensive Test Coverage
Code Quality
Security Enhancements
Performance Optimizations
Infrastructure Improvements
CI/CD Pipeline
Mobile Experience
Accessibility
Engagement Strategies
Community Building