How berkesasa/react-redux_mini_album works
Project type and purpose
• This is a single‐page React application that implements a mini “album” bookshelf.
• It uses React for the UI, Redux Toolkit for state management (including RTK Query style APIs and custom thunks), axios for HTTP requests, faker-js for generating dummy data, and a JSON Server (driven by db.json) as a mock backend.
File structure
• Top‐level files:
• db.json – the mock JSON Server database
• package.json / package-lock.json – npm metadata and scripts (start, start:server)
• tailwind.config.js – CSS framework configuration
• public/ – static entry point (index.html, manifest, robots.txt)
• src/
• index.js → boots up React, attaches Redux store
• App.js → root layout, route handling (if any)
• components/ → reusable presentational components (Lists, ListItems, Buttons, Panels, Skeleton loaders)
• hooks/use-thunks.js → custom hook encapsulating dispatch of thunk actions
• store/
– index.js → configures Redux store, applies middleware
– apis/ → RTK Query‐style slices for albumsApi and photosApi (axios‐based)
– slices/ → non‐query slice for users (usersSlice.js)
– thunks/ → manual async thunks (addUser, fetchUsers, removeUser)
README for insights
• Confirms the above technology stack and purpose.
• Shows that running the dev server and JSON Server in parallel provides the “backend” on a separate port reading/writing db.json.
Elements
• Labels: each layer and major component (React UI, Redux Store, RTK Query APIs, Thunks, JSON Server, db.json)
• Blue rectangles for UI components
• Orange parallelograms for API layer
• Gray cloud for JSON Server service