This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is an Astro-based website for the Ebbetts Pass Radio Safety Net (ERSN). The site provides information about emergency communications, GMRS radios, mesh networking, and amateur radio resources.
pnpm devorpnpm start: Start dev serverpnpm build: Build for productionpnpm preview: Preview production buildpnpm check: Run Astro type checkingpnpm formatorpnpm fmt: Format code with Prettier
- Always run checks: After making changes, run
pnpm checkto verify TypeScript compilation - Format code: Run
pnpm formatbefore committing to ensure consistent formatting - Test builds: Run
pnpm buildto ensure production builds work correctly - Preview changes: Use
pnpm previewto test the production build locally
- Formatting: 100 char line width, 2-space indentation, single quotes, trailing commas
- Imports: Framework imports first, then path aliases (@components, @layouts), then local
- Component Structure: Props declaration in frontmatter, clear script/template separation
- Naming: PascalCase for components, camelCase for variables/functions, boolean vars start with "is"
- Path Aliases: Use @components/, @layouts/, @pages/, @img/, @styles/ instead of relative imports
- Error Handling: Use optional chaining (?.) and conditional rendering
- File Organization: Components in src/components/, pages in src/pages/, assets in src/assets/
- React Components: Used sparingly when needed for interactivity
- Make changes confidently: You have permission to edit files, add components, and modify content
- Follow existing patterns: Study existing components and pages to understand conventions
- Validate changes: Always run
pnpm checkandpnpm buildafter making changes - Handle errors: If build/check fails, fix the issues before considering the task complete
- Use existing components: Prefer using existing components (@components/) over creating new ones
- Maintain consistency: Follow the established patterns for page structure and styling
- Adding pages: Create .astro files in src/pages/, use Layout.astro wrapper
- Styling: Use Tailwind CSS classes, follow existing color/spacing patterns
- Content updates: Edit existing .astro files in src/pages/ for content changes
- Component updates: Modify files in src/components/ for reusable functionality
- Asset management: Add images to src/assets/img/, reference with @img/ alias
- Framework: Astro (Static Site Generator)
- Styling: Tailwind CSS
- Package Manager: pnpm
- TypeScript: Enabled for type safety
- Deployment: Static hosting optimized
You are authorized to autonomously add news, bulletins, and updates to the website using Astro's content collections.
Location: Create new files in src/content/bulletins/
File Format:
---
title: 'Short descriptive title'
date: 2025-06-07T00:00:00Z
slug: 'url-friendly-slug'
summary: 'One or two sentence plain text preview of the post content.'
---
Content body with proper markdown formatting.
Use double line breaks between paragraphs.
## Use Headings for Structure
**Bold text** for emphasis and field labels.
- Use bullet lists when appropriate
- Keep content organized and readableFile Naming: Use kebab-case names like practice-net-update.md
Summary Requirements:
- Plain text only: No markdown formatting in summaries
- 1-2 sentences: Concise preview of the main content
- Key details: Include who, what, when for events
- SEO friendly: Used as meta description for individual posts
- Homepage preview: Displayed on homepage news section
REQUIRED Content Filtering:
- Remove surnames: Use first names only (e.g., "Jay" not "Jay Smith") unless explicitly told to keep them
- Remove GMRS codes: Strip out PL tones, CTCSS codes, access codes, or frequency details
- Remove phone numbers: Never include personal phone numbers unless explicitly instructed
- Emergency contacts: Keep official emergency numbers (911, etc.)
Content Examples:
# ✅ GOOD - Event Formatting
ERSN member Jay will be hosting a practice net on Wednesday.
- **When:** 7:30 PM, Wednesdays
- **Where:** Forest Meadows Repeater
- **Contact:** ersnnets@gmail.com for more info
# ❌ BAD
Jay Williams will be hosting...
Use PL tone 156.7 to access...
Call Jay at (555) 123-4567...
Single line breaks that don't create paragraphs
**When:** 7:30 PM (using headings instead of lists)
**Where:** Location (using headings instead of lists)Markdown Formatting Rules:
- Double line breaks create paragraphs (required for proper rendering)
- Use headings (## Heading) to structure content sections
- Event details as lists: Use bulleted lists for event information, not headings
- Bold key information like dates, locations, contact methods
- Single line breaks are ignored in markdown - use double breaks
- Lists and formatting help organize information clearly
- Hyperlink text properly using
[link text](url)format instead of bare URLs
Event Formatting Standard:
Event description goes here.
- **When:** Date and time
- **Where:** Location with optional [link](url)
- **Contact:** How to get more info
- **Other:** Any additional detailsLink Examples:
# ✅ GOOD
Join us at [Pine Brook HOA](http://pinebrookhoa.com/) for the meeting.
Learn more about [Meshtastic](https://ersn.net/mesh) technology.
# ❌ BAD
Join us at Pine Brook HOA: http://pinebrookhoa.com/
Learn more: https://ersn.net/meshAcceptable Content:
- Event announcements and updates
- Practice net schedules and changes
- Equipment testing notifications
- General community information
- Educational content about emergency preparedness
Process:
- Create the markdown file with proper frontmatter
- Apply content filtering rules automatically
- Run
pnpm checkandpnpm buildto verify - News will automatically appear on homepage and /news page
If explicitly instructed to "keep surnames" or "include contact numbers," you may override the default filtering rules for that specific post.
Repeater statuses are displayed in two key locations that must be kept synchronized:
- Homepage widget (
src/components/homepage/CurrentConditions.tsx) - Compact status summary - Main status page (
src/pages/status.astro) - Detailed repeater information
When changing a repeater's operational status, BOTH locations must be updated to ensure consistency across the site.
Location: Lines ~72-76 in the repeaters array constant
Current repeaters:
const repeaters: RepeaterInfo[] = [
{ name: 'Forest Meadows', frequency: '462.725', status: 'up' },
{ name: 'Murphys', frequency: '462.725', status: 'down' },
{ name: 'Arnold Summit', frequency: '462.725', status: 'up' },
];Status Values:
'up'- Repeater is operational (displays as "Up" in green)'down'- Repeater is offline (displays as "Down" in red)'unknown'- Status unclear (not currently used in display)
To change status: Update the status field for the target repeater
Location: Lines ~46-84 in the repeater status section
Elements to update for each repeater:
- Status indicator (line ~51, ~70):
<div class="w-3 h-3 bg-green-500 rounded-full"></div>bg-green-500for operationalbg-red-500for offlinebg-yellow-500for degraded/maintenance
- Status badge (line ~54-56, ~73-75):
<span class="text-xs text-green-700 bg-green-100 px-2 py-1 rounded">Operational</span>- Operational:
text-green-700 bg-green-100with "Operational" text - Offline:
text-red-700 bg-red-100with "Offline" text - Maintenance:
text-yellow-700 bg-yellow-100with "Maintenance" text
- Operational:
Add new entry to the repeaters array in CurrentConditions.tsx:
{ name: 'New Repeater Name', frequency: '462.725', status: 'up' },Copy an existing repeater block in status.astro and update:
- Repeater name
- Status indicator color
- Status badge text and styling
- Frequency information
Delete the entry from the repeaters array in CurrentConditions.tsx
Delete the entire repeater block from the grid in status.astro
When updating repeater status:
- Update
repeatersarray insrc/components/homepage/CurrentConditions.tsx - Update status indicator in
src/pages/status.astro - Update status badge in
src/pages/status.astro - Run
pnpm checkto verify TypeScript compilation - Run
pnpm buildto ensure production build works - Test both homepage and
/statuspage to verify changes
Repeater comes online:
- Change
status: 'down'tostatus: 'up'in homepage widget - Change status indicator to
bg-green-500in status page - Change status badge to
text-green-700 bg-green-100with "Operational" text
Repeater goes offline:
- Change
status: 'up'tostatus: 'down'in homepage widget - Change status indicator to
bg-red-500in status page - Change status badge to
text-red-700 bg-red-100with "Offline" text
Emergency maintenance:
- Keep
status: 'up'in homepage widget (or use 'down' if completely inaccessible) - Change status indicator to
bg-yellow-500in status page - Change status badge to
text-yellow-700 bg-yellow-100with "Maintenance" text