Skip to content

Commit 1fbfab1

Browse files
committed
chore: Update package.json scripts and dependencies; refactor README and remove unused files
- Changed the `test:ci` script in package.json to use `pnpm exec` for consistency. - Updated `vitest` dependency version in package.json from ^3.0.8 to ^3.1.2. - Refactored README.md to enhance clarity and provide a more engaging overview of the project. - Removed the outdated `update-hero-imports.sh` script and the `page.tsx` file from the best-practices-integration directory. - Added new audio files and updated existing ones in the voice directory for improved content delivery. - Refactored various components and styles in the Footer section to enhance functionality and maintainability.
1 parent 9300c61 commit 1fbfab1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2249
-1016
lines changed

.brain/1-agent-smith/b-features/10-audio-player/10-audio-player.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
# Dual Audio Player Feature Status
2+
3+
**Last Updated:** $(date +'%Y-%m-%d %H:%M:%S')
4+
5+
## Current State & Functionality
6+
7+
* **Core Logic:** The primary logic resides in `src/shared-components/organisms/Footer/dual-audio/useDualAudioController.ts`.
8+
* **Dual Audio Elements:** Two separate `<audio>` elements are used (via `musicAudioRef` and `voiceAudioRef`) rendered hidden within `src/shared-components/organisms/Footer/Footer.tsx`.
9+
* **Independent State:** State variables (play/pause, time, duration, volume, active track) are managed independently for music and voice.
10+
* **Context:** State and actions are provided via `DualAudioContext` created in `src/shared-components/organisms/Footer/dual-audio/DualAudioContext.tsx`.
11+
* **Voice Loading:** Voice tracks are dynamically loaded based on the current route using `useVoiceTrackLoader` and the `voiceTracks.ts` playlist.
12+
* **Playlists Synced:** The `voiceTracks.ts` playlist has been updated to match the MP3s in `/public/audio/voice/`. `musicPlaylist.ts` manages background music.
13+
* **Route Cleanup:** A potentially redundant route (`app/best-practices-integration/`) was removed.
14+
* **Event Listeners:** `timeupdate`, `ended`, and `loadedmetadata` listeners are attached to keep state synchronized.
15+
* **Music Ducking:** Implemented logic to lower music volume (`DUCK_VOLUME = 0.2`) when a voice track plays in `BOTH` mode and restore it afterward.
16+
* **Mode Switching:** Logic handles volume adjustments and playback state changes when switching between `MUSIC_ONLY`, `VOICE_ONLY`, and `BOTH` modes.
17+
* **Volume/Seek:** Volume and seek handlers clamp values and consider the current mode and ducking state.
18+
19+
## How It Works (High Level)
20+
21+
1. `Footer.tsx` renders the player UI (`MiniPlayer`, `StandardPlayer`, `Playlist`) and the hidden `<audio>` elements.
22+
2. `Footer.tsx` consumes `useDualAudio` to get state/actions from the context.
23+
3. `DualAudioContext` uses `useDualAudioController` to manage all the underlying audio logic.
24+
4. `useDualAudioController` sets up state, refs, event listeners, and defines actions (play, pause, seek, load, setVolume, setMode).
25+
5. `useVoiceTrackLoader` (used within the controller) listens to route changes and calls `loadVoiceTrack` with the appropriate track from `voiceTracks.ts`.
26+
6. Effects within `useDualAudioController` handle music ducking based on `isVoicePlaying` and mode changes.
27+
28+
## Remaining Tasks / Next Steps
29+
30+
* **Implement Track Ending Logic:** Define behavior in `handleMusicEnded` and `handleVoiceEnded` within `useDualAudioController.ts`:
31+
* Music: Play next track in playlist? Loop? Stop?
32+
* Voice: Clear active track? Switch mode back to Music Only?
33+
* **Thorough Testing:** Execute the extensive QA checklist below.
34+
* **Browser Compatibility/Edge Cases:** Test across different browsers and handle potential browser limitations (e.g., autoplay restrictions requiring user interaction).
35+
* **Error Handling:** Improve error handling for audio loading/playback failures beyond basic console logs.
36+
* **(Deferred) Test Suite:** Fix/update Vitest snapshot tests.
37+
* **(Optional) Polish:** Consider bonus features from the checklist (preload indicators, persistent mode, adjustable duck volume).
38+
39+
---
40+
141
✅ Perfect — you're ready for the final phase.
242

