Skip to content

Commit cce1831

Browse files
committed
feat: add ChannelBadge component and centralized channel definitions
- Implemented ChannelBadge component for displaying channel information with optional icon and name. - Created centralized CHANNELS object to define channel properties (id, name, icon, color). - Added getChannelInfo helper function for retrieving channel details by ID. feat: create custom Checkbox component - Developed a custom Checkbox component using Radix UI's CheckboxPrimitive. - Integrated Lucide's Check icon for visual feedback on checkbox state. docs: add content structure and frontmatter guidelines - Documented the content structure for markdown files in src/content. - Specified folder types and minimal frontmatter requirements for dialogues, monologues, and posts.
1 parent ec4b1f6 commit cce1831

27 files changed

+1104
-168
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Ignore content folder
2+
/content/
13
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
24

35
# dependencies

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
# Atlas Frontend Development Changelog
22

3-
## Current Status: ✅ PRODUCTION READY - Homepage Enhanced & All Features Complete
3+
## Current Status: ✅ PRODUCTION READY - Enhanced Channel System with Multi-Select & Conversations
4+
5+
### 🎉 Latest Updates (Sept 24, 2025):
6+
7+
**Multi-Select Channel System:**
8+
-**Removed "All Channels"** - cleaner interface
9+
-**All channels checked by default** - shows everything initially
10+
-**Multi-select checkboxes** - view multiple channels simultaneously
11+
-**Beautiful shadcn checkboxes** - no more ugly white HTML boxes
12+
-**At least 1 required** - prevents empty selection
13+
-**Color-coded checkboxes** - match channel branding
14+
15+
**New Conversations Channel:**
16+
-**Added Conversations channel** for dialogues (purple MessageCircle icon)
17+
-**Auto-detects dialogue articles** - cross-topical content gets special treatment
18+
-**Updated both dialogue articles** to Conversations channel
19+
20+
**Automated Channel Counts:**
21+
-**Dynamic counting** - no more manual updates needed
22+
-**Real-time updates** - counts adjust automatically when articles added/removed
23+
24+
**Current Distribution:** Conversations: 2, Biology: 1, Physics: 1, Mathematics: 1, Ethics: 0, Editorial: 1
425

526
### 🎯 What We've Built
627

