Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Five Project - Smart Locker Marketplace

Overview

The Five Project is a smart locker-based rental and resale marketplace tailored for university students. Our platform enables students to rent or sell second-hand items securely and conveniently through smart lockers distributed across campus.

Users can browse available items, unlock lockers by paying a fee, and either rent or purchase items. This system minimizes the hassle of in-person exchanges and provides a contactless, secure, and efficient solution for managing second-hand goods on campus.

Motivation

Traditional second-hand marketplaces require in-person meetups, which can be inconvenient and unreliable. Sometimes, it is possible for students to have danger when meet up with someone. University students often have excess items they want to sell but lack an easy way to do so. Similarly, short-term rentals of everyday necessities (e.g., chargers, umbrellas, textbooks) are in high demand, yet campus stores often charge high prices.

Our platform solves these problems by offering:

  • A secure, contactless rental and resale system.
  • Smart lockers for item storage and exchange.
  • Automated transactions using a virtual currency system.
  • A user rating system to build trust and accountability.
  • Penalty and reminder systems to ensure timely returns of rented items.

Features

  • Item Listing: Users can list items for rent or sale, with AI-generated descriptions.
  • Smart Locker Access: Secure unlocking and automated return handling.
  • Campus Map & Navigation: Google Maps integration for finding nearby lockers.
  • Virtual Currency Payments: Transactions conducted via in-platform currency.
  • Rating System: Users rate each other to build trust.
  • Overdue Management: Late returns incur penalties and restricted access and may decrease the rate for that person.

Tech Stack

Frontend

  • React with JSX for dynamic UI rendering
  • Axios for API requests
  • Google Maps API for navigation
  • OpenAI API for tagging product
  • Google Account API for login our page

Backend

  • Node.js with Express.js for server logic
  • MongoDB for NoSQL database storage
  • Mongoose for data modeling
  • JWT Authentication for secure user access

Installation & Setup

How does MVC work? The backend was initialized by creating a server directory with structured subfolders: models, controllers, routes, and config. We installed essential backend dependencies, including express, mongoose, dotenv, cors, morgan, and body-parser, and configured MongoDB Atlas for database connectivity. The server was set up to run on port 5003, with routes handling API requests for item creation and retrieval. For the frontend, we initialized a client directory and installed React 18, using Webpack & Babel for a custom build. A basic React app was set up with axios for API communication, demonstrating the connection between the frontend and backend.

Quick Start

Use this flow to run the project locally on localhost.

Prerequisites

  • Node.js 18+ recommended
  • npm
  • Internet access to reach MongoDB Atlas and Google APIs

1. Install dependencies

cd server && npm install
cd ../client && npm install

2. Verify local environment files

Create local environment files from the examples:

cp server/.env.example server/.env
cp client/.env.development.example client/.env.development

Important local defaults:

  • backend: http://localhost:5003
  • frontend: http://localhost:3000
  • Google OAuth callback: http://localhost:5003/api/auth/google/callback

3. Start the backend

cd server
node server.js

Expected log:

Server is running on http://localhost:5003
Successfully connected to MongoDB Atlas!

4. Start the frontend

In a second terminal:

cd client
npx webpack serve --mode development

Then open http://localhost:3000.

5. Smoke test

  • Home page: http://localhost:3000
  • Dashboard: http://localhost:3000/dashboard
  • Map: http://localhost:3000/map

If item images do not appear, check that the corresponding files exist under server/uploads/. If Google login fails, confirm the OAuth client in server/.env is still valid in Google Cloud.

Notes

  • The backend uses MongoDB Atlas via server/.env; you do not need a separate local MongoDB instance for the default setup.
  • The frontend dev server runs through Webpack on port 3000.
  • The backend API runs on port 5003.

Contribution Guidelines

We follow Git Flow to maintain a structured development process:

  1. Branch Naming Conventions:

    • main: Stable release branch.
    • develop: Ongoing development.
    • feature/feature-name: New feature development.
    • bugfix/fix-description: Bug fixes.
    • hotfix/hotfix-description: Urgent production fixes.
    • release/x.x.x: Preparing new releases.
  2. Ticket Management:

    • Issues and user stories are managed via JIRA.
    • Contributors should reference issue numbers in commit messages.
  3. Pull Requests:

    • All changes must go through pull requests.
    • Each PR should be reviewed and approved by at least one team member before merging.
  4. Code Review:

    • Follow ESLint rules and ensure clean, modular code.
    • Write unit tests where applicable.

Future Improvements

  • Locker Item Scanning: Implement QR code-based locker authentication.
  • AI-Based Pricing Suggestions: Optimize item rental and sale pricing.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages