WasteToWealth is a web application that bridges the gap between farmers who produce agricultural waste and companies that can utilize this waste for various industrial purposes. This platform facilitates sustainable waste management by connecting waste producers with waste consumers.
This is a college-level Node.js web application built with Express.js that enables:
wastetowealth/
โโโ models/ # Mongoose schemas
โ โโโ FarmersListing.js # Farmer waste listings
โ โโโ CompanyListing.js # Company requirements
โ โโโ farmerlogin.js # Farmer user model
โ โโโ companylogin.js # Company user model
โโโ routes/ # Route handlers
โ โโโ farmerRoutes.js # Farmer-specific routes
โ โโโ companyRoutes.js # Company-specific routes
โโโ middleware/ # Custom middleware
โ โโโ farmerauth.js # Farmer authentication
โ โโโ companyauth.js # Company authentication
โ โโโ ... # Other middleware
โโโ views/ # EJS templates
โ โโโ home.ejs # Home page
โ โโโ index.ejs # Farmer listings view
โ โโโ indexcompany.ejs # Company listings view
โ โโโ ... # Other view templates
โโโ public/ # Static assets
โ โโโ css/ # Stylesheets
โ โโโ uploads/ # Uploaded images
โโโ tests/ # Selenium test suite
โ โโโ selenium_tests.py # Main test file
โ โโโ ... # Other test files
โโโ app.js # Main application file
โโโ package.json # Dependencies
git clone <repository-url>
cd wastetowealth
npm install
# On Windows
net start MongoDB
# On macOS/Linux
mongod
npm start
Or for development with auto-restart:
npx nodemon app.js
http://localhost:8080
The project includes comprehensive Selenium tests for end-to-end testing.
cd tests
pip install -r requirements.txt
# Run all tests
python run_tests.py
# Run specific test file
python improved_selenium_tests.py
# Run with unittest
python -m unittest improved_selenium_tests.WasteToWealthTests -v
โ Home page navigation โ Farmer registration and login โ Company registration and login โ Creating and managing listings โ Viewing and browsing listings โ Logout functionality โ Form validation โ Error handling
{
farmerName: String,
wastetype: String,
quantity: Number,
location: String,
contactPhone: String,
image: String,
email: String,
createdAt: Date
}
{
companyName: String,
wastetypeRequired: String,
requiredQuantity: Number,
location: String,
contactEmail: String,
contactPhone: String,
description: String,
createdAt: Date
}
GET / - Home pageGET /login - Login selection pageGET /register - Registration selection pageGET /farmer/login - Farmer loginGET /farmer/register - Farmer registrationGET /farmers - View all farmer listingsGET /farmers/new - Create new listingGET /farmers/:id - View specific listingGET /company/login1 - Company loginGET /company/register - Company registrationGET /companies - View all company listingsGET /companies/new - Create new requirementGET /companies/:id - View specific requirementThis is a college project, but contributions are welcome!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the ISC License.
Pramod - College Student
This project demonstrates full-stack web development skills with user authentication, database integration, and automated testing.