How voxtech-byte/cosmic-editorial works
Cosmic Editorial is an educational web app about space phenomena, integrating scientific explanations with Islamic reflection. Its user-facing flow is route-based: visitors enter the app, navigate among the home, exploration, AI assistant, archive, and portfolio sections, and explore the content or AI assistance each offers. The sampled code confirms the route wiring and the AI gateway’s multi-provider design; the provided excerpts do not show how the assistant page invokes that gateway or how every content page obtains its data, so those connections are omitted.
Main entry points: App.tsx App routes · ai-gateway.ts AI gateway · main.tsx React entry · useLinkPreview.ts Preview query hook
Components 20
App shell
- React entry
Frontend/cosmic-editorial-app/src/main.tsx - App routes
Frontend/cosmic-editorial-app/src/App.tsx - Navigation
Frontend/cosmic-editorial-app/src/app/Navigation.tsx - Welcome sequence
Frontend/cosmic-editorial-app/src/shared/ui/WelcomeSequence.tsx
Learning content
- Home page
Frontend/cosmic-editorial-app/src/features/beranda/components/BerandaPage.tsx - Phenomena exploration
Frontend/cosmic-editorial-app/src/features/eksplorasi/components/EksplorasiPage.tsx - Phenomena content
Frontend/cosmic-editorial-app/src/entities/phenomena.ts - Archive
Frontend/cosmic-editorial-app/src/features/arsip/components/ArsipPage.tsx
AI assistant
- AI assistant page
Frontend/cosmic-editorial-app/src/features/asisten-ai/components/AsistenAIPage.tsx - AI gateway
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts
Portfolio and previews
- Portfolio projects
Frontend/cosmic-editorial-app/src/features/portfolio/components/PortfolioProjects.tsx - Link preview card
Frontend/cosmic-editorial-app/src/shared/components/LinkPreviewCard.tsx - Preview query hook
Frontend/cosmic-editorial-app/src/shared/hooks/useLinkPreview.ts - Preview endpoint
Frontend/cosmic-editorial-app/api/link-preview.js
Other components
- Visitor
- Groq
- Gemini
- OpenRouter
- Hugging Face
- Puter
Connections 14
- React entry → App routes: renders
Frontend/cosmic-editorial-app/src/main.tsx - App routes → Navigation: renders
Frontend/cosmic-editorial-app/src/App.tsx - App routes → Welcome sequence: renders
Frontend/cosmic-editorial-app/src/App.tsx - App routes → Home page: routes to
Frontend/cosmic-editorial-app/src/App.tsx - App routes → Phenomena exploration: routes to
Frontend/cosmic-editorial-app/src/App.tsx - App routes → AI assistant page: routes to
Frontend/cosmic-editorial-app/src/App.tsx - App routes → Archive: routes to
Frontend/cosmic-editorial-app/src/App.tsx - App routes → Portfolio projects: routes to
Frontend/cosmic-editorial-app/src/App.tsx - Preview query hook → Preview endpoint: fetches
Frontend/cosmic-editorial-app/src/shared/hooks/useLinkPreview.ts - AI gateway → Groq: streams from
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts - AI gateway → Gemini: streams from
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts - AI gateway → OpenRouter: streams from
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts - AI gateway → Hugging Face: streams from
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts - AI gateway → Puter: streams from
Frontend/cosmic-editorial-app/src/shared/lib/ai-gateway.ts