Skip to content

neutron420/Sharebite

Repository files navigation

ShareBite - Food Donation & Hunger Help Platform

Next.js PostgreSQL Prisma Tailwind CSS Cloudflare R2 Bun

ShareBite is a full-stack platform designed to bridge the gap between food donors (restaurants, hotels, event organizers) and NGOs/Volunteers. Our mission is to reduce food waste and ensure that surplus food reaches those who need it most.


Features

Role-Based Access Control

  • DONOR: Post surplus food donations, manage listings, and approve pickup requests.
  • NGO: Browse available food in real-time, request pickups, and track collected donations.
  • ADMIN: Monitor platform activity, moderate users, and manage system health.

Core Functionality

  • Real-time Donation Posting: Donors can list food with quantity, category, and expiry data.
  • Geolocation Support: Find nearby donations using precise latitude and longitude coordinates.
  • Media Support: High-quality food images stored securely on Cloudflare R2.
  • Intuitive Lifecycle: Track donations from AVAILABLE to REQUESTED to APPROVED to COLLECTED.
  • Review System: Build community trust through peer-to-peer ratings and feedback.

Tech Stack


Project Structure

├── app/               # Next.js App Router (Pages, Components, API)
├── prisma/            # Database Schema & Migrations
│   ├── schema.prisma  # Core Data Models
│   └── migrations/    # Versioned DB Changes
├── public/            # Static Assets
└── components/        # Reusable UI Components

Getting Started

1. Prerequisites

Ensure you have Bun installed on your machine.

2. Clone the Repository

git clone https://github.com/your-username/sharebite.git
cd sharebite

3. Environment Setup

Create a .env file in the root directory and add your credentials:

DATABASE_URL="your_postgresql_connection_string"
R2_BUCKET_NAME="your_bucket_name"
# Add other necessary keys here

4. Install Dependencies

bun install

5. Database Setup

bunx prisma generate
bunx prisma migrate dev

6. Run the Application

bun dev

Open http://localhost:3000 with your browser to see the result.


Scalability Roadmap

  • PostGIS: Advanced spatial queries for radius-based search.
  • Background Jobs: Automated expiry status updates using Cron.
  • Real-time Notifications: WebSockets for instant pickup request alerts.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages