A modern web-based platform to report, search, and recover lost items on campus
Features โข Installation โข Usage โข Documentation โข Contributing
- About
- Problem Statement
- Features
- Technology Stack
- Screenshots
- Installation
- Configuration
- Usage
- Project Structure
- Database Schema
- API Endpoints
- Troubleshooting
- Contributing
- License
- Contact
Campus Lost & Found Portal is a full-stack web application designed to help students and staff efficiently report and recover lost items on campus. It replaces inefficient manual tracking methods (notice boards, WhatsApp groups) with a centralized, organized digital platform.
In educational institutions, lost items are typically managed through:
- โ Physical notice boards (limited reach)
- โ WhatsApp groups (unorganized, hard to search)
- โ Word-of-mouth (unreliable)
Our Solution:
- โ Centralized digital platform
- โ Image-based item identification
- โ Advanced search and filtering
- โ Real-time updates
- โ Direct contact between finders and owners
In many colleges, offices, hostels, and public places, students and staff frequently lose personal belongings such as:
- ID cards
- Wallets
- Mobile phones
- Keys
- Water bottles
- Laptops
Current Challenges:
- Difficulty tracking lost items
- No centralized record system
- Time wastage for students and administrators
- Low recovery chances
Our Solution Provides:
- User-friendly interface
- Secure data storage in MySQL
- CRUD operations using Java Servlets, JSP, and JDBC
- Search and filtering options
- Image upload for better identification
- Improved transparency and organization
| Feature | Description |
|---|---|
| ๐ User Authentication | Secure registration and login system |
| ๐ Report Lost Items | Report lost items with detailed descriptions and images |
| โ Report Found Items | Help others by reporting found items |
| ๐ Advanced Search | Filter items by name, location, date |
| ๐ผ๏ธ Image Upload | Upload photos for better item identification |
| ๐ฑ Responsive Design | Works seamlessly on mobile, tablet, and desktop |
| ๐ Status Updates | Mark items as resolved when recovered |
| ๐ Personal Dashboard | View and manage your reported items |
| Feature | Description |
|---|---|
| ๐ฅ User Management | View and manage all registered users |
| ๐ Item Management | Access all lost and found items |
| ๐๏ธ Spam Control | Delete fake or inappropriate posts |
| ๐ Statistics Dashboard | View platform usage statistics |
| ๐ผ๏ธ Image Preview | View item images in full screen |
- MVC Architecture - Clean separation of concerns
- DAO Pattern - Organized database operations
- Session Management - Secure user sessions
- File Upload - Servlet 3.0+ multipart support
- Responsive UI - Bootstrap 5 with modern design
- Image Gallery - Grid layout with hover effects
- Modal Previews - Full-screen image viewing
- HTML5 - Semantic markup
- CSS3 - Modern styling with gradients and animations
- JavaScript - Dynamic interactions
- Bootstrap 5.3 - Responsive framework
- Bootstrap Icons - Icon library
- Java (JDK 8+) - Core programming language
- Servlets - Request handling
- JSP - Dynamic page generation
- JDBC - Database connectivity
- MySQL 8.x - Relational database
- Apache Tomcat 9.x/10.x - Servlet container
- MVC Pattern - Model-View-Controller
- DAO Pattern - Data Access Object
Modern hero section with gradient background and feature showcase
Card-based dashboard with quick action buttons
Clean form with drag-and-drop image upload and live preview
Responsive grid layout with hover zoom effects
Statistics overview with tabbed interface for managing users and items
Unified search with separated sections for lost and found items
Before you begin, ensure you have the following installed:
- โ JDK 8 or higher - Download
- โ Apache Tomcat 9.x or 10.x - Download
- โ MySQL Server 8.x - Download
- โ MySQL JDBC Driver - Download
- โ IDE (Optional) - Eclipse, IntelliJ IDEA, or NetBeans
git clone https://github.com/samarthhitnalli/CampusLostFound.git
cd CampusLostFoundStart MySQL and create the database:
mysql -u root -pRun the SQL script:
source database_schema.sqlOr manually execute:
CREATE DATABASE campus_lost_found;
USE campus_lost_found;
-- Create tables
CREATE TABLE users (
user_id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
phone VARCHAR(15) NOT NULL,
password VARCHAR(255) NOT NULL,
role ENUM('user', 'admin') DEFAULT 'user',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE lost_items (
lost_id INT PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
item_name VARCHAR(100) NOT NULL,
description TEXT,
location VARCHAR(255) NOT NULL,
lost_date DATE NOT NULL,
contact VARCHAR(15) NOT NULL,
image_path VARCHAR(255),
status ENUM('lost', 'resolved') DEFAULT 'lost',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE
);
CREATE TABLE found_items (
found_id INT PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
item_name VARCHAR(100) NOT NULL,
description TEXT,
location VARCHAR(255) NOT NULL,
found_date DATE NOT NULL,
contact VARCHAR(15) NOT NULL,
image_path VARCHAR(255),
status ENUM('found', 'resolved') DEFAULT 'found',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE
);
-- Insert default admin
INSERT INTO users (name, email, phone, password, role)
VALUES ('Admin', 'admin@campus.com', '9999999999', 'admin123', 'admin');Edit src/com/campus/util/DatabaseConnection.java:
private static final String URL = "jdbc:mysql://localhost:3306/campus_lost_found";
private static final String USERNAME = "root";
private static final String PASSWORD = "your_mysql_password"; // Update thisPlace mysql-connector-java-8.x.x.jar in:
WebContent/WEB-INF/lib/
Create the uploads folder:
WebContent/uploads/
-
Import Project
- File โ Import โ Existing Projects into Workspace
- Select project directory
-
Configure Build Path
- Right-click project โ Build Path โ Configure Build Path
- Add MySQL connector JAR to Libraries
-
Configure Tomcat
- Window โ Preferences โ Server โ Runtime Environments
- Add Apache Tomcat 9.x
- Browse to installation directory
-
Deploy
- Right-click project โ Run As โ Run on Server
- Select Tomcat server
If not using an IDE:
- Export project as WAR file
- Copy WAR to
tomcat/webapps/ - Start Tomcat:
# Windows
cd C:\apache-tomcat-9.0.x\bin
startup.bat
# Linux/Mac
cd /path/to/tomcat/bin
./startup.shFile: src/com/campus/util/DatabaseConnection.java
private static final String URL = "jdbc:mysql://localhost:3306/campus_lost_found";
private static final String USERNAME = "root";
private static final String PASSWORD = "your_password";- Default Port: 8080
- Context Path:
/CampusLostFound - Session Timeout: 30 minutes
File: WebContent/WEB-INF/web.xml
<session-config>
<session-timeout>30</session-timeout>
</session-config>- Max File Size: 5 MB
- Allowed Formats: JPG, PNG, GIF
- Upload Directory:
WebContent/uploads/
Open your browser and navigate to:
http://localhost:8080/CampusLostFound/
Email: admin@campus.com
Password: admin123
Email: john@campus.com
Password: pass123
- Click "Create Account" or "Sign In"
- Fill in your details
- Submit the form
- Navigate to Dashboard
- Click "Report Lost Item"
- Fill in item details:
- Item name
- Description
- Location where lost
- Date lost
- Contact number
- Upload image (optional)
- Submit
- Click "Report Found Item"
- Provide item details with image
- Submit
- Go to "View Lost Items" or "View Found Items"
- Use search filters:
- Search by item name
- Filter by location
- Filter by date
- Click item images for full-screen preview
- View contact information
- Call/message the finder/owner
- Mark item as "Resolved" after recovery
- Login with admin credentials
- View dashboard statistics
- Click "Users" tab
- View all registered users
- Monitor user activity
- Click "Lost Items" or "Found Items" tab
- View all reported items with images
- Delete spam/fake posts
- View total users count
- Check lost items count
- Check found items count
CampusLostFound/
โ
โโโ src/
โ โโโ com/
โ โโโ campus/
โ โโโ model/ # Data Models (POJOs)
โ โ โโโ User.java # User entity
โ โ โโโ LostItem.java # Lost item entity
โ โ โโโ FoundItem.java # Found item entity
โ โ
โ โโโ dao/ # Data Access Objects
โ โ โโโ UserDAO.java # User database operations
โ โ โโโ LostDAO.java # Lost items operations
โ โ โโโ FoundDAO.java # Found items operations
โ โ
โ โโโ servlet/ # Controllers
โ โ โโโ RegisterServlet.java # User registration
โ โ โโโ LoginServlet.java # User authentication
โ โ โโโ LogoutServlet.java # Session management
โ โ โโโ LostItemServlet.java # Lost item operations
โ โ โโโ FoundItemServlet.java# Found item operations
โ โ โโโ SearchServlet.java # Search functionality
โ โ
โ โโโ util/ # Utilities
โ โโโ DatabaseConnection.java # DB connection manager
โ
โโโ WebContent/ # Web Resources
โ โโโ uploads/ # Uploaded images
โ โ
โ โโโ WEB-INF/
โ โ โโโ lib/
โ โ โ โโโ mysql-connector-java-8.x.x.jar
โ โ โโโ web.xml # Deployment descriptor
โ โ
โ โโโ index.jsp # Landing page
โ โโโ login.jsp # Login page
โ โโโ register.jsp # Registration page
โ โโโ user-dashboard.jsp # User home
โ โโโ admin-dashboard.jsp # Admin panel
โ โโโ report-lost.jsp # Report lost form
โ โโโ report-found.jsp # Report found form
โ โโโ view-lost.jsp # Lost items gallery
โ โโโ view-found.jsp # Found items gallery
โ โโโ search-results.jsp # Search results
โ
โโโ database_schema.sql # Database setup script
โโโ README.md # This file
โโโ LICENSE # License file
| Column | Type | Constraints | Description |
|---|---|---|---|
| user_id | INT | PRIMARY KEY, AUTO_INCREMENT | Unique user identifier |
| name | VARCHAR(100) | NOT NULL | Full name |
| VARCHAR(100) | UNIQUE, NOT NULL | Email address | |
| phone | VARCHAR(15) | NOT NULL | Contact number |
| password | VARCHAR(255) | NOT NULL | User password |
| role | ENUM('user','admin') | DEFAULT 'user' | User role |
| created_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Registration date |
| Column | Type | Constraints | Description |
|---|---|---|---|
| lost_id | INT | PRIMARY KEY, AUTO_INCREMENT | Unique item identifier |
| user_id | INT | FOREIGN KEY โ users | Reporter user ID |
| item_name | VARCHAR(100) | NOT NULL | Name of item |
| description | TEXT | - | Detailed description |
| location | VARCHAR(255) | NOT NULL | Location where lost |
| lost_date | DATE | NOT NULL | Date when lost |
| contact | VARCHAR(15) | NOT NULL | Contact number |
| image_path | VARCHAR(255) | - | Path to uploaded image |
| status | ENUM('lost','resolved') | DEFAULT 'lost' | Item status |
| created_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Report date |
| Column | Type | Constraints | Description |
|---|---|---|---|
| found_id | INT | PRIMARY KEY, AUTO_INCREMENT | Unique item identifier |
| user_id | INT | FOREIGN KEY โ users | Reporter user ID |
| item_name | VARCHAR(100) | NOT NULL | Name of item |
| description | TEXT | - | Detailed description |
| location | VARCHAR(255) | NOT NULL | Location where found |
| found_date | DATE | NOT NULL | Date when found |
| contact | VARCHAR(15) | NOT NULL | Contact number |
| image_path | VARCHAR(255) | - | Path to uploaded image |
| status | ENUM('found','resolved') | DEFAULT 'found' | Item status |
| created_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Report date |
| Method | Endpoint | Description |
|---|---|---|
| POST | /register |
Register new user |
| POST | /login |
User login |
| GET | /logout |
User logout |
| Method | Endpoint | Parameters | Description |
|---|---|---|---|
| POST | /lost-item |
action=add | Report lost item |
| POST | /lost-item |
action=updateStatus | Mark as resolved |
| POST | /lost-item |
action=delete | Delete item (admin) |
| Method | Endpoint | Parameters | Description |
|---|---|---|---|
| POST | /found-item |
action=add | Report found item |
| POST | /found-item |
action=updateStatus | Mark as resolved |
| POST | /found-item |
action=delete | Delete item (admin) |
| Method | Endpoint | Parameters | Description |
|---|---|---|---|
| GET | /search |
keyword, location, date, type | Search items |
Solution:
1. Verify MySQL connector JAR is in WebContent/WEB-INF/lib/
2. Clean and rebuild project
3. Check Build Path configurationSolution:
1. Check if MySQL service is running:
# Windows
net start MySQL80
# Linux
sudo systemctl start mysql
2. Verify credentials in DatabaseConnection.java
3. Test connection string: jdbc:mysql://localhost:3306/campus_lost_found
4. Ensure database exists: SHOW DATABASES;Solution:
1. Check URL context path: /CampusLostFound/
2. Verify Tomcat deployment
3. Ensure JSP files are in WebContent/ directory
4. Check Tomcat logs in tomcat/logs/catalina.outSolution:
1. Create WebContent/uploads/ folder
2. Check folder permissions (read/write)
3. Verify file size (max 5MB)
4. Check file extension (jpg, png, gif)Solution:
1. Check image_path in database
2. Verify uploads folder exists and is accessible
3. Clear browser cache
4. Check browser DevTools console for 404 errorsSolution:
1. Ensure @WebServlet annotations are present
2. Clean and rebuild project
3. Check web.xml configuration
4. Restart Tomcat serverSolution:
<!-- Increase timeout in web.xml -->
<session-config>
<session-timeout>60</session-timeout> <!-- 60 minutes -->
</session-config>We welcome contributions from the community! Here's how you can help:
-
Fork the Repository
git clone https://github.com/samarthhitnalli/CampusLostFound.git
-
Create a Feature Branch
git checkout -b feature/AmazingFeature
-
Make Your Changes
- Write clean, documented code
- Follow existing code style
- Add comments where necessary
-
Commit Your Changes
git commit -m 'Add some AmazingFeature' -
Push to Branch
git push origin feature/AmazingFeature
-
Open a Pull Request
- Provide a clear description
- Reference any related issues
-
Java:
- Follow Java naming conventions
- Use meaningful variable names
- Add JavaDoc comments for classes and methods
-
JSP:
- Proper HTML5 semantic structure
- Consistent indentation (4 spaces)
- Separate concerns (logic vs presentation)
-
SQL:
- Use uppercase for SQL keywords
- Proper indexing for performance
- ๐ Bug fixes
- โจ New features
- ๐ Documentation improvements
- ๐จ UI/UX enhancements
- โก Performance optimizations
- ๐ Security improvements
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Samarth Hitnalli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- SAMARTH HITNALLI - Lead Developer - GitHub
- Bootstrap - UI Framework
- Bootstrap Icons - Icon Library
- Apache Tomcat - Servlet Container
- MySQL - Database System
- Stack Overflow community for troubleshooting help
- All contributors who helped improve this project
Found a bug or have a feature request?
- ๐ Report Bug
- ๐ก Request Feature
- ๐ Repository: https://github.com/samarthhitnalli/CampusLostFound
- ๐ Documentation: Wiki
- ๐ฅ Demo Video: YouTube to be Uploaded
- Email notifications when matching items are found
- SMS alerts for item recovery
- Mobile application (Android/iOS)
- Advanced AI-based image matching
- Multi-language support
- Chat system between users
- Password recovery functionality
- User rating and review system
- Analytics dashboard with charts
- Export reports to PDF
- Integration with campus ID system
- QR code generation for items
- Geolocation-based search
- Push notifications
- Social media integration
- Password hashing (BCrypt/Argon2)
- CSRF token protection
- SQL injection prevention
- XSS attack prevention
- Rate limiting
- Two-factor authentication
- Session encryption
- Input sanitization
If you found this project helpful, please consider:
- โญ Starring the repository
- ๐ Reporting bugs
- ๐ก Suggesting new features
- ๐ Improving documentation
- ๐ Submitting pull requests
Made with โค๏ธ by Samarth
Helping students reunite with their belongings, one item at a time