How amnaliya/notes-app-json-server works
This is a small React notes app: users create or edit colored notes, search active notes, and archive, restore, or delete notes. The entry point mounts the app inside a context provider; the app coordinates the form and note lists, while the provider owns note state and JSON-server requests. The README describes only the Vite template. The source excerpts show the client API calls, but not the server implementation; the package script identifies db.json as its backing data file.
Main entry points: App.jsx App coordinator · NotesContext.jsx Notes provider · Notecard.jsx Note card · main.jsx React entry
Components 11
Notes interface
- React entry
src/main.jsx - App coordinator
src/App.jsx - Search input
src/components/SearchBar.jsx - Note form
src/components/NoteForm.jsx - Active list
src/components/NotesList.jsx - Archive list
src/components/ArchiveList.jsx - Note card
src/components/Notecard.jsx
App state
- Notes provider
src/context/NotesContext.jsx
Persistence
- JSON-server API
- Notes data
db.json
Other components
- User
Connections 13
- User → App coordinator: uses
- React entry → App coordinator: mounts
src/main.jsx - React entry → Notes provider: wraps
src/main.jsx - App coordinator → Notes provider: reads state
src/App.jsx - App coordinator → Search input: renders
src/App.jsx - App coordinator → Note form: renders
src/App.jsx - App coordinator → Active list: renders
src/App.jsx - App coordinator → Archive list: renders
src/App.jsx - Active list → Note card: renders
src/components/NotesList.jsx - Archive list → Note card: renders
src/components/ArchiveList.jsx - Note card → Notes provider: invokes actions
src/components/Notecard.jsx - Notes provider → JSON-server API: reads and writes
src/context/NotesContext.jsx - JSON-server API → Notes data: persists notes