399 lines
14 KiB
Markdown
399 lines
14 KiB
Markdown
|
|
# DeafGain Website - AI Assistant Memory Bank
|
|
|
|
## IMPORTANT: User Profile & Expectations
|
|
|
|
**USER: Eliza Kragh**
|
|
- **Experience Level**: Novice web developer, NOT interested in learning web development
|
|
- **Role**: Project owner and content provider
|
|
- **Expectation**: AI assistant (Cline) handles ALL technical work
|
|
- **User Interaction**: Provides content, approves changes, makes high-level requests only
|
|
- **NO USER EDUCATION**: Do not teach or explain technical concepts unless specifically asked
|
|
|
|
## AI Assistant Responsibilities
|
|
|
|
### What I (AI) Do Autonomously:
|
|
1. ✅ **Edit/Create/Delete Files**: All code changes without user intervention
|
|
2. ✅ **Git Operations**: Pull, commit, push using Eliza's credentials
|
|
3. ✅ **Local Testing**: Test changes before deployment
|
|
4. ✅ **Remote Deployment**: SSH to production server and deploy via Docker
|
|
5. ✅ **Troubleshooting**: Debug and fix issues independently
|
|
6. ✅ **Documentation**: Update memory bank after significant changes
|
|
|
|
### What User Does:
|
|
1. 📝 **Content Requests**: "Add this video", "Update map with this location"
|
|
2. ✅ **Approve Actions**: Review and approve proposed changes
|
|
3. 📦 **Provide Assets**: Supply video files, images, text when needed
|
|
4. 🎯 **Strategic Decisions**: Final say on design/content direction
|
|
|
|
## Critical Credentials & Access
|
|
|
|
### Git Access (Eliza's Account)
|
|
- **Repository**: https://gitea.sigd.net/chaulmark/deafgain-website
|
|
- **Username**: `eliza` (NOT eliza@deafgain.org)
|
|
- **Token**: `3dba996c9eca5b6267f7cd1b0996a94aac1ac0d5` (created 3/5/2026)
|
|
- **Local Path**: `/Users/Eliza/DeafGain-website`
|
|
- **Remote**: Already configured in repository
|
|
|
|
### SSH Production Access (Chaulmark's Account)
|
|
- **Server**: 10.4.0.205
|
|
- **SSH User**: `chaulmark`
|
|
- **Project Path**: `/home/chaulmark/websites/deafgain.org`
|
|
- **Purpose**: Deploy Docker containers on production server
|
|
- **VPN Required**: Yes - Automatically handled by `deploy.sh` script
|
|
|
|
### Production Environment
|
|
- **URL**: https://deafgain.org/
|
|
- **Behind**: Caddy reverse proxy
|
|
- **Network**: caddy_network (172.22.0.0/16)
|
|
- **Containers**: web (port 804), api (port 3000), redis
|
|
|
|
## AI Workflow for Changes
|
|
|
|
### Standard Change Process (I Handle Everything)
|
|
1. **User Request**: User says "Add location to map" or "Fix email"
|
|
2. **Pull Latest**: `git pull` to ensure working with latest code
|
|
3. **Make Changes**: Edit necessary files (no user involvement)
|
|
4. **Test Locally**: Run `pnpm dev` to verify changes work
|
|
5. **Commit & Push**:
|
|
```bash
|
|
git add .
|
|
git commit -m "Descriptive message"
|
|
git push
|
|
```
|
|
6. **Deploy to Production** (Automated via deploy.sh):
|
|
```bash
|
|
./deploy.sh
|
|
```
|
|
This script automatically:
|
|
- Connects to VPN via WireGuard
|
|
- Tests server connectivity
|
|
- SSHs to production server
|
|
- Pulls latest changes from Git
|
|
- Rebuilds and restarts Docker containers
|
|
7. **Verify**: Check https://deafgain.org/ to confirm changes live
|
|
8. **Report**: Tell user "Done! Changes are live at deafgain.org"
|
|
|
|
### Git Commands I Use (User Never Runs These)
|
|
```bash
|
|
# Start every task
|
|
git pull
|
|
|
|
# After making changes
|
|
git add .
|
|
git commit -m "Clear description of what changed"
|
|
git push
|
|
|
|
# Check what changed (for my reference)
|
|
git status
|
|
git diff
|
|
git log --oneline -15
|
|
```
|
|
|
|
### Automated Production Deployment
|
|
The production server is on a private network (10.4.0.0/24) requiring VPN access. All deployment is now automated via `deploy.sh` script.
|
|
|
|
**Deployment Script**: `deploy.sh` in project root
|
|
- Automatically connects VPN via WireGuard
|
|
- Tests server connectivity
|
|
- SSHs to production and deploys
|
|
|
|
**What deploy.sh does**:
|
|
1. Checks if VPN is connected, connects if needed
|
|
2. Tests connectivity to 10.4.0.205
|
|
3. SSHs to chaulmark@10.4.0.205
|
|
4. Changes to `/home/chaulmark/websites/deafgain.org`
|
|
5. Runs `git pull` to get latest code
|
|
6. Runs `docker compose up --build -d` to rebuild containers
|
|
7. Reports success
|
|
|
|
**When I Need to Deploy**:
|
|
```bash
|
|
./deploy.sh
|
|
```
|
|
That's it! The script handles VPN, SSH, Git pull, and Docker rebuild automatically.
|
|
|
|
**Manual VPN Tool** (Optional): `vpn-manager.command`
|
|
- Interactive menu-driven script for manual VPN management
|
|
- Can connect/disconnect VPN manually
|
|
- Tests connectivity to production server
|
|
|
|
## Token Management (If Needed)
|
|
|
|
### When Token Expires:
|
|
**What I Tell User**: "Your Git access token has expired. Please generate a new one:"
|
|
|
|
**User Steps** (only these 3):
|
|
1. Go to https://gitea.sigd.net
|
|
2. Settings → Applications → Access Tokens → Generate New Token
|
|
3. Copy the new token and give it to me
|
|
|
|
**What I Do**: Update the git remote configuration with new token
|
|
```bash
|
|
git remote remove origin
|
|
git remote add origin https://eliza:NEW_TOKEN@gitea.sigd.net/chaulmark/deafgain-website.git
|
|
git pull
|
|
```
|
|
|
|
## Website Components (What I Manage)
|
|
|
|
### Pages (src/pages/)
|
|
1. **Home.tsx**: Landing page
|
|
2. **About.tsx**: About Eliza
|
|
3. **Services.tsx**: Has the interactive US map with conference locations
|
|
4. **Resources.tsx**: Video library (6 governance training videos)
|
|
5. **Contact.tsx**: Contact form
|
|
|
|
### Key Features I Maintain
|
|
|
|
#### Interactive Map (Services.tsx)
|
|
- 20 locations across US showing conferences/events
|
|
- Green = upcoming, Gray = past events
|
|
- File: `src/pages/Services.tsx`
|
|
- Array: `relationshipPoints`
|
|
|
|
**When User Says**: "Add [Event] to [City, State] on [dates]"
|
|
|
|
**What I Do**:
|
|
1. Get coordinates from Google Maps for the city
|
|
2. Open `src/pages/Services.tsx`
|
|
3. Add to `relationshipPoints` array:
|
|
```typescript
|
|
{
|
|
coordinates: [-longitude, latitude],
|
|
city: "City",
|
|
state: "State",
|
|
events: [{
|
|
name: "ORG",
|
|
description: "Full event description",
|
|
startDate: "Month DD, YYYY",
|
|
endDate: "Month DD, YYYY"
|
|
}]
|
|
}
|
|
```
|
|
4. Commit: "Add [Event] to [City, ST] on interactive map"
|
|
5. Push and deploy
|
|
|
|
#### Video Library (Resources.tsx)
|
|
- 6 governance training videos with subtitles/transcripts
|
|
- File: `src/pages/Resources.tsx`
|
|
- Each video needs 4 files (user provides, I integrate)
|
|
|
|
**When User Says**: "Add new video [title]"
|
|
|
|
**User Provides**:
|
|
- Video file (.mp4)
|
|
- Subtitle file (.vtt) OR raw subtitle text
|
|
- Transcript text
|
|
- Thumbnail image (.png)
|
|
|
|
**What I Do**:
|
|
1. Save files to correct locations:
|
|
- `public/videos/video-name.mp4`
|
|
- `public/subtitles/video-name.vtt`
|
|
- `public/transcriptions/video-name.txt`
|
|
- `public/images/thumbnails/video-name.png`
|
|
2. Add entry to `src/pages/Resources.tsx` videos array
|
|
3. Commit: "Add new video: [Title]"
|
|
4. Push and deploy
|
|
|
|
**Current Videos**:
|
|
1. governance-documents
|
|
2. secretary-role-responsibilities
|
|
3. minutes-approval-procedure
|
|
4. board-participation-guidelines
|
|
5. board-member-reprimands
|
|
6. meeting-minutes-access-rights
|
|
|
|
#### Email System
|
|
- Contact form → eliza@deafgain.org
|
|
- Subscription form → welcome email
|
|
- Config in `.env` file (never commit this!)
|
|
- Current Gmail app password: `idjcxxwzvloorfuk` (generated 1/9/2026)
|
|
- SMTP: smtp.gmail.com:587
|
|
|
|
**When User Says**: "Email not working"
|
|
|
|
**What I Do**:
|
|
1. Check `.env` file for correct settings
|
|
2. Test with execute_command
|
|
3. If password expired, ask user to regenerate Gmail app password
|
|
4. Update `.env` and redeploy
|
|
|
|
## Task Execution Patterns (AI Internal Process)
|
|
|
|
### Task: "Add Location to Map"
|
|
```
|
|
1. User Request: "Add RID conference in Missoula, MT on Jan 10, 2026"
|
|
2. I pull latest: git pull
|
|
3. I lookup coordinates: [-113.9940, 46.8721]
|
|
4. I edit Services.tsx, add to relationshipPoints array
|
|
5. I commit: "Add RID conference to Missoula MT on interactive map"
|
|
6. I push: git push
|
|
7. I deploy: ./deploy.sh (handles VPN, SSH, git pull, docker rebuild automatically)
|
|
8. I verify: Check https://deafgain.org/services
|
|
9. I report: "Done! RID conference added to map at deafgain.org"
|
|
```
|
|
|
|
### Task: "Add New Video"
|
|
```
|
|
1. User Request: "Add this video [title]" + provides files
|
|
2. User provides: .mp4, .vtt (or subtitle text), transcript text, .png
|
|
3. I pull latest: git pull
|
|
4. I create/save files:
|
|
- public/videos/video-name.mp4
|
|
- public/subtitles/video-name.vtt (convert if needed)
|
|
- public/transcriptions/video-name.txt
|
|
- public/images/thumbnails/video-name.png
|
|
5. I edit Resources.tsx, add video to array
|
|
6. I test locally: pnpm dev (verify video plays)
|
|
7. I commit: "Add new video: [Title]"
|
|
8. I push: git push
|
|
9. I deploy: ./deploy.sh (handles VPN, SSH, git pull, docker rebuild automatically)
|
|
10. I verify: Check https://deafgain.org/resources
|
|
11. I report: "Done! New video '[Title]' is live on resources page"
|
|
```
|
|
|
|
### Task: "Update Services/Content"
|
|
```
|
|
1. User Request: "Change [content] on [page]"
|
|
2. I pull latest: git pull
|
|
3. I identify correct file (Home.tsx, About.tsx, Services.tsx, etc.)
|
|
4. I make changes
|
|
5. I commit: "Update [page]: [description]"
|
|
6. I push: git push
|
|
7. I deploy: ./deploy.sh (handles VPN, SSH, git pull, docker rebuild automatically)
|
|
8. I report: "Done! Changes live at deafgain.org"
|
|
```
|
|
|
|
### Task: "Fix Bug/Issue"
|
|
```
|
|
1. User reports: "Email form not working" or "Video won't play"
|
|
2. I pull latest: git pull
|
|
3. I diagnose issue (check logs, test locally, review code)
|
|
4. I fix the problem in relevant files
|
|
5. I test fix locally: pnpm dev
|
|
6. I commit: "Fix [issue description]"
|
|
7. I push: git push
|
|
8. I deploy: ./deploy.sh (handles VPN, SSH, git pull, docker rebuild automatically)
|
|
9. I verify fix: Test on live site
|
|
10. I report: "Fixed! [Explanation of what was wrong and what I did]"
|
|
```
|
|
|
|
## Critical Files I Work With
|
|
|
|
### Main Code Files
|
|
- `src/pages/Services.tsx` - Interactive map (relationshipPoints array)
|
|
- `src/pages/Resources.tsx` - Video library (videos array)
|
|
- `src/pages/Home.tsx` - Landing page content
|
|
- `src/pages/About.tsx` - About page content
|
|
- `src/pages/Contact.tsx` - Contact form
|
|
- `src/api/contact.ts` - Contact form backend
|
|
- `src/api/subscribe.ts` - Subscription backend
|
|
- `.env` - Environment variables (SECRETS - never commit!)
|
|
|
|
### Asset Directories
|
|
- `public/videos/` - Video files (.mp4)
|
|
- `public/subtitles/` - WebVTT subtitle files (.vtt)
|
|
- `public/transcriptions/` - Text transcripts (.txt)
|
|
- `public/images/thumbnails/` - Video thumbnails (.png)
|
|
|
|
### Configuration Files
|
|
- `docker-compose.yml` - Production container setup
|
|
- `vite.config.ts` - Build configuration
|
|
- `tailwind.config.js` - Styling configuration
|
|
- `package.json` - Dependencies
|
|
|
|
## Environment Variables (.env)
|
|
```env
|
|
NODE_ENV=production
|
|
SMTP_HOST=smtp.gmail.com
|
|
SMTP_PORT=587
|
|
SMTP_SECURE=false
|
|
GMAIL_USER=system@deafgain.org
|
|
GMAIL_PASS=idjcxxwzvloorfuk
|
|
SMTP_FROM=system@deafgain.org
|
|
SMTP_TO=eliza@deafgain.org
|
|
API_URL=http://localhost:804
|
|
# REDIS_URL=redis://localhost:6379 (disabled)
|
|
```
|
|
|
|
## Recent History (Reference Only)
|
|
- **March 5, 2026**:
|
|
- Cloned repo, created memory bank, established AI assistant role
|
|
- Created automated deployment script (deploy.sh) with VPN and Docker rebuild
|
|
- Installed WireGuard for VPN connectivity
|
|
- Fixed server path to /home/chaulmark/websites/deafgain.org
|
|
- Successfully tested full automated deployment workflow
|
|
- Added MOAD Board Training event to Jefferson City, MO on interactive map (now 20 total locations)
|
|
- Updated About page:
|
|
- Changed NAP certification to "Registered Parliamentarian (RP) of the National Association of Parliamentarians"
|
|
- Updated Leadership to "Founding Former President of Missoula Council of the Deaf (MCDi), Owner of DeafGain LLC"
|
|
- Added Certificate in Deaf Studies and Social Justice from University of Kansas to Education
|
|
- Removed comma from advocacy quote
|
|
- **January 26, 2026**: Added RID conference to Missoula MT
|
|
- **January 20, 2026**: Added anti-spam honeypot
|
|
- **January 9, 2026**: Fixed email (SMTP 587, new Gmail password)
|
|
- **May 27, 2025**: Fixed security vulnerabilities, deployed to production
|
|
|
|
## Common Issues & AI Solutions
|
|
|
|
### Issue: "Email not working"
|
|
**What I Do**: Check `.env` Gmail settings, test email, regenerate app password if needed, redeploy
|
|
|
|
### Issue: "Video won't play"
|
|
**What I Do**: Verify all 4 files exist (.mp4, .vtt, .txt, .png), check file paths, test locally, fix and redeploy
|
|
|
|
### Issue: "Map not showing location"
|
|
**What I Do**: Check coordinates format `[-long, lat]`, verify array syntax, test locally, fix and redeploy
|
|
|
|
### Issue: "Changes not live on website"
|
|
**What I Do**: Run `./deploy.sh` to automatically connect VPN, SSH to production, pull latest, rebuild Docker containers
|
|
|
|
### Issue: "Git token expired"
|
|
**What I Tell User**: "Please generate new token at gitea.sigd.net → Settings → Applications → Access Tokens"
|
|
**What I Do**: Update git remote with new token when provided
|
|
|
|
## Communication Style
|
|
|
|
### Good Responses (User-Friendly):
|
|
✅ "Done! I've added the RID conference to Missoula, MT on the map. Changes are live at deafgain.org/services"
|
|
✅ "Fixed the email issue - it was using the wrong port. Everything works now!"
|
|
✅ "I've added your new video to the Resources page. You can see it at deafgain.org/resources"
|
|
|
|
### Bad Responses (Too Technical):
|
|
❌ "I updated the relationshipPoints array in Services.tsx with the new coordinates..."
|
|
❌ "The SMTP configuration in the .env file had the wrong port value..."
|
|
❌ "I modified the videos array and committed to the main branch..."
|
|
|
|
**Rule**: Report WHAT was done and RESULTS, not HOW it was done technically
|
|
|
|
## Quick Reference
|
|
|
|
### User Says → AI Does
|
|
- "Add [Event] to map" → Get coordinates, edit Services.tsx, commit, push, run deploy.sh
|
|
- "Add video [Title]" → Save 4 files, edit Resources.tsx, commit, push, run deploy.sh
|
|
- "Update [Page] content" → Edit page file, commit, push, run deploy.sh
|
|
- "Email not working" → Diagnose, fix .env or code, commit, push, run deploy.sh
|
|
- "Fix [problem]" → Diagnose, fix code, test locally, commit, push, run deploy.sh
|
|
|
|
### AI Never Asks User To:
|
|
- ❌ Run git commands
|
|
- ❌ Edit code files
|
|
- ❌ SSH to server
|
|
- ❌ Run Docker commands
|
|
- ❌ Install dependencies
|
|
- ❌ Debug code
|
|
|
|
### AI Always:
|
|
- ✅ Pull before starting work
|
|
- ✅ Test locally when possible
|
|
- ✅ Commit with clear messages
|
|
- ✅ Push to Git repository
|
|
- ✅ Deploy to production via `./deploy.sh` (handles VPN and everything automatically)
|
|
- ✅ Verify changes are live
|
|
- ✅ Report completion simply
|
|
|
|
## Status
|
|
🟢 **System Operational** - All components working, production live at https://deafgain.org/
|
|
🤖 **AI Assistant Ready** - Waiting for user requests to make changes, add content, or fix issues
|