How himajachaluvadi/lostnfound works
Project type and purpose
• LostNFound is a monolithic, full-stack web application built on the LAMP stack (Linux/Apache/MySQL/PHP).
• Purpose: allow campus users to report, search, and retrieve lost and found items via a simple web interface.
File structure
• Top-level directory “minipro” contains all PHP endpoints (login.php, register.php, post_lost_item.php, etc.), CSS, an uploads folder, and DB scripts.
• Key folders/files:
• css/styles.css – static styling
• uploads/ – file storage for item images
• config.php & db.php – database connection and configuration
• create_tables.php – schema initialization
• about.php, dashboard.php, history.php – core UI pages
• send_chat.php, load_chat.php – real-time messaging endpoints
README insights
• Confirms technology stack: HTML/CSS/JS frontend, PHP backend, MySQL database.
• Describes features: user authentication, item reporting, search/filter, chat, history.
a. Main components
• Web Client (Browser)
• Web Server (Apache + PHP)
• Database Server (MySQL)
• File Storage (uploads folder)
• (Optional) External Email/SMS service for notifications (if implemented later)
b. Relationships and interactions
1. User sends HTTP(S) requests from browser (login, post item, search).
2. Apache routes to PHP scripts (index.php, register.php, post_found_item.php, etc.).
3. PHP scripts read/write to MySQL via db.php/config.php.
4. For image uploads, PHP moves files into the uploads directory and stores file paths in the database.
5. Chat endpoints poll or push messages between users using load_chat.php and send_chat.php.
6. PHP returns rendered HTML/JSON back to the browser.
c. Architectural patterns
• Monolithic MVC-style:
• Views: .php files output HTML/CSS/JS
• Controllers: core PHP scripts handling form submissions, queries, session management
• Models: SQL queries encapsulated in db.php
• Stateless HTTP requests; session management via PHP sessions.
d. Key technologies
• Frontend: HTML, CSS, vanilla JS
• Backend: PHP 7+
• Database: MySQL
• File System: local disk for uploads
Detail
• Sub-components if necessary (Session Manager, Chat module).
• Authentication flow separately (login → session cookie → authorize dashboard).
• Scan/filter/search logic as part of the PHP layer.