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.
- 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
# 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 secretCreate 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
# Development mode with hot reload
npm run dev
# Production mode
npm start
# Run linter
npm run lintPOST /api/auth/register- Create new accountPOST /api/auth/login- Login and receive JWT
GET /api/equipment- List your equipmentPOST /api/equipment- Add new equipmentPUT /api/equipment/:id- Update equipmentDELETE /api/equipment/:id- Remove equipment
POST /api/friends/request/:userId- Send friend requestPOST /api/friends/accept/:requestId- Accept requestGET /api/friends- List your friends
POST /api/loans- Create a loanPUT /api/loans/:id/return- Mark item returnedGET /api/loans/history- View loan historyGET /api/loans/stats- Get borrowing statistics
MIT