How vipsibi/hotel-list-crud-application works
ERAMIKA is a hotel discovery and management application. Visitors browse featured stays or search and filter the hotel catalog, then view hotel details and locations on a map; managers can add, edit, and delete hotel records. The frontend routes pages through shared Redux hotel state and an API service, with a mock-data implementation available. The backend initializes a PostgreSQL hotel table and seed records. Backend route behavior and the live API transport are not excerpted, so those connections are not asserted as verified.
Main entry points: App.jsx Route shell · HotelList.jsx Hotel catalog · hotelSlice.js Hotel state and actions · HotelCard.jsx Hotel card
Components 20
Frontend experience
- Route shell
frontend/src/App.jsx - Hotel card
frontend/src/components/HotelCard.jsx - Location map
frontend/src/components/HotelMap.jsx - Pagination
frontend/src/components/Pagination.jsx - Success notice
frontend/src/components/SuccessModal.jsx
Hotel workflows
- Featured stays
frontend/src/pages/Home.jsx - Hotel catalog
frontend/src/pages/HotelList.jsx - Hotel editor
frontend/src/pages/HotelForm.jsx - Hotel details
frontend/src/pages/HotelDetail.jsx
Data services
- Hotel state and actions
frontend/src/features/hotels/hotelSlice.js - API service
frontend/src/services/api.js - Mock API
frontend/src/services/mockApi.js - Mock hotel data
frontend/src/app/data/mockHotels.js - Hotel slugs
frontend/src/utils/hotelSlug.js - Image URL helper
frontend/src/services/imageUrl.js
Backend storage
- Backend API server
backend/server.js - Hotel database setup
backend/db.js
Other components
- Visitor or manager
- PostgreSQL
- OpenStreetMap tiles
Connections 24
- Visitor or manager → Route shell: opens
frontend/src/App.jsx - Route shell → Featured stays: routes to
frontend/src/App.jsx - Route shell → Hotel catalog: routes to
frontend/src/App.jsx - Route shell → Hotel editor: routes to
frontend/src/App.jsx - Route shell → Hotel details: routes to
frontend/src/App.jsx - Featured stays → Hotel state and actions: dispatches fetch
frontend/src/pages/Home.jsx - Hotel catalog → Hotel state and actions: dispatches actions
frontend/src/pages/HotelList.jsx - Hotel catalog → Hotel card: renders
frontend/src/pages/HotelList.jsx - Hotel catalog → Pagination: renders
frontend/src/pages/HotelList.jsx - Hotel catalog → Success notice: renders
frontend/src/pages/HotelList.jsx - Hotel editor → Hotel state and actions: dispatches actions
frontend/src/pages/HotelForm.jsx - Hotel editor → Location map: renders
frontend/src/pages/HotelForm.jsx - Hotel details → Hotel state and actions: dispatches actions
frontend/src/pages/HotelDetail.jsx - Hotel details → Location map: renders
frontend/src/pages/HotelDetail.jsx - Hotel card → Hotel slugs: creates links
frontend/src/components/HotelCard.jsx - Hotel card → Image URL helper: resolves image
frontend/src/components/HotelCard.jsx - Hotel state and actions → API service: requests data
frontend/src/features/hotels/hotelSlice.js - API service → Mock API: uses mock requests
frontend/src/services/api.js - Mock API → Mock hotel data: loads seed data
frontend/src/services/mockApi.js - Mock API → Hotel slugs: matches slugs
frontend/src/services/mockApi.js - Location map → OpenStreetMap tiles: loads tiles
frontend/src/components/HotelMap.jsx - Backend API server → Hotel database setup: uses database setup
backend/server.js - Hotel database setup → PostgreSQL: creates and seeds
backend/db.js - API service → Backend API server: sends API requests