foodForward

FoodForward

FoodForward is a revolutionary web application dedicated to reducing food wastage by facilitating the connection between restaurants with surplus food and NGOs or individuals in need. In today’s world, where food security remains a pressing issue, FoodForward serves as a bridge, ensuring that excess food from restaurants doesn’t go to waste but instead reaches those who need it the most.

Key Features

Target Audience

Tech Stack

Frontend

Backend

Payment Processing

Prerequisites

Before you begin, ensure you have:

Installation & Setup

1. Clone the project

git clone https://github.com/Sathya-reddy1658/WEBHACK1-Project.git
cd WEBHACK1-Project

2. Install dependencies

npm install

3. Environment Setup

Create a .env file in the root directory (you can copy from .env.example):

cp .env.example .env

Then update the .env file with your credentials:

STRIPE_SECRET_KEY=your_stripe_secret_key
BASE_URL=http://localhost:3000
DATABASE_URL=your_mongodb_connection_string

Note: Replace your_stripe_secret_key and your_mongodb_connection_string with your actual credentials.

4. Generate Prisma Client

npx prisma generate

Note: The application has a prestart script that automatically runs prisma generate before starting the server, so you don’t need to run it manually each time.

5. Seed the Database

Populate the database with sample NGOs:

npm run seed

If you encounter a DNS resolution error, verify:

Running the Application

Development Mode

npm start

or

npm run dev

The application will be available at http://localhost:3000

Available Scripts

Database Schema

The application uses Prisma ORM with the following MongoDB models:

User

NGO

UserDonation

RestaurantDonation

Authentication Features

Registration

Login

Logout

UI Integration

Donation Features

User Donations (Stripe Integration)

Restaurant Donations

API Endpoints

Authentication

Pages

NGO Management

Donations

Testing the Application

1. Test Registration

2. Test Login

3. Test User Donation

4. Test Restaurant Donation