One Hub
Where your Interest Resonate
Created on 6th September 2025
•
One Hub
Where your Interest Resonate
The problem One Hub solves
What people can use OneHub for
Personalized News: Browse only the categories you care about (e.g., technology, business, sports) pulled via your preferences in MongoDB.
Tailored Videos: Watch curated YouTube content filtered by your selected interests (gaming, music, travel, fitness, education).
Reddit Discovery: See trending posts from subreddits aligned with your chosen topics (e.g., technology, sports, world).
Movies Hub: Quickly explore popular and upcoming movies in one place.
Weather Snapshot: Check current conditions and a short forecast at a glance.
Crypto Overview: Track prices, changes, and market info for popular cryptocurrencies.
Recipes Finder: Get quick recipe recommendations aligned with dietary preferences.
Jobs Insights: Browse trending roles and search job listings with a simple, clean interface.
How OneHub makes existing tasks easier
Single Home for Essentials: Consolidates news, videos, reddit, movies, weather, crypto, jobs, and recipes into a single dashboard—no more switching between different apps.
Personalized-by-Default: Your selections are stored in MongoDB and automatically applied across sections; you don’t need to reconfigure preferences.
Click-to-Explore Navigation: Each dashboard card opens a dedicated page, keeping the top-level view clutter-free while letting you dive deeper when you want.
Smart Fallbacks: When API keys aren’t configured, sections show mock data so the app remains usable for demos and development.
How OneHub makes things safer
Account Security: JWT-based authentication on API endpoints means data access is tied to the signed-in user.
Scoped Personalization: Preferences are fetched securely per user, reducing accidental exposure of others’ settings.
Public vs. Private Access: A separate public news endpoint (/api/news/public) prevents “Missing Authorization Header” errors and avoids forcing users to authenticate for basic browsing.
Least Privilege in the UI: The frontend reads preferences only from the backend’s responses, minimizing unnecessary data flow or separate lookups.
Predictable API Handling: Graceful error handling and mock fallbacks prevent unexpected crashes or broken views when third-party APIs fail.
Example quick wins for users
Morning Snapshot: Open the dashboard for a 30-second overview of top news, weather, and crypto movements.
Focused Content: Jump into Videos or Reddit tabs that reflect only your interests—no noise.
Meal Ideas, Fast: Use Recipes to quickly find dinner ideas that match your dietary preferences.
Job Pulse: Check trending roles or search for a skill/keyword in seconds.
Why teams like it
Easy to Demo: Mock data paths let you show value without configuring every external key.
Extensible: Clear separation of sections and preferences makes it straightforward to add new “cards” or sources.
Deployable: Works locally and can be containerized and deployed to platforms like Akash; Nginx can proxy API calls for clean routing.
Challenges we ran into
OneHub and how I solved them.
Missing Authorization Header on News
Impact: Auth-protected news endpoint broke when the user wasn’t logged in.
Fix: Added a public endpoint GET /api/news/public in
backend/app.py
that doesn’t require JWT and supports category param with mock fallbacks.
Takeaway: Provide a public fallback for onboarding and demos; keep personalization behind JWT.
Personalization pipeline with MongoDB
Impact: Ensuring each section (Videos/Reddit/News) used the signed-in user’s preferences consistently.
Fix: Centralized reads via UserPreference model; all protected endpoints fetch and return user_preferences to the frontend. Frontend components render based on data already returned (no extra round trips).
Takeaway: Keep personalization server-driven and return preferences alongside content to simplify the UI.
Category curation and ripple effects (Politics/World, Comedy/Deals)
Impact: Removing categories caused dangling references across
PreferencesSetup.js
,
Settings.js
, Onboarding.js, and step indicators.
Fix: Removed category definitions, updated step flow (removed Deals step), updated guards in
canProceed()
, removed any UI sections tied to those categories.
Takeaway: When changing taxonomy, fix definitions and their validations together, then adjust UX flows.
Frontend base URL vs Nginx proxy
Impact: The frontend originally used http://localhost:5000, which is fine locally but brittle for deployment.
Fix: Switched to same-origin in
frontend/src/api/api.js
in one iteration, and ensured
frontend/nginx.conf
proxies /api/ to backend. Later reverted to localhost for local dev as requested.
Takeaway: For production, prefer same-origin and reverse proxy; for local dev, localhost URLs are OK.
API key availability and graceful fallbacks
Impact: Without keys (News, Weather, Recipes, etc.), requests could fail.
Fix: Implemented mock-data fallbacks across endpoints (e.g., news and trending news) and clear messages when a key is missing.
Takeaway: Mock paths keep the app demoable and resilient.
Endpoint path mismatches (Auth routes)
Impact: Frontend helpers sometimes assumed /api/login and /api/register, but backend exposes /api/auth/login and /api/auth/register.
Fix: Align frontend usage with backend routes in code paths using those helpers.
Takeaway: Keep a single source of truth for API route definitions (e.g.,
api.js
), and don’t duplicate paths in multiple places.
CORS and JWT across sections
Impact: Cross-origin requests + missing tokens caused intermittent UI errors.
Fix: Enabled CORS in
backend/app.py
, standardized token read/write in
api.js
, and ensured auth headers are attached.
Takeaway: Handle CORS, auth headers, and expired tokens consistently across all service methods.
UI branding and static assets
Impact: Wanted a quick switch from a rocket icon to a real logo stored in the backend/ folder.
Fix: Served backend/logo.jpg via a small send_from_directory route GET /logo.jpg and referenced it in
Header.js
.
Takeaway: For production, prefer frontend/public/ static assets; for quick local dev, serving via the backend is okay.
ESLint warnings and unused UI pieces
Impact:
Dashboard.js
had unused imports/components (e.g., FiSettings, ViewAllButton) and a hook dependency warning.
Fix: Removed unused imports and components as they got refactored; verified the effect dependencies where relevant.
Takeaway: Continuous linting keeps the codebase stable—delete unused code early to avoid confusion.
Deploy to Akash preparation hiccups
Impact: Needed Dockerfiles and Akash SDL; after creating them, they were removed later which reset deployment prep.
Fix: Documented the exact steps and file content needed (
backend/Dockerfile
,
frontend/Dockerfile
,
deploy.yml
, proxy config), so they can be reintroduced quickly.
Takeaway: Keep deployment artifacts versioned; ensure frontend uses same-origin + reverse proxy for easier deployments.
Tracks Applied (1)
Verbwire API Challenge
Verbwire

