A full-stack web application that connects food donors with volunteers to reduce food waste and help those in need.
-
User Management
- User and organization registration/login
- Profile management
- Role-based access (Donors, Volunteers, Organizations)
-
Donation System
- Create food donations with details
- Real-time donation tracking
- Image upload support
- Freshness rating system
- Emergency time window specification
-
Location Services
- MapmyIndia integration
- Location-based suggestions
- Distance calculation
- Real-time location tracking
-
Community Features
- Social feed
- Post creation and interaction
- Like and comment system
- User engagement metrics
-
Real-time Communication
- Socket.IO integration
- Live donation updates
- Instant notifications
- React + Vite
- TailwindCSS
- Socket.IO Client
- Flowbite React
- Progressive Web App (PWA) support
- Node.js
- Express.js
- MongoDB
- Socket.IO
- JWT Authentication
- Multer for file uploads
- Clone the repository:
git clone https://github.com/yourusername/trupt.git
cd trupt- Install dependencies:
# Frontend
cd Frontend
npm install
# Backend
cd ../Backend
npm install- Set up environment variables:
# Frontend (.env)
VITE_BASE_URL=http://localhost:3000
VITE_SOCKET_URL=http://localhost:3000
# Backend (.env)
PORT=3000
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
MAPMYINDIA_API_KEY=your_api_key# Frontend
cd Frontend
npm run dev
# Backend
cd Backend
npm run dev# Frontend
cd Frontend
npm run build
npm run preview
# Backend
cd Backend
npm startPOST /users/register- Register new userPOST /users/login- User loginGET /users/profile- Get user profileGET /users/logout- User logout
POST /orgs/registerOrg- Register new organizationPOST /orgs/loginOrg- Organization loginGET /orgs/profile- Get organization profileGET /orgs/logout- Organization logout
POST /donations/create- Create new donationGET /donations- Get all donationsPUT /donations/:id- Update donation status
GET /maps/get-suggestions- Get location suggestionsGET /maps/get-distance- Calculate distance between points
- JWT-based authentication
- Password hashing with bcrypt
- Token blacklisting
- Request validation
- File upload restrictions
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request