How shareeep/fishmuggers-is216 works
Project type and purpose
• This is a full‑stack web application (“PetConnect”) that connects pet owners via social feeds, events, calendars, chat, and maps.
• Frontend: Vue 3 + Vite + Tailwind CSS application that runs in the browser.
• Backend: Node.js + Express REST API that proxies data to/from Firebase (Firestore, Auth, Storage).
• External services: Firebase (Auth, Database, Storage), Google Maps API.
File structure
• Top‑level:
· backend/ – Express app (app.js, routes, middleware, services/firebase.js)
· frontend/ – Vue app (src/, public/, configs)
• Patterns:
· “routes → controllers” style in backend (calendar, events, friends, messages, pets, posts, users).
· Middleware for auth/token validation and file upload.
· Service layer (services/firebase.js) encapsulating Firebase Admin interactions.
· Frontend uses Vue Router, separates Public vs Protected areas, and has an API service wrapper (src/services/api.js).
• Config & deployment: .env.example in both frontend/backend, Vite and PostCSS configs, Render.com deployment instructions in README.
Key insights from README
• Features: Pet posts feed, Events listings, Personal Calendar, Friends management, Profiles, Real‑time Chats.
• Deployment: Frontend as static site, Backend as web service on Render, environment variables for Firebase keys & backend URL.
1) Client Browser (Vue SPA)
2) Static Hosting / CDN (serving the built Vue app)
3) REST API Server (Node.js + Express)
4) Firebase Suite
– Authentication (Auth)
– Data Store (Firestore / Realtime DB)
– File Storage (Storage for images)
5) External API (Google Maps)
• Browser → Static Host (GET /index.html, app.js, assets)
• Browser → Google Maps API (for map rendering)
• Browser → REST API Server (HTTP calls via src/services/api.js)
• Browser ↔ Firebase Auth SDK (login, token retrieval)
• REST API Server → Firebase Admin SDK (reads/writes Firestore, uploads to Storage)
c. Architectural patterns & principles:
• Separation of concerns (Presentation layer vs API vs Data layer)
• Layered design in backend: Routes → Middleware (auth, upload) → Services → Firebase
• SPA routing (Public vs Protected) in frontend
• Token‑based stateless authentication: client stores JWT from backend or Firebase, attaches on API calls
d. Technologies/frameworks to annotate:
• Frontend: Vue 3, Vue Router, Vite, Tailwind CSS, Firebase JS SDK, Google Maps JS API
• Backend: Node.js, Express.js, Firebase Admin SDK, multer (upload middleware), dotenv
• Deployment: Render.com (Static Site + Web Service)