343
Here's the **"🎯 Post-Launch QA Checklist: Dual Audio System"** (expanded, final version):

README.md

Lines changed: 88 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -1,235 +1,128 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# Brain Garden Portfolio Site
22

3-
## Getting Started
3+
> The central hub for my work as a senior AI-native engineer, systems thinker, and technical thought leader. This isn't just a portfolio — it's a living artifact of my engineering philosophy, powered by my evolving AI system: **Brain Garden**.
44
5-
First, run the development server:
5+
---
66

7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
15-
```
7+
## 🚀 Overview
8+
This site is more than a showcase — it's a **working demonstration of AI-assisted development in action**. Every feature, animation, prompt system, and page structure is part of an ecosystem I use to:
169

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10+
- Codify and test new development patterns
11+
- Share strategic systems for AI-driven engineering teams
12+
- Reinforce my identity as a **Full-Stack Business Person** who builds tools, stories, and systems
1813

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
14+
---
2015

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
16+
## 🎧 Dual Audio Player
17+
One of the site’s flagship features is a **custom dual-mode audio player**:
2218

23-
## Learn More
19+
- **Narrated Pages**: Every major section of the site includes a spoken narration — human-paced, professionally voiced.
20+
- **Dual Toggle**: Users can swap between narrative audio and ambient music on any page.
21+
- **Seamless Playback**: Intelligent caching and playback continuity across pages.
2422

25-
To learn more about Next.js, take a look at the following resources:
23+
This isn't just an accessibility feature — it's a statement about **the future of multimodal interfaces**.
2624

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
25+
---
2926

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
27+
## 🌱 What Is Brain Garden?
28+
> "Brain Garden" is my system for evolving AI-assisted software development.
3129
32-
## Deploy on Vercel
30+
- A place to store and share **rules**, **prompts**, and **knowledge breakthroughs**
31+
- A portable, fast-loading system that amplifies my performance on every project
32+
- A shared mental workspace that any team I work with inherits instantly
3333

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
34+
Hiring me means inheriting Brain Garden — and everything I’ve learned from the frontier.
3535

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
36+
---
3737

38-
## LinkedIn Data Processing
38+
## 🧠 AI-Native Engineering Philosophy
39+
This site demonstrates my core principles:
3940

40-
This project includes a tool to process LinkedIn data exports and generate structured data for the Experience page.
41+
- **Code should narrate itself** — clarity, intention, and purpose matter.
42+
- **AI isn’t magic** — it's leverage. Tools must adapt to humans, not the other way around.
43+
- **Systems > Scripts** — even small features should slot into a broader design logic.
4144

42-
### Exporting Your LinkedIn Data
45+
---
4346

44-
1. Go to your LinkedIn account settings
45-
2. Click on "Data privacy"
46-
3. Click on "Get a copy of your data"
47-
4. Select "Want something in particular?" option
48-
5. Check the following data files:
49-
- Profile
50-
- Positions
51-
- Education
52-
- Skills
53-
- Rich Media
54-
6. Request the archive and download it when available
47+
## 📂 Tech Stack
48+
- **Next.js + TypeScript** (full SSR/ISR support)
49+
- **Mantine UI** + theme/design tokens
50+
- **Styled-Components**
51+
- **Framer Motion** for subtle, layered animation
52+
- **Vercel** for blazing-fast deploys
53+
- **Custom audio playback engine** (React Context + Web Audio API)
5554

56-
### Processing the LinkedIn Data
55+
---
5756

58-
1. Create a directory `.brain/linkedInDataExport` in the project root
59-
2. Extract the LinkedIn data ZIP file and place the CSV files in this directory
60-
3. Run the processing script:
57+
## 🤖 AI-Integrated Production
6158

62-
```bash
63-
pnpm process-linkedin
64-
```
59+
The site itself was built using the same agent-assisted development principles I write about. Many of the prompts and workflows used in building this site were developed inside my Brain Garden system — which evolves alongside me to support rapid prototyping, narration scripting, and iterative refinement.
6560

66-
4. This will:
67-
- Parse the CSV files
68-
- Extract profile information, work experience, education, and skills
69-
- Attempt to download media files (profile photo, etc.)
70-
- Generate placeholder images for companies and schools
71-
- Save structured JSON data in `src/data/`
61+
### Voice Cloning & TTS
7262

73-
### Advanced Options
63+
- Narration was generated using **Speechify + voice cloning** trained on my voice.
64+
- Scripts are managed in structured markdown, allowing fast iteration, segment re-recording, and rebalancing narration/music dynamics.
7465

75-
The LinkedIn data processing script includes several advanced options:
66+
## 🧠 Philosophy in Form
7667

77-
#### Using LinkedIn Authentication
68+
This portfolio isn’t just about the projects I’ve done — it’s a demonstration of my approach:
7869

79-
To download media directly from LinkedIn (which often requires authentication):
70+
- Developer tooling built to evolve
71+
- Storytelling merged with interface design
72+
- AI-powered workflows that don’t just produce, but amplify
8073

81-
1. Log in to LinkedIn in your browser
82-
2. Use browser developer tools to export cookies to JSON:
83-
- Chrome: DevTools > Application > Storage > Cookies > Right-click > Save all cookies as JSON
84-
- Firefox: DevTools > Storage > Cookies > Export
85-
3. Save the cookies file to `.brain/linkedin-cookies.json`
86-
4. Edit the `CONFIG.useAuthentication` option in the script to `true`
74+
## 🧪 Want to Go Deeper?
8775

88-
#### Company Logo Generation
76+
If you’re evaluating me for a role or consulting opportunity, this repo pairs well with:
8977

90-
The script will generate visually appealing letter avatars for companies and schools:
78+
- [My AI development frameworks](https://davidmieloch.com/enterprise-ai-development-framework)
79+
- [My React best practices guide](https://davidmieloch.com/fullstack-react-best-practices-integration)
9180

92-
- Each letter avatar uses a color from LinkedIn's color palette
93-
- The first letter of the company/school name is displayed prominently
94-
- The script ensures consistent styling across all avatars
81+
---
9582

96-
> **Note:** The script previously supported the Clearbit Logo API for company logos, but this service has been deprecated and is no longer available. Letter avatars are now used as the primary fallback when direct downloads fail.
83+
## 📁 Repo Purpose
84+
You're looking at my **flagship personal site** — not a playground, but a polished demonstration of what it means to be a modern full-stack engineer who thinks like a systems architect and moves like a startup founder.
9785

98-
#### Troubleshooting
86+
It contains:
87+
- Modular component systems
88+
- Audio control logic
89+
- Advanced layout structure
90+
- Voice-ready content workflows
91+
- Live embedded AI philosophies
9992

100-
If you encounter issues with media downloads:
93+
---
10194

102-
1. Enable verbose logging by setting `CONFIG.verbose = true` in the script
103-
2. Check for debug screenshots in the project root directory
104-
3. Try using LinkedIn authentication as described above
105-
4. If all else fails, the script will generate letter avatars as placeholders
95+
## 🤝 Who This Is For
96+
If you're a:
10697

107-
# Experience Components
98+
- CTO evaluating a senior engineer with strong AI instincts
99+
- Engineering lead looking to scale your dev team’s capabilities with AI
100+
- Recruiter seeking **a builder who builds systems that build systems**
108101

109-
This package contains a set of components for displaying experience sections typically found on resumes and personal websites.
102+
Then this site — and this repo — is for you.
110103

111-
## Components
104+
---
112105

113-
- `Experience`: The main container component for all experience sections
114-
- `ExperienceSection`: For showcasing work experience
115-
- `EducationSection`: For displaying educational background
116-
- `SkillsSection`: For listing skills with optional categorization
117-
- `SideProjectsSection`: For displaying side projects and personal work
106+
## 🎯 Goals
107+
- Prove out design, dev, and content capabilities in one artifact
108+
- Act as the gateway to deeper materials (whitepapers, talks, demos)
109+
- Show — not just tell — how I work and how I lead
118110

119-
## Markdown Support in Bullet Points
111+
---
120112

121-
The `ExperienceSection` component supports Markdown formatting in bullet points to make content more scannable and highlight important information:
113+
## 📌 Live Site
114+
[https://davidmieloch.com](https://davidmieloch.com)
122115

123-
```jsx
124-
const experienceWithMarkdown = {
125-
// ... other fields
126-
bulletPoints: [
127-
'Led a team of **5 developers** in adopting modern React patterns.',
128-
'Improved performance by **30%** through *architectural optimizations*.',
129-
'Created interactive components for clients including:',
130-
'- **Client A**: Custom dashboard',
131-
'- **Client B**: Data visualization system',
132-
'Published `npm-package-name` with **25 Stars / 5 Forks**.'
133-
]
134-
};
135-
```
136-
137-
### Markdown Formatting Options
138-
139-
- **Bold**: Use `**text**` to emphasize key achievements and metrics
140-
- **Italic**: Use `*text*` for subtle emphasis
141-
- **Lists**: Create nested bullet points with hyphens (`- Sub point`)
142-
- **Links**: Add links with `[text](url)` syntax
143-
- **Code**: Highlight code/technical terms with backticks `` `code` ``
144-
145-
### Implementation Example
146-
147-
See `BulletPointsExample.tsx` for a complete example of markdown formatting in bullet points.
148-
149-
## Media Layout System
150-
151-
The components support a flexible media layout system:
152-
153-
### Basic Media Types
154-
155-
- **image**: Display an image with optional title and description
156-
- **video**: Display a video with controls and optional thumbnail
157-
- **link**: Display a link with optional thumbnail, title, and description
158-
159-
### Advanced Layouts with Media Groups
160-
161-
You can create complex media layouts using the `group` media type:
162-
163-
```js
164-
{
165-
type: 'group',
166-
layout: 'default', // 'default' for side-by-side, 'stack' for vertical
167-
url: '#', // Required placeholder URL
168-
items: [
169-
// First item takes 48% width
170-
{
171-
type: 'image',
172-
url: '/path/to/image1.jpg',
173-
title: 'Main Feature',
174-
width: '48%'
175-
},
176-
// Second item is a group of stacked media
177-
{
178-
type: 'group',
179-
layout: 'stack',
180-
url: '#',
181-
width: '48%',
182-
items: [
183-
{
184-
type: 'image',
185-
url: '/path/to/image2.jpg',
186-
title: 'Stacked Item 1'
187-
},
188-
{
189-
type: 'image',
190-
url: '/path/to/image3.jpg',
191-
title: 'Stacked Item 2'
192-
}
193-
]
194-
}
195-
]
196-
}
197-
```
198-
199-
This creates a layout with:
200-
- One main image on the left (48% width)
201-
- Two stacked images on the right (48% width combined)
202-
203-
### Width Options
204-
205-
Media items support several width options:
206-
- Percentage values (e.g., `'48%'`, `'100%'`)
207-
- Predefined values: `'quarter'`, `'third'`, `'half'`, `'full'`
208-
- Default: Takes full width if no width specified
209-
210-
### Responsive Behavior
211-
212-
All media layouts are responsive and adapt to smaller screens:
213-
- On mobile, media items stack vertically regardless of layout
214-
- Images maintain proper aspect ratios
215-
- Media groups preserve their internal layout structure when possible
216-
217-
## Usage
218-
219-
```jsx
220-
import { Experience, SideProjectsSection } from '@components/Experience';
221-
import { sampleProjects } from './data';
222-
223-
const MyExperiencePage = () => (
224-
<Experience>
225-
<SideProjectsSection
226-
title="Side Projects"
227-
projects={sampleProjects}
228-
/>
229-
</Experience>
230-
);
231-
```
232-
233-
## Example Data
234-
235-
See `data.ts` and `ExampleUsage.tsx` for example implementations.
116+
---
117+
118+
## 🛠️ Want to Build Something Like This?
119+
Contact me directly or open an issue.
120+
121+
---
122+
123+
## ✍️ Author
124+
**David Mieloch**
125+
Senior Software Engineer • AI Architect • Full-Stack Business Person
126+
[LinkedIn](https://www.linkedin.com/in/davidmieloch)[Site](https://davidmieloch.com)[Email](mailto:[email protected])
127+
128+
> "I'm not selling Brain Garden. I'm selling me — and Brain Garden comes with me."

app/best-practices-integration/page.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)