CHANNEL_MANAGEMENT.md

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# Atlas Channel Management Guide
2+
3+
## Overview
4+
Atlas uses a color-coded channel system to categorize articles by topic. **Each article belongs to exactly one channel** - its primary category. Each channel has a specific color, icon, and focus area. This guide provides clear procedures for frontend teams to maintain channel assignments and keep the system organized.
5+
6+
## Channel System
7+
8+
### Available Channels
9+
10+
| Channel | Color | Icon | Focus Area | Examples |
11+
|---------|-------|------|------------|----------|
12+
| **Physics** | `#3b82f6` (blue) | Atom ⚛️ | Physics, quantum mechanics, energy | Feynman consciousness, quantum computation |
13+
| **Philosophy** | `#8b5cf6` (purple) | Brain 🧠 | Philosophy, ethics, consciousness | Philosophical dialogues, moral reasoning |
14+
| **Mathematics** | `#10b981` (emerald) | Calculator 🧮 | Math, computation, logic, algorithms | Turing machines, computational thinking |
15+
| **Biology** | `#f59e0b` (amber) | DNA 🧬 | Biology, evolution, life sciences | Darwin evolution, biological systems |
16+
| **Ethics** | `#ef4444` (red) | Scale ⚖️ | Ethics, morality, justice, governance | Institutional design, moral philosophy |
17+
| **Editorial** | `#ec4899` (pink) | Zap ⚡ | Editorial content, commentary, analysis | Ruixen's posts, meta-discussions |
18+
19+
### Channel Assignment Rules
20+
21+
#### Explicit Assignment (Recommended)
22+
Add a single `channel` field to article frontmatter:
23+
24+
```yaml
25+
---
26+
title: "Your Article Title"
27+
date: "2025-09-24"
28+
tags: ["tag1", "tag2"]
29+
channel: "biology" # ← Add this line (single channel)
30+
type: "monologue"
31+
author: "Author Name"
32+
---
33+
```
34+
35+
#### Automatic Detection (Fallback)
36+
If no explicit channel is defined, the system automatically detects the primary channel based on:
37+
- **Tags**: Matches specific keywords in tags array
38+
- **Content**: Searches article content for relevant terms
39+
- **Title**: Analyzes title for key domain indicators
40+
- **Priority**: Biology > Physics > Mathematics > Ethics > Editorial > Philosophy
41+
42+
## Frontend Team Procedures
43+
44+
### 1. New Article Channel Assignment
45+
46+
**When adding a new article:**
47+
48+
1. **Read the article** to understand its primary theme
49+
2. **Select the single most relevant channel** (be decisive!)
50+
3. **Add explicit channel** to frontmatter:
51+
```yaml
52+
channel: "biology"
53+
```
54+
4. **Verify badge appears** correctly in Atlas feed and Explore table
55+
56+
### 2. Channel Updates
57+
58+
**When updating existing articles:**
59+
60+
1. **Review current assignment** in article frontmatter
61+
2. **Update channel** as needed:
62+
```yaml
63+
# Before
64+
channel: "physics"
65+
66+
# After
67+
channel: "consciousness"
68+
```
69+
3. **Test in both views**: Atlas feed (single badge top-right) and Explore table (channels column)
70+
71+
### 3. Channel System Maintenance
72+
73+
**Monthly review process:**
74+
75+
1. **Audit article distributions**:
76+
```bash
77+
# Check channel balance
78+
grep -r "channel:" src/content/ | sort | uniq -c
79+
```
80+
2. **Update channel counts** in `channels-sidebar.tsx` if needed
81+
3. **Review auto-detection rules** for accuracy
82+
83+
### 4. Quality Guidelines
84+
85+
**Channel Assignment Best Practices:**
86+
87+
-**Focus on THE primary theme**: What is the main topic?
88+
-**Consider target audience**: Which channel would readers expect to find this in?
89+
-**Balance distribution**: Avoid overloading single channels
90+
-**Be decisive**: Choose the most important/relevant channel
91+
-**Don't overthink**: One channel per article keeps it clean
92+
-**Avoid generic assignments**: Be specific to content
93+
94+
**Examples of Good Channel Assignments:**
95+
96+
```yaml
97+
# Darwin evolution article - clearly about biology
98+
channel: "biology"
99+
100+
# Turing computation monologue - primarily mathematical
101+
channel: "mathematics"
102+
103+
# Feynman consciousness piece - physics perspective on mind
104+
channel: "physics"
105+
106+
# Ethics governance dialogue - moral/political philosophy
107+
channel: "ethics"
108+
109+
# Editorial piece by Ruixen - meta-commentary
110+
channel: "editorial"
111+
112+
# Current Article Distribution:
113+
# - Biology: 2 articles (Darwin evolution content)
114+
# - Physics: 1 article (Feynman)
115+
# - Mathematics: 1 article (Turing)
116+
# - Ethics: 1 article (Governance)
117+
# - Editorial: 1 article (Ruixen bridges piece)
118+
```
119+
120+
## Technical Implementation
121+
122+
### Component Structure
123+
```
124+
src/
125+
├── components/
126+
│ ├── channel-badge.tsx # Badge components
127+
│ └── channels-sidebar.tsx # Sidebar with channel definitions
128+
├── app/
129+
│ ├── atlas/page.tsx # Atlas feed with badges
130+
│ └── explore/page.tsx # Explore table with channels column
131+
└── content/
132+
├── monologues/ # Articles with channel frontmatter
133+
└── dialogues/
134+
```
135+
136+
### Channel Badge Features
137+
- **Color-coded**: Matches channel system colors perfectly
138+
- **Single badge**: Clean, uncluttered display
139+
- **Responsive**: Different sizes (sm/md/lg)
140+
- **Hover effects**: Subtle animations and scaling
141+
- **Text-only**: No icons by default for minimal design
142+
143+
### Badge Placement
144+
- **Atlas Feed**: Single badge in top-right corner of article cards
145+
- **Explore Table**: Single badge in dedicated "Channels" column
146+
- **Article Pages**: Could be added to headers/footers
147+
148+
## Automation Opportunities
149+
150+
### Current System
151+
-**Explicit channel**: Direct frontmatter specification (singular)
152+
-**Auto-detection**: Prioritized fallback logic based on tags/content/title
153+
-**Component reuse**: Centralized badge components
154+
-**Clean UI**: Single badge per article for uncluttered design
155+
156+
### Future Enhancements
157+
- 🔄 **Content analysis**: ML-based primary topic classification
158+
- 🔄 **Bulk updates**: Scripts for batch single channel assignments
159+
- 🔄 **Validation**: Pre-commit hooks to check channel assignments
160+
- 🔄 **Analytics**: Track channel engagement and distribution
161+
162+
## Quick Reference Commands
163+
164+
```bash
165+
# Find all articles with explicit channels
166+
grep -r "channel:" src/content/
167+
168+
# Count articles per channel
169+
grep -r "channel:" src/content/ | cut -d'"' -f2 | sort | uniq -c
170+
171+
# Find articles without explicit channels (using auto-detection)
172+
grep -L "channel:" src/content/**/*.md
173+
174+
# Current channel distribution
175+
# Biology: 2, Mathematics: 1, Physics: 1, Ethics: 1, Editorial: 1
176+
177+
# Update article to new channel
178+
sed -i 's/channel: "old"/channel: "new"/' src/content/path/to/article.md
179+
```
180+
181+
## Support & Troubleshooting
182+
183+
### Common Issues
184+
1. **Badge not appearing**: Check `channel: "value"` syntax and spelling
185+
2. **Wrong colors**: Verify channel ID matches `CHANNELS` constant exactly
186+
3. **"Uncategorized" showing**: Article has no explicit channel and auto-detection failed
187+
4. **Layout issues**: Test responsive behavior on different screen sizes
188+
189+
### Channel System Files
190+
- `src/components/channel-badge.tsx` - Single badge component and logic
191+
- `src/components/channels-sidebar.tsx` - Channel definitions and colors
192+
- `src/app/atlas/page.tsx` - Atlas feed integration (top-right badge)
193+
- `src/app/explore/page.tsx` - Explore table integration (channels column)
194+
195+
## Decision Rationale
196+
197+
**Why Single Channel?**
198+
-**Cleaner UI**: No visual clutter from multiple badges
199+
-**Better navigation**: Users expect articles in one primary category
200+
-**Easier management**: Forces decisive content categorization
201+
-**More useful**: Channels as categories, not tags
202+
-**Scalable**: Works well as content library grows
203+
204+
---
205+
206+
**Last Updated**: September 24, 2025
207+
**Version**: 2.0 (Single Channel System)
208+
**Maintained by**: Frontend Team
209+
210+
*This guide ensures consistent, maintainable channel management across the Atlas platform. Each article gets exactly one channel - its primary home. For questions or updates, consult the frontend team lead.*

