How devmohith/lost-and-found works
Project Type and Purpose
• This is a full-stack single-page application (SPA) built with Vue.js (frontend) and a simple JSON-server (db.json) acting as the “backend” data store.
• Users can register/login, create and edit lost/found item posts, search/filter items, and view matched items.
File Structure and README Insights
• Top-level “lostnfoundwebsite” folder contains:
• Vue.js source (src/) – components, pages, router, store, utility modules.
• Static assets (public/).
• Configuration files: vue.config.js, babel.config.js, jsconfig.json.
• db.json – the JSON‐server database.
• Dockerfile/.dockerignore – containerization setup.
• package.json/npm scripts: “serve” (vue-dev server), “db” (JSON-server).
• README highlights features (authentication, CRUD posts, matching algorithm) and dev scripts.
a. Client (User’s Browser)
• Vue SPA served over HTTPS
• Vue Router for page navigation
• Vuex store for state (auth, posts, filters)
b. API Server (JSON-server)
• Exposes REST endpoints for /users, /posts, /matches, etc.
• Persists data to db.json
c. Data Store
• db.json (flat file acting as database)
d. Deployment Infrastructure
• Docker container (local dev / optional prod)
• Vercel (static hosting of built SPA)
e. External Services (optional/future)
• Authentication provider (could be rolled into JSON-server or 3rd-party)
• Email/SMS notification service (if implemented later)
Relationships and Data Flows
• API Server → db.json: read/write operations
• Browser ← API Server: JSON payloads (item lists, user tokens)
• Deployment: Developer pushes code → CI/CD → Vercel hosts static files
• Docker: encapsulates JSON-server + db.json for consistent dev environment
Architectural Patterns & Design Principles
• Client-Server (separation of concerns)
• Component-based UI (Vue components under src/components & src/pages)
• Unidirectional data flow via Vuex store
• Infrastructure as Code (Dockerfile, config files)
• Single Responsibility per module (util.js for helper functions, url.js for endpoints)
Technologies & Frameworks
• Frontend: Vue.js, Vue Router, Vuex, webpack (via vue-cli)
• Backend (mock): JSON-server
• Build & Package: npm, babel
• Containerization: Docker
• Hosting: Vercel
Final Checklist
[ ] All main components labeled (Browser, SPA, API, DB, Docker, Vercel)
[ ] Notes on key technologies next to each component