Skip to content

Eisha313/gearlocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GearLocker

A personal equipment lending library API that helps you track items borrowed and lent among friends, preventing lost gear and awkward "where's my drill?" conversations.

Features

  • JWT-based authentication with friend connections
  • Equipment inventory management with categories and conditions
  • Loan tracking with due dates and reminders
  • Friend request system for trusted borrowers/lenders
  • Loan history and borrower reliability statistics

Installation

# Clone the repository
git clone https://github.com/yourusername/gearlocker.git
cd gearlocker

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your MongoDB URI and JWT secret

Configuration

Create a .env file with the following variables:

PORT=3000
MONGODB_URI=mongodb://localhost:27017/gearlocker
JWT_SECRET=your-secret-key-here
JWT_EXPIRES_IN=7d

Usage

# Development mode with hot reload
npm run dev

# Production mode
npm start

# Run linter
npm run lint

API Endpoints

Authentication

  • POST /api/auth/register - Create new account
  • POST /api/auth/login - Login and receive JWT

Equipment

  • GET /api/equipment - List your equipment
  • POST /api/equipment - Add new equipment
  • PUT /api/equipment/:id - Update equipment
  • DELETE /api/equipment/:id - Remove equipment

Friends

  • POST /api/friends/request/:userId - Send friend request
  • POST /api/friends/accept/:requestId - Accept request
  • GET /api/friends - List your friends

Loans

  • POST /api/loans - Create a loan
  • PUT /api/loans/:id/return - Mark item returned
  • GET /api/loans/history - View loan history
  • GET /api/loans/stats - Get borrowing statistics

License

MIT

About

A personal equipment lending library API for tracking borrowed and lent items among friends

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors