How deadok-core/travel works
TravelBlog is a React travel-community frontend. Visitors browse paginated travel posts and open post details; registered users can create posts and comments, authenticate, and manage profiles. The app routes these experiences through page components, which invoke API modules for server operations. Authentication state is held in Redux and persisted in local storage; a shared Axios client attaches stored tokens. README documents the major user-facing capabilities and endpoints; some component wiring is supported by the SOURCE INDEX rather than excerpts, so uncertain links are omitted.
Main entry points: App.tsx Route shell · posts.ts Posts API · Login.tsx Login page · auth.ts Auth API
Components 25
Application and navigation
- Route shell
src/App/App.tsx - Site header
src/Components/Pages/Header/Header.tsx
Authentication and identity
- Login page
src/Components/Pages/Login/Login.tsx - Registration page
src/Components/Pages/Register/Register.tsx - Auth API
src/api/auth/auth.ts - Auth state
src/Store/authSlice.tsx - Auth hooks
src/Hooks/useAuthDispatch.ts
Travel posts and discussion
- Post list page
src/Components/Pages/FetchCardList/FetchCardList.tsx - Post cards
src/Components/Widgets/CardList/CardList.tsx - Post card
src/Components/Widgets/Card/Card.tsx - Post detail
src/Components/Pages/Post/Post.tsx - Comments
src/Components/Widgets/Comments/Comments.tsx - Add comment
src/Components/Pages/AddComment/AddComment.tsx - Create post
src/Components/Pages/AddNewPost/AddNewPost.tsx - Posts API
src/api/posts/posts.ts
User profiles
- Profile page
src/Components/Pages/Profile/Profile.tsx - Edit profile
src/Components/Pages/EditProfile/EditProfile.tsx - User data loader
src/Components/Widgets/FetchUser/FetchUser.tsx - User API
src/api/user/user.ts
Shared data and interface
- Redux store
src/Store/store.tsx - Query client
src/api/queryClient.ts - HTTP client
src/api/client.ts - Shared UI
src/Components/UI
Other components
- Visitor
- TravelBlog API
Connections 37
- Visitor → Route shell: opens
src/App/App.tsx - Route shell → Site header: routes through
src/App/App.tsx - Route shell → Post list page: routes to
src/App/App.tsx - Route shell → Login page: routes to
src/App/App.tsx - Route shell → Registration page: routes to
src/App/App.tsx - Route shell → Profile page: routes to
src/App/App.tsx - Route shell → Edit profile: routes to
src/App/App.tsx - Route shell → Post detail: routes to
src/App/App.tsx - Route shell → Add comment: routes to
src/App/App.tsx - Route shell → Create post: routes to
src/App/App.tsx - Route shell → Redux store: provides
src/App/App.tsx - Login page → Auth API: authenticates
src/Components/Pages/Login/Login.tsx - Registration page → Auth API: registers
src/Components/Pages/Register/Register.tsx - Auth API → HTTP client: sends requests
src/api/auth/auth.ts - Auth API → TravelBlog API: calls endpoints
README.md - Login page → Auth state: updates
src/Components/Pages/Login/Login.tsx - Registration page → Auth state: updates
src/Components/Pages/Register/Register.tsx - Auth hooks → Redux store: selects and dispatches
src/Hooks/useAuthDispatch.ts - Post list page → Posts API: fetches posts
src/Components/Pages/FetchCardList/FetchCardList.tsx - Post list page → Post cards: renders
src/Components/Pages/FetchCardList/FetchCardList.tsx - Post cards → Post card: renders
src/Components/Widgets/CardList/CardList.tsx - Post detail → Posts API: fetches detail
src/Components/Pages/Post/Post.tsx - Post detail → Comments: renders
src/Components/Pages/Post/Post.tsx - Add comment → Posts API: submits comment
src/Components/Pages/AddComment/AddComment.tsx - Create post → Posts API: creates post
src/Components/Pages/AddNewPost/AddNewPost.tsx - Posts API → HTTP client: sends requests
src/api/posts/posts.ts - Posts API → TravelBlog API: calls endpoints
README.md - Profile page → Auth hooks: reads identity
src/Components/Pages/Profile/Profile.tsx - Edit profile → User API: updates profile
src/Components/Pages/EditProfile/EditProfile.tsx - Site header → User data loader: loads user
src/Components/Pages/Header/Header.tsx - User data loader → User API: fetches profile
src/Components/Widgets/FetchUser/FetchUser.tsx - User API → HTTP client: sends requests
src/api/user/user.ts - User API → TravelBlog API: calls endpoints
README.md - Route shell → Query client: configures queries
- Login page → Shared UI: uses controls
src/Components/Pages/Login/Login.tsx - Create post → Shared UI: uses controls
src/Components/Pages/AddNewPost/AddNewPost.tsx - Add comment → Shared UI: uses controls
src/Components/Pages/AddComment/AddComment.tsx