How samseralikhan/linkhive works
Project type and purpose
• Link Hive is a full-stack web application whose primary function is to let users sign up/log in via OTP, then create and manage shortened links.
• The frontend is a React single-page app; the backend is an Express.js API connecting to a MongoDB database and using Firebase for OTP services.
File structure
• Top-level folders:
• .github/workflows/CICD.yml → CI/CD pipeline configuration.
• backend/ → Node.js/Express API (routes, controllers, models, middleware, config).
• frontend/ → React app (pages, components, styles, Tailwind config).
• Backend:
• config/ holds database connection (db.js) and Firebase OTP credentials.
• controllers/ split by domain (auth, OTP, link).
• routes/ map HTTP endpoints to controllers.
• models/ define MongoDB schemas for users, OTPs, and links.
• Frontend:
• public/ with index.html.
• src/ contains pages/ (Login, OTP, Signup, Dashboard, etc.), components/, and a Config/Firebase.js for initializing Firebase.
README
• Confirms separate run steps for frontend (npm start) and backend (nodemon server.js).
• No explicit hosting details or external integrations beyond Firebase.
Diagramming conventions
• Browser → React app (internal event flow)
• React app → Express API (HTTP requests/responses)
• Express → MongoDB (read/write)
• Express → Firebase (OTP send/verify)
• GitHub → Build/Deploy → Hosting (if applicable)
• Green rectangles for frontend components
• Blue rectangles for backend components
• Purple cloud for external service (Firebase)