How maihusatyam/notetaking-app works
Project Type and Purpose
• This is a full-stack MERN web application (“iNotebook”) for cloud-based note taking.
• Frontend: React single-page app (Vite, Tailwind).
• Backend: Node.js + Express REST API.
• Database: MongoDB Atlas for persistence.
Main Components
a. User Interface (Browser/Device)
b. Frontend SPA
• Pages & Components (Home, CreateNote, Navbar, Footer, NoteCard, NoteForm)
• Context Layer (NoteContext) for state management
• API Module (src/api/url.js) for HTTP calls
c. Backend API Server
• Express App (backend/index.js)
• Routes (note.route.js)
• Controllers (note.controller.js)
• Models (note.model.js using Mongoose)
d. Database
• MongoDB Atlas cluster
e. External Tools
• Postman (for testing), VS Code (IDE)
Relationships and Data Flows
• User ↔ Browser UI: user interacts with React components
• React SPA → Backend API: fetch/create/update/delete notes via REST endpoints (e.g., GET/POST /notes)
• Backend Controllers → Database: controllers issue queries through Mongoose models
• Database → Controllers → Frontend: JSON payloads flow back to the client
Architectural Patterns and Principles
• Frontend: Single-Page Application, component-based structure, Context API for global state
• Backend: MVC-inspired layering (Routes→Controllers→Models), RESTful API design
• Separation of concerns: UI, client logic, server logic, and data storage each live in distinct modules
• Config files: Vite/Tailwind setup in frontend; package.json scripts for dev and build