A responsive donation platform connecting donors with communities
π Features β’ π Setup β’ π οΈ Tech Stack β’ π‘ API
Anugrah (Sanskrit: ΰ€ ΰ€¨ΰ₯ΰ€ΰ₯ΰ€°ΰ€Ή - meaning grace or blessing) is a full-stack donation platform that allows users to donate items by submitting a form with item details, images, and location information. Built with session-based authentication and real-time form validation.
|
|
β Node.js >= 14.0.0
β MongoDB (local or Atlas)
β npm# 1οΈβ£ Clone the repository
git clone https://github.com/yourusername/anugrah.git
cd anugrah
# 2οΈβ£ Install dependencies
npm install
# 3οΈβ£ Setup environment variables (if applicable)
# Create .env file with:
MONGO_URI=your_mongodb_connection_string
SESSION_SECRET=your_secret_key
# 4οΈβ£ Start the server
node server.js
# 5οΈβ£ Open in browser
# Visit http://localhost:5000anugrah/
β
βββ π public/
β βββ donation.css # Main stylesheet
β βββ donor.png # Favicon/icon
β βββ home.html # Home page
β
βββ π views/
β βββ donate.html # Donation form
β
βββ π uploads/ # Uploaded images
β
βββ π models/
β βββ Donor.js # Mongoose schema
β
βββ π server.js # Main server file
βββ π package.json # Dependencies
βββ π README.md # Documentation
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/ |
Serve home page | β |
GET |
/donate |
Serve donation form | β |
POST |
/donor |
Handle form submission (with image and location) | β |
GET |
/logout |
Destroy session and log out user | β |
{
item: String, // Item name/title
description: String, // Detailed description
latitude: Number, // Geographic latitude
longitude: Number, // Geographic longitude
imagePath: String, // Path to uploaded image
timestamp: { // Auto-generated timestamp
type: Date,
default: Date.now
}
}- β Submit valid form entries
- β Submit invalid entries (test validation)
- β Grant location permission
- β Deny location permission
- β Upload supported image formats (.jpg, .png)
- β Verify data saved to MongoDB
- β Test session authentication
- β Test logout functionality
Clean landing page with easy navigation
Intuitive form with real-time validation
Easy image upload with preview
Automatic location detection
Success confirmations and feedback
Secure login and session management
Works perfectly on all devices
Beautiful and functional interface
Contributions are welcome! Here's how:
# Fork the repository
# Create your feature branch
git checkout -b feature/AmazingFeature
# Commit your changes
git commit -m 'Add some AmazingFeature'
# Push to the branch
git push origin feature/AmazingFeature
# Open a Pull Request- MDN Web Docs - Web development resources
- Express.js - Web framework
- Mongoose - MongoDB ODM
- jQuery - JavaScript library
- Open Source Community β€οΈ
This project is licensed under the MIT License - see the LICENSE file for details.



