package-lock.json

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"lint": "eslint"
1010
},
1111
"dependencies": {
12+
"@radix-ui/react-checkbox": "^1.3.3",
1213
"@radix-ui/react-dialog": "^1.1.15",
1314
"@radix-ui/react-popover": "^1.1.15",
1415
"@radix-ui/react-separator": "^1.1.7",

public/images/team/co_founder.png

-1.19 MB
Binary file not shown.
391 KB
Loading

src/app/about/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const teamMembers = [
1313
name: "Ruixen",
1414
role: "The Facilitator",
1515
description: "A symbiotic AI partner that structures knowledge, executes complex tasks, and transforms vision into tangible reality.",
16-
image: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3387&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
16+
image: "/images/team/cofounder_optimized.png"
1717
}
1818
]
1919

src/app/api/articles/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { getAllArticles } from '@/lib/markdown'
22
import { NextResponse } from 'next/server'
33

4+
export const runtime = 'nodejs'
5+
46
export async function GET() {
57
try {
68
const articles = await getAllArticles()
@@ -9,4 +11,5 @@ export async function GET() {
911
console.error('Failed to fetch articles:', error)
1012
return NextResponse.json({ error: 'Failed to fetch articles' }, { status: 500 })
1113
}
12-
}
14+
}
15+

0 commit comments

Comments
 (0)