How bazuga02/stories-app-frontend works
This is a Next.js frontend for a story-publishing community, backed by an API. Readers browse published stories and Aesop fables, open story details, interact through bookmarks/comments, and optionally listen to narration. Authors register or sign in, then create, save, and publish stories; personal dashboard and admin tools support management. The graph preserves these distinct product areas. Connections are limited to relationships visible in excerpts or the SOURCE INDEX; several routes and integrations are unsampled.
Main entry points: api.ts API client · stories.service.ts Story operations · StoryPageClient.tsx Story detail route · HomeFeed.tsx Published story feed
Components 24
Identity
- Sign in and register
src/app/(auth)/login/LoginPageClient.tsx - Authentication
src/services/auth.service.ts - Session state
src/store/authStore.ts
Reading
- Editorial home
src/features/home/EditorialHome.tsx - Published story feed
src/features/feed/HomeFeed.tsx - Aesop fables
src/services/aesop-stories.service.ts - Story detail route
src/app/(site)/story/[id]/StoryPageClient.tsx - Story views
src/features/story/PublishedStoryView.tsx - Fable view
src/features/story/AesopStoryView.tsx - Audio narration
src/features/story/useStoryNarration.ts
Story authoring
- Story editor
src/app/(app)/editor/EditorPageClient.tsx - Markdown editor
src/components/editor/RichMarkdownEditor.tsx
Management
- Personal dashboard
src/app/(site)/dashboard/page.tsx - Admin dashboard
src/features/admin/AdminDashboard.tsx
API services
- Story operations
src/services/stories.service.ts - Bookmark operations
src/services/bookmarks.service.ts - Comment operations
src/services/comments.service.ts - Admin operations
src/services/admin.service.ts - API client
src/services/api.ts - Narration service
src/services/tts.service.ts
Other components
- Reader
- Author
- Administrator
- Stories backend
Connections 32
- Reader → Editorial home: browses
- Editorial home → Published story feed: renders
src/app/(site)/page.tsx - Editorial home → Aesop fables: loads fables
src/features/home/EditorialHome.tsx - Reader → Story detail route: opens story
src/app/(site)/story/[id]/StoryPageClient.tsx - Story detail route → Story views: renders
src/app/(site)/story/[id]/StoryPageClient.tsx - Story detail route → Fable view: renders
src/app/(site)/story/[id]/StoryPageClient.tsx - Story views → Comment operations: loads comments
src/features/story/PublishedStoryView.tsx - Story views → Audio narration: uses narration
src/features/story/PublishedStoryView.tsx - Audio narration → Narration service: requests audio
src/features/story/useStoryNarration.ts - Reader → Sign in and register: signs in
src/app/(auth)/login/LoginPageClient.tsx - Sign in and register → Authentication: authenticates
src/app/(auth)/login/LoginPageClient.tsx - Authentication → API client: sends requests
src/services/auth.service.ts - Author → Story editor: writes story
src/app/(app)/editor/EditorPageClient.tsx - Story editor → Markdown editor: edits content
src/app/(app)/editor/EditorPageClient.tsx - Story editor → Story operations: saves or publishes
src/app/(app)/editor/EditorPageClient.tsx - Reader → Published story feed: browses stories
- Published story feed → Story operations: loads stories
src/features/feed/HomeFeed.tsx - Published story feed → Bookmark operations: manages bookmarks
src/features/feed/HomeFeed.tsx - Author → Personal dashboard: manages stories
src/app/(site)/dashboard/page.tsx - Personal dashboard → Story operations: loads stories
src/app/(site)/dashboard/page.tsx - Personal dashboard → Bookmark operations: loads bookmarks
src/app/(site)/dashboard/page.tsx - Administrator → Admin dashboard: moderates
src/features/admin/AdminDashboard.tsx - Admin dashboard → Admin operations: requests admin data
src/features/admin/AdminDashboard.tsx - Story detail route → Story operations: loads story
src/app/(site)/story/[id]/StoryPageClient.tsx - Story operations → API client: sends requests
src/services/stories.service.ts - Bookmark operations → API client: sends requests
src/services/bookmarks.service.ts - Comment operations → API client: sends requests
src/features/story/PublishedStoryView.tsx - Admin operations → API client: sends requests
src/services/admin.service.ts - Narration service → API client: sends requests
- API client → Stories backend: calls API
src/services/api.ts - Authentication → Session state: updates session
src/services/auth.service.ts - API client → Session state: reads token
src/services/api.ts