How devyanshu-kataria/careconnect works
Project type and purpose
• From the file tree, this is a full-stack medical appointment and records management application.
• Frontend: A React/Vite single-page application (SPA) under frontend/src.
• Backend: An Express.js API with Mongoose models for bookings, doctors, users, reviews, reports, prescriptions, authentication, and file uploads.
File structure
• Top-level directories: frontend/ and backend/.
• Frontend:
• src/pages, src/components, src/routes, src/context, src/hooks, src/utils – typical React architecture.
• ProtectedRoute → route guarding using JWT in context.
• Backend:
• Controllers/ → business logic for each resource (auth, booking, doctor, document, review, user).
• Routes/ → Express routers mounting controllers at /auth, /booking, /doctor, /documents, /review, /user, /upload.
• models/ → Mongoose schemas for each domain object.
• auth/verifyToken.js → JWT validation middleware.
• index.js → entrypoint that sets up Express, middleware, and route mounting.
• vercel.json → deployment config for Vercel (likely serverless functions).
README for additional insights
• README is empty; infer architecture details from file names: uses JWT authentication, file uploads (documents), React Context for auth state, Axios-style fetch hooks.
Elements
• Clear component labels (e.g., “React SPA”, “Express API”, “MongoDB”).
• UI → Router → API → Controllers → Models → Database
• Models → Database
• File upload route → File Storage
• Blue for frontend/UI
• Green for backend/API
• Orange for database/storage