This is the backend server for FindMy, a lost and found platform for University of Ghana students. Users can report lost items, post found items, and connect with each other to recover belongings.
# FindMy Backend And System Architecture
# Overview
This is the backend server for **FindMy**, a lost and found platform for University of Ghana students. Users can report lost items, post found items, and connect with each other to recover belongings.
---
## Tech Stack
- **Runtime:** Node.js
- **Framework:** Express
- **Database:** MongoDB with Mongoose
- **Authentication:** JWT
- **Real-time Chat:** Socket.io
- **Email:** Nodemailer
- **File Upload:** Multer
- **Validation:** Joi
---
## Project Structure
```
├── src/
│ ├── apiTests/ # test scenareos for APIs
│ ├── config/ # Database config
│ ├── controllers/ # Request handlers
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── middleware/ # Auth, validation
│ ├── services/ # External services
│ ├── utils/ # Helpers, email
│ └── server.js # Entry point
├── docs/ # Documentation (comming soon)
├── .env
└── package.json
```
---
## Installation
### Prerequisites
- Node.js
- MongoDB
### Quick Setup
```bash
# Clone and install
git clone
github.com
cd Backend
npm install
# Setup environment
cp .env.example .env
# Edit .env with your values
# Start MongoDB (make sure it's running)
# Then start the server
npm run dev
```
---
## Environment Variables
```env
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb+srv://vkpinto1234_db_user:Hesoyam.m0ng0@
cluster0.uyd0fal.mongodb.net
JWT_SECRET=secret-key
JWT_EXPIRE=24h
EMAIL_USER="Zentech2099@gmail.com"
EMAIL_PASS="yrbl gpzh rqeb remh"
CLOUDINARY_URL=cloudinary://591534326352322:qMTC8u-i1dw9jlnR2HdeTjux2l4@dan6vxui8
```
---
## Database Schema
### Users
| Field | Type | Description |
| --------------- | -------- | ---------------------- |
| id | ObjectId | Unique identifier |
| studentId | String | Student ID (unique) |
| email …