How 23abhishek2024/foundify works
Project type and purpose
• Foundify is a monolithic full-stack web application for campus lost-and-found management.
• It provides user authentication, item posting, real-time chat, notifications, and admin approval.
File structure
• Top-level files:
– app.js: Express server entrypoint
– .env, package.json: config and dependencies
• Directories:
– models/: Mongoose schemas (user, lostItem, foundItem, comment, message)
– routes/: Express route modules (user, items, chat, notification)
– views/: EJS templates (pages and partials)
– public/: Static assets (CSS, client JS, uploads)
– node_modules/: third-party libraries
README for additional insights
• Tech stack: Node.js, Express, MongoDB/Mongoose, EJS, Socket.io
• Architectural patterns: MVC (models/routes/views), REST APIs, event-driven WebSocket chat
• Features: CRUD APIs, real-time messaging, notifications
Detailed separation of components
• Client/UI:
– Pages: login.ejs, index.ejs, chat.ejs, profile.ejs, reportLost/Found.ejs
– Static JS: public/js/socket.js
– Stylesheet: public/style.css
• Server – Routing layer:
– routes/user.js, items.js, chat.js, notification.js
– Middleware: session/JWT auth, file-upload
• Server – Business logic & data layer:
– models/*.js (User, LostItem, FoundItem, Comment, Message)
– admin approval logic inside items route/controller
• Real-time messaging:
– Socket.io initialization in app.js
– message persistence with Message model
• Data persistence & storage:
– MongoDB collections mapped via Mongoose
– public/uploads for image files