@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66
77** RECTOR LABS CORE** is a Rails 8 monolithic application serving the complete rectorspace.com ecosystem. This is the single source of truth for all platform sections.
88
9- ** Current Status:** Architecture pivot from Next.js microservices to Rails monolith (2025-11-03). Clean slate for Rails implementation .
9+ ** Current Status:** Live in production with Homepage and Work sections. Built in one weekend (Nov 2-3, 2025), deployed with CI/CD .
1010
1111** Tech Stack:** Ruby on Rails 8 (fullstack, hybrid) + Tailwind CSS v4
1212
@@ -19,7 +19,7 @@ Single domain `rectorspace.com` with route-based sections:
1919| Section | Route | Purpose | Status |
2020| ---------| -------| ---------| --------|
2121| Homepage | / | Identity hub & landing | ✅ Live |
22- | Portfolio | /portfolio | Professional work showcase | 📋 Planned |
22+ | Work | /work | Story-driven project showcase | ✅ Live |
2323| Labs | /labs | Experiments & learning projects | 📋 Planned |
2424| Journal | /journal | Blog & writings (Ghost CMS integration) | 📋 Planned |
2525| Cheatsheet | /cheatsheet | Dev reference & notes | 📋 Planned |
@@ -29,7 +29,7 @@ Single domain `rectorspace.com` with route-based sections:
2929** Architecture Decision:**
3030- Rails monolith for unified codebase, shared authentication, single deployment
3131- Route-based sections instead of separate apps/subdomains
32- - Portfolio (polished professional work ) separate from Labs (experiments/learning)
32+ - Work (story-driven narratives ) separate from Labs (experiments/learning)
3333- Ghost CMS as external service, integrated via API for Journal section
3434
3535---
@@ -41,23 +41,31 @@ core/
4141├── .github/workflows/ # GitHub Actions (Claude Code integration)
4242├── app/
4343│ ├── controllers/
44- │ │ └── pages_controller.rb # Homepage (✅ implemented)
44+ │ │ ├── pages_controller.rb # Homepage (✅ implemented)
45+ │ │ └── works_controller.rb # Work section (✅ implemented)
4546│ ├── models/
46- │ │ └── github_repo.rb # GitHub repository cache (✅ implemented)
47+ │ │ ├── github_repo.rb # GitHub repository cache (✅ implemented)
48+ │ │ └── work.rb # Work/project stories (✅ implemented)
4749│ ├── views/
4850│ │ ├── layouts/application.html.erb
49- │ │ └── pages/home.html.erb # Homepage view (✅ implemented)
51+ │ │ ├── pages/home.html.erb # Homepage view (✅ implemented)
52+ │ │ └── works/
53+ │ │ ├── index.html.erb # Work listing (✅ implemented)
54+ │ │ └── show.html.erb # Story page with custom CSS (✅ implemented)
55+ │ ├── helpers/
56+ │ │ └── works_helper.rb # Markdown rendering (✅ implemented)
5057│ ├── jobs/
5158│ │ └── sync_github_repos_job.rb # Hourly GitHub sync (✅ implemented)
5259│ └── services/
5360│ ├── github_api_service.rb # GitHub API client (✅ implemented)
5461│ └── tech_stack_parser.rb # Language parser (✅ implemented)
5562├── config/
56- │ ├── routes.rb # Root route configured
63+ │ ├── routes.rb # Routes for /, /work (✅ configured)
5764│ └── recurring.yml # Solid Queue job schedule
5865├── db/
5966│ ├── migrate/ # Database migrations
60- │ └── schema.rb # Current schema
67+ │ ├── schema.rb # Current schema
68+ │ └── seeds.rb # Database seeds with CORE story (✅ implemented)
6169├── lib/tasks/
6270│ └── github.rake # Manual sync tasks (✅ implemented)
6371├── assets/images/ # Brand assets (3 logo variants + profile)
@@ -176,9 +184,12 @@ bin/rails server
176184- Fetch posts and display in ` /journal ` route
177185- Consider caching strategy for performance
178186
179- ** Portfolio Section:**
180- - GitHub API integration for repository showcase
181- - Display pinned repos, contribution stats
187+ ** Work Section:**
188+ - Story-driven project pages (narrative format, not traditional portfolio)
189+ - GitHub repository metadata integration
190+ - Custom ` /work:story ` slash command for generating stories
191+ - Markdown rendering via Redcarpet gem
192+ - Custom CSS for readability (justified text, generous spacing)
182193
183194** Quran Section:**
184195- Integrate Quran API (quran.com API or similar)
@@ -284,13 +295,85 @@ bin/rails github:tech_stack # Show tech stack summary
284295
285296---
286297
298+ ## Work Section (Story-Driven Projects)
299+
300+ ** Implemented Features:**
301+ - Story-driven project narratives (not traditional portfolio format)
302+ - Individual project pages at ` /work/:slug `
303+ - Markdown content with Redcarpet rendering
304+ - Custom CSS for optimal readability (justified text, 2rem paragraph spacing)
305+ - GitHub repository metadata integration
306+
307+ ** Database Schema:**
308+ ``` ruby
309+ create_table " works" do |t |
310+ t.string :title # Project title
311+ t.string :slug # URL-friendly identifier
312+ t.string :github_url # GitHub repository URL
313+ t.string :live_url # Live deployment URL
314+ t.string :repo_name # "owner/repo" format
315+ t.text :story # Full markdown narrative
316+ t.text :summary # One-liner for listing
317+ t.string :category # Project category
318+ t.string :status # "Live", "In Progress", "Archived"
319+ t.date :started_at # Project start date
320+ t.date :launched_at # Launch date
321+ t.boolean :featured # Highlight on homepage
322+ t.integer :github_stars # GitHub stars count
323+ t.integer :github_forks # GitHub forks count
324+ t.json :technologies # Tech stack array
325+ t.timestamps
326+ end
327+ ```
328+
329+ ** Custom Slash Command: ` /work:story ` **
330+ - Location: ` ~/.claude/commands/work/story.md `
331+ - Purpose: Generate story-driven narratives from GitHub repos
332+ - Features:
333+ - Duplicate detection (checks existing stories)
334+ - GitHub repo metadata fetching
335+ - AI-generated narrative in conversational tone
336+ - Proper markdown formatting with blank lines
337+ - Automatic database update (local + production)
338+ - Usage: ` /work:story <github-url> `
339+ - Example: ` /work:story https://github.com/RECTOR-LABS/core `
340+
341+ ** Story Formatting Guidelines:**
342+ - Blank lines between ALL paragraphs (critical for Redcarpet)
343+ - Bold text (` **Section** ` ) for section headers
344+ - Conversational, narrative tone (not corporate)
345+ - Technical details woven into story
346+ - Focus on "why" and "what I learned"
347+ - 800-1200 words typical length
348+
349+ ** Markdown Rendering:**
350+ - Gem: Redcarpet
351+ - Config: ` hard_wrap: false ` (respects markdown paragraph rules)
352+ - Features: autolink, tables, fenced code blocks, strikethrough
353+ - Output: ` html_safe ` rendered content
354+
355+ ** Current Stories:**
356+ 1 . ** CORE** - Rails 8 monolith story (1,185 words)
357+ - URL: https://rectorspace.com/work/core
358+ - Slug: ` core `
359+ - Status: Live
360+
361+ ** Work Section Routes:**
362+ ``` ruby
363+ resources :works , only: [:index , :show ]
364+ # GET /work - List all work projects
365+ # GET /work/:slug - Individual project story
366+ ```
367+
368+ ---
369+
287370## Resources
288371
289372** Docs:** [ Rails Guides] ( https://guides.rubyonrails.org ) | [ Tailwind CSS] ( https://tailwindcss.com/docs ) | [ Ghost API] ( https://ghost.org/docs/content-api/ )
290373
291- ** Links:** [ @rz1989s ] ( https://github.com/rz1989s ) | [ RECTOR-LABS] ( https://github.com/RECTOR-LABS ) | rectorspace.com _ (coming soon) _
374+ ** Links:** [ @rz1989s ] ( https://github.com/rz1989s ) | [ RECTOR-LABS] ( https://github.com/RECTOR-LABS ) | [ rectorspace.com] ( https://rectorspace.com )
292375
293- ** Maintainer:** RECTOR | ** Updated:** 2025-11-03 | ** Version:** 3.0 (Rails Monolith )
376+ ** Maintainer:** RECTOR | ** Updated:** 2025-11-03 | ** Version:** 3.1 (Work Section Live )
294377
295378---
296379
0 commit comments