Skip to content

Latest commit

 

History

History
183 lines (158 loc) · 6.65 KB

File metadata and controls

183 lines (158 loc) · 6.65 KB

UniFind: University Lost and Found Network

UniFind is a web-based platform designed to assist university students, faculty, and staff in reporting and recovering lost and found items on campus. It provides an intuitive interface for reporting lost or found items, searching for items, and accessing information about the platform.

Table of Contents

  • Features
  • Technologies Used
  • Project Structure
  • Installation
  • Usage
  • API Endpoints
  • Database Schema
  • Contributing
  • Contact

Features

  • Report Lost/Found Items: Submit details and photos for lost or found items.
  • Search Items: Filter items by category, location, date, or status.
  • Admin Dashboard: Manage reported items and claims (accessible via admin.html).
  • How It Works: Guide on using the platform (working.html).
  • About Us: Information about the project and team (about.html).
  • Responsive Design: Accessible on desktop and mobile devices.

Technologies Used

1. Frontend:

  • HTML: Page structure (home.html, report.html, search.html, etc.)
  • CSS: Styling (styles.css)
  • JavaScript: Interactivity (script.js)

2. Backend:

  • Node.js: Server-side runtime (server.js)
  • Express.js: Web framework for API development

3. Database:

  • MySQL: Relational database (Lost_and_Found.sql)

4. Other:

  • Multer: For handling photo uploads (stored in uploads/)

Project Structure:

UniFind/
├── Backend/
│   ├── .vscode/                    # VSCode settings
│   ├── node_modules/               # Node.js dependencies
│   ├── uploads/                    # Directory for uploaded item photos
│   ├── Lost_and_Found.sql          # Database schema
│   ├── package-lock.json           # Dependency lock file
│   ├── package.json                # Project dependencies and scripts
│   └── server.js                   # Main server file
├── Frontend/
│   ├── .vscode/                    # VSCode settings
│   ├── about.html                  # About Us page
│   ├── admin.html                  # Admin dashboard
│   ├── home.html                   # Home page
│   ├── report.html                 # Report lost/found items
│   ├── script.js                   # JavaScript for interactivity
│   ├── search.html                 # Search items page
│   ├── styles.css                  # CSS styles
│   ├── working.html                # How It Works page
└── README.md                       # Project documentation

Installation

Follow these steps to set up the project locally:

1. Clone the Repository:

git clone https://github.com/yourusername/UniFind.git
cd UniFind

2. Install Backend Dependencies:

cd UniFind_Backend
npm install

3. Set Up MySQL Database:

• Install MySQL if not already installed.
• Create a database named unifind.
• Import the Lost_and_Found.sql file from either Back-End/ or Front-End/:

mysql -u yourusername -p unifind < UniFind_Backend/Lost_and_Found.sql

4. Configure Environment:

• In Backend/, create a .env file with:

DB_HOST=localhost
DB_USER=yourusername
DB_PASSWORD=yourpassword
DB_NAME=unifind
PORT=3000

5. Start the Server:

cd UniFind_Backend
node server.js

The application will be available at http://localhost:5000.

6. Serve Frontend:

• Place the Frontend/ files in a directory served by the backend (e.g., move to Backend/public/ if configured) or use a static server:

cd UniFind_Frontend
npx http-server

Access the frontend at the port specified.


Usage

  • Home Page: Access home.html to view the welcome page with navigation to report or search.
  • Report Page: Use report.html to submit lost or found item details, including photos.
  • Search Page: Navigate to search.html to find items using filters.
  • Admin Dashboard: Access admin.html for managing items and claims (requires authentication, if implemented).
  • How It Works: Visit working.html for usage instructions.
  • About Us: Check about.html for project and team details.

API Endpoints

The backend (server.js) provides RESTful APIs. Key endpoints include:

• POST /api/lost-items: Report a lost item.

  • Body: { name, description, category_id, location_id, date_lost, time_lost, color, features, photo }

• POST /api/found-items: Report a found item.

  • Body: { name, description, category_id, found_location_id, current_location, date_found, time_found, color, features, photo }

• GET /api/lost-items: Search lost items.

  • Query: ?category_id=1&location_id=2&status=Open

• GET /api/found-items: Search found items.

  • Query: Similar to lost items

• POST /api/claims: Submit a claim.

  • Body: { lost_item_id, found_item_id, user_id, claim_date }
Note: Verify endpoints against your server.js implementation.

Database Schema

The Lost_and_Found.sql file defines the MySQL schema with tables:

  • User: User details (ID, name, email, etc.).
  • Location: Campus locations (ID, building name, etc.).
  • Category: Item categories (ID, name, etc.).
  • Lost_Item: Lost item details (ID, reported_by, name, description, etc.).
  • Found_Item: Found item details (ID, reported_by, name, description, etc.).
  • Claim: Links lost and found items (ID, lost_item_id, found_item_id, etc.).

Foreign keys ensure data integrity. The ER diagram (UniFind_Backend/Final_ER.mwb) visualizes relationships.


Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a branch: git checkout -b feature/your-feature.
  3. Commit changes: git commit -m 'Add your feature'.
  4. Push: git push origin feature/your-feature.
  5. Open a pull request.

Please follow coding standards and include tests where applicable.


Contact

For questions or feedback, contact: Anant Nagaraj Hegde: anhunchalli@gmail.com
GitHub: AnantNagarajHegde


Thank you for exploring UniFind! We aim to simplify the recovery of lost items on university campuses!