An AI-powered good news aggregation platform that ranks stories by real-world impact β not clicks.
Features Β β’Β Tech Stack Β β’Β Architecture Β β’Β Getting Started Β β’Β Hope Score Β β’Β API
| Feature | Description |
|---|---|
| Hope Score | Every article is ranked by a 5-dimension AI classifier: Verified Facts, Systemic Impact, Actionability, Novelty, Representation |
| Mood Filtering | Select your mood (Motivated, Calm, Informed, Inspired) and stories are re-ranked to match |
| Social Share Cards | Generate beautiful, branded photo cards in 3 themes Γ 6 platform sizes for Instagram, Twitter, LinkedIn, Facebook |
| Interactive Dashboard | World impact map, trend charts, category breakdowns, animated progress counters |
| Full-Text Search | Search across all article titles, summaries, and content |
| Reading History | Track articles read, time spent, and actions taken |
| Hope Budget | Set daily reading limits for mindful news consumption |
| Feature | Description |
|---|---|
| Admin Panel | Article moderation, source management, analytics dashboard |
| RSS Pipeline | Auto-fetch from 5+ good news sources, classify, and store |
| Source CRUD | Add, edit, activate/deactivate news sources with trust scores |
| Analytics | Category/tier breakdowns, daily activity charts, engagement metrics |
React 19 + TypeScript + Vite
Tailwind CSS + shadcn/ui (40+ components)
Framer Motion (animations)
Lucide React (icons)
p5.js (particle effects)
Three.js (3D Hope Orb)
Hono (HTTP framework)
tRPC 11.x (end-to-end type safety)
Drizzle ORM (type-safe MySQL queries)
MySQL (via mysql2)
fast-xml-parser (RSS scraping)
OAuth 2.0 (Kimi)
JWT sessions (secure cookies)
Role-based access (user / admin)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β β Home β β Feed β β Article β β
β β (Hero) β β(Filters) β β (Detail) β β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β β Dashboardβ βBangladeshβ β Admin β β
β β (Charts) β β (Focus) β β (Panel) β β
β ββββββββββββ ββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β tRPC (type-safe RPC)
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
β Backend β
β ββββββββββ ββββββββββ ββββββββββ ββββββββββ β
β βarticle β βdashboardβ β scraperβ β auth β β
β β router β β router β β router β β router β β
β ββββββββββ ββββββββββ ββββββββββ ββββββββββ β
β ββββββββββ ββββββββββ ββββββββββ β
β β seed β β admin β β Hope β β
β β router β β router β βScore AIβ β
β ββββββββββ ββββββββββ ββββββββββ β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β Drizzle ORM
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
β Database β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β β articles β β sources β β users β β
β β(HopeScore)β β(Trust) β β(OAuth) β β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β ββββββββββββ ββββββββββββββββββββββββ β
β βcategoriesβ β user_reading_history β β
β ββββββββββββ ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js 20+
- MySQL database (local or cloud)
# Clone the repository
git clone https://github.com/mahidulislamnakib/BrightSide.git
cd BrightSide
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your database URL and OAuth credentials
# Push database schema
npm run db:push
# Seed the database
npx tsx db/seed.ts
# Start development server
npm run devThe app will be available at http://localhost:3000.
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
MySQL connection string | β |
VITE_APP_ID |
OAuth app ID | β |
VITE_KIMI_AUTH_URL |
OAuth provider URL | β |
APP_SECRET |
JWT signing secret | β |
OWNER_UNION_ID |
Admin user union ID |
The proprietary Hope Score is BrightSide's core innovation. Every article is analyzed across 5 dimensions:
| Dimension | Weight | How it's measured |
|---|---|---|
| Verified Facts | 25% | Source trust score + keyword analysis ("study", "data shows", "peer-reviewed") |
| Systemic Impact | 25% | Impact keywords ("vaccine", "eradicated", "renewable", "peace treaty") |
| Actionability | 20% | Action keywords ("donate", "volunteer", "how to", "get involved") |
| Novelty | 15% | Recency + uniqueness score |
| Representation | 15% | Region tier (underreported: 0.9, developing: 0.7, western: 0.4) |
| Tier | Range | Color |
|---|---|---|
| π₯ Gold Standard | 0.80 - 1.00 | #F4A261 |
| π΅ Verified | 0.65 - 0.79 | #E8644B |
| π’ Constructive | 0.50 - 0.64 | #F4D0C4 |
| Router | Endpoints | Auth |
|---|---|---|
article |
list, byId, featured, related, search, morningBrief, classify, whyItMatters |
Public |
dashboard |
stats, regions, metrics, impactMap |
Public |
scraper |
scrape, scrapeSource, sources |
Public |
auth |
url, me, logout, updatePrefs |
OAuth |
admin |
stats, articles, updateArticle, deleteArticle, sources, createSource, analytics |
Admin only |
seed |
run |
Public |
import { trpc } from "@/providers/trpc";
function ArticleList() {
const { data: articles } = trpc.article.list.useQuery({
category: "Health",
mood: "motivated",
});
return (
<div>
{articles?.map((a) => (
<ArticleCard key={a.id} article={a} />
))}
</div>
);
}| Token | Value | Usage |
|---|---|---|
| Cream | #FFFBF5 |
Page background |
| Charcoal | #1A1814 |
Dark sections, text |
| Coral | #E8644B |
Primary accent, buttons |
| Amber | #F4A261 |
Gold tier, highlights |
| Peach | #F4D0C4 |
Cards, soft accents |
- Display: Oranienbaum (serif) β headlines, titles, numbers
- Body: Inter (sans-serif) β UI labels, metadata, body text
βββ api/ # Backend
β βββ routers/ # tRPC routers (article, auth, admin, scraper, dashboard)
β βββ services/ # Business logic (RSS scraper, classifier)
β βββ lib/ # Utilities (env, http, classifier engine)
β βββ queries/ # Database query functions
β βββ boot.ts # Hono server entry
β βββ router.ts # tRPC app router
β βββ middleware.ts # Auth middleware (public, authed, admin)
βββ db/ # Database
β βββ schema.ts # Drizzle ORM schema
β βββ relations.ts # Table relations
β βββ seed.ts # Seed script
βββ src/
β βββ pages/ # Route pages (Home, Feed, Article, Dashboard, Admin)
β βββ components/ # UI components + effects (Particles, Orb, ShareCard)
β βββ hooks/ # Custom hooks (useAuth)
β βββ data/ # Static data (categories, demo articles)
β βββ lib/ # Frontend utilities (classifier)
β βββ providers/ # tRPC client provider
βββ contracts/ # Shared types (frontend β backend)
βββ public/assets/ # Generated images
We welcome contributions! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with hope. Ranked by impact. Shared with the world.
