Add AI assistant documentation: memory bank and git workflow
This commit is contained in:
parent
78aade0c94
commit
596c5033a0
2 changed files with 870 additions and 0 deletions
497
cline_docs/gitWorkflow.md
Normal file
497
cline_docs/gitWorkflow.md
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
# Git Workflow & Memory Bank
|
||||
|
||||
## Git Configuration
|
||||
|
||||
### Repository Information
|
||||
- **Repository URL**: `https://gitea.sigd.net/chaulmark/deafgain-website`
|
||||
- **Gitea Server**: gitea.sigd.net (private Gitea instance)
|
||||
- **Username**: `eliza`
|
||||
- **Authentication**: Personal Access Token
|
||||
- **Current Token**: `3dba996c9eca5b6267f7cd1b0996a94aac1ac0d5` (created 3/5/2026)
|
||||
- **Local Path**: `/Users/Eliza/DeafGain-website`
|
||||
- **Main Branch**: `main`
|
||||
- **Latest Commit**: `78aade0c94a4bad05e5b8ff95d025e0b68e17336`
|
||||
|
||||
### Token Permissions
|
||||
The access token has been configured with:
|
||||
- ✅ Read repository access
|
||||
- ✅ Write repository access (for pushing changes)
|
||||
|
||||
### Git Remote Configuration
|
||||
```bash
|
||||
# Remote is already configured:
|
||||
origin: https://eliza:3dba996c9eca5b6267f7cd1b0996a94aac1ac0d5@gitea.sigd.net/chaulmark/deafgain-website.git
|
||||
```
|
||||
|
||||
## Common Git Workflows
|
||||
|
||||
### 1. Checking Repository Status
|
||||
```bash
|
||||
# Check current status
|
||||
git status
|
||||
|
||||
# View current branch
|
||||
git branch
|
||||
|
||||
# View remote branches
|
||||
git branch -r
|
||||
```
|
||||
|
||||
### 2. Pulling Latest Changes
|
||||
```bash
|
||||
# Pull from main branch (recommended before starting work)
|
||||
git pull origin main
|
||||
|
||||
# Or simply
|
||||
git pull
|
||||
```
|
||||
|
||||
### 3. Viewing Changes History
|
||||
```bash
|
||||
# View recent commits (short format)
|
||||
git log --oneline --graph --all -15
|
||||
|
||||
# View specific commit details
|
||||
git show HEAD
|
||||
git show <commit-hash>
|
||||
|
||||
# View changes between commits
|
||||
git diff HEAD~1 HEAD
|
||||
git diff <commit-hash1> <commit-hash2>
|
||||
|
||||
# View files changed in a commit
|
||||
git show --stat HEAD
|
||||
```
|
||||
|
||||
### 4. Making Changes
|
||||
```bash
|
||||
# After editing files, check what changed
|
||||
git status
|
||||
git diff
|
||||
|
||||
# Stage all changes
|
||||
git add .
|
||||
|
||||
# Or stage specific files
|
||||
git add src/pages/Services.tsx
|
||||
|
||||
# Commit changes with meaningful message
|
||||
git commit -m "Add new feature: Interactive map updates"
|
||||
|
||||
# Push to remote repository
|
||||
git push origin main
|
||||
# Or simply
|
||||
git push
|
||||
```
|
||||
|
||||
### 5. Viewing File History
|
||||
```bash
|
||||
# View commit history for specific file
|
||||
git log --oneline src/pages/Services.tsx
|
||||
|
||||
# View changes to a file over time
|
||||
git log -p src/pages/Services.tsx
|
||||
|
||||
# Who changed what in a file
|
||||
git blame src/pages/Services.tsx
|
||||
```
|
||||
|
||||
### 6. Undoing Changes
|
||||
```bash
|
||||
# Discard changes to a file (before staging)
|
||||
git checkout -- src/pages/Services.tsx
|
||||
|
||||
# Unstage a file (keep changes)
|
||||
git reset HEAD src/pages/Services.tsx
|
||||
|
||||
# Undo last commit (keep changes)
|
||||
git reset --soft HEAD~1
|
||||
|
||||
# Undo last commit (discard changes - DANGEROUS)
|
||||
git reset --hard HEAD~1
|
||||
```
|
||||
|
||||
### 7. Working with Branches
|
||||
```bash
|
||||
# Create new branch
|
||||
git checkout -b feature/new-feature
|
||||
|
||||
# Switch branches
|
||||
git checkout main
|
||||
|
||||
# List all branches
|
||||
git branch -a
|
||||
|
||||
# Delete branch
|
||||
git branch -d feature/old-feature
|
||||
|
||||
# Push branch to remote
|
||||
git push origin feature/new-feature
|
||||
```
|
||||
|
||||
## Recent Commit History
|
||||
|
||||
### Latest Changes (as of 3/5/2026)
|
||||
```
|
||||
78aade0 (HEAD -> main) - Update interactive map: Add RID conference to Missoula MT and update ASLTA description
|
||||
4755cd3 - Consolidate services into single DeafGain Consultants offering
|
||||
a565932 - Remove service selection field from contact form
|
||||
ae7c52d - Add anti-spam honeypot field and update contact form service options
|
||||
a0cf3e9 - Update memory bank status summary with current system state
|
||||
df6c696 - Fix email configuration: Update SMTP port to 587 and regenerate Gmail app password
|
||||
379c4e1 - Add Parliamentarian service and update Austin TX event
|
||||
8b2b421 - Update email configuration: change SMTP port to 2525
|
||||
5d49c9e - Remove ADA-compliant transcripts service
|
||||
67c775a - Add two locations
|
||||
86096d9 - Switch to Missoula from Helena
|
||||
b1e7d29 - Add rebuild flags
|
||||
b214427 - Added geographic locations for upcoming events
|
||||
```
|
||||
|
||||
## Git Authentication Troubleshooting
|
||||
|
||||
### If Access Token Expires or Needs Regeneration
|
||||
|
||||
1. **Generate New Token in Gitea:**
|
||||
- Log into https://gitea.sigd.net
|
||||
- Settings → Applications → Access Tokens
|
||||
- Delete old token
|
||||
- Generate new token with repository permissions
|
||||
- Copy the new token immediately
|
||||
|
||||
2. **Update Git Remote:**
|
||||
```bash
|
||||
# Remove old remote
|
||||
git remote remove origin
|
||||
|
||||
# Add new remote with new token
|
||||
git remote add origin https://eliza:NEW_TOKEN_HERE@gitea.sigd.net/chaulmark/deafgain-website.git
|
||||
|
||||
# Verify remote
|
||||
git remote -v
|
||||
```
|
||||
|
||||
3. **Test Connection:**
|
||||
```bash
|
||||
git pull
|
||||
```
|
||||
|
||||
### Common Authentication Issues
|
||||
|
||||
**Issue**: 403 Forbidden error
|
||||
- **Cause**: Token doesn't have proper permissions or has expired
|
||||
- **Solution**: Generate new token with `read:repository` and `write:repository` permissions
|
||||
|
||||
**Issue**: Username incorrect
|
||||
- **Cause**: Using wrong Gitea username
|
||||
- **Solution**: Username is `eliza` (not email address `eliza@deafgain.org`)
|
||||
|
||||
**Issue**: Token doesn't work
|
||||
- **Cause**: Token permissions not properly configured
|
||||
- **Solution**: Ensure both read and write repository permissions are enabled
|
||||
|
||||
## DeafGain Website Codebase Overview
|
||||
|
||||
### Project Architecture
|
||||
|
||||
```
|
||||
DeafGain-website/
|
||||
├── Frontend (React + TypeScript)
|
||||
│ ├── src/
|
||||
│ │ ├── pages/ # Main page components
|
||||
│ │ ├── components/ # Reusable UI components
|
||||
│ │ ├── api/ # API integration layer
|
||||
│ │ ├── context/ # React context providers
|
||||
│ │ └── lib/ # Utility functions
|
||||
│ └── public/ # Static assets
|
||||
│ ├── videos/ # Video files (.mp4)
|
||||
│ ├── subtitles/ # WebVTT subtitle files
|
||||
│ ├── transcriptions/ # Text transcripts
|
||||
│ └── images/ # Images and thumbnails
|
||||
│
|
||||
├── Backend (Node.js + Express)
|
||||
│ └── server.ts # API server
|
||||
│
|
||||
├── Docker Configuration
|
||||
│ ├── docker-compose.yml # Production orchestration
|
||||
│ ├── docker-compose.dev.yml # Development environment
|
||||
│ ├── Dockerfile # Frontend container
|
||||
│ ├── Dockerfile.api # Backend container
|
||||
│ ├── Dockerfile.dev # Dev frontend container
|
||||
│ └── Dockerfile.dev.api # Dev backend container
|
||||
│
|
||||
└── Configuration Files
|
||||
├── vite.config.ts # Vite build configuration
|
||||
├── tailwind.config.js # Tailwind CSS config
|
||||
├── tsconfig.json # TypeScript config
|
||||
├── nginx.conf # Nginx configuration
|
||||
├── default.conf # Nginx reverse proxy
|
||||
└── .env # Environment variables
|
||||
```
|
||||
|
||||
### Key Files and Their Purposes
|
||||
|
||||
#### Frontend Pages (`src/pages/`)
|
||||
- **Home.tsx**: Landing page with hero section and overview
|
||||
- **About.tsx**: Information about Eliza and DeafGain
|
||||
- **Services.tsx**: Service offerings + interactive US map with conference locations
|
||||
- **Resources.tsx**: Video library with 6 governance training videos
|
||||
- **Contact.tsx**: Contact form with email notifications
|
||||
|
||||
#### Components (`src/components/`)
|
||||
- **Layout/**: Navbar, Footer, Layout wrapper
|
||||
- **VideoPlayer.tsx**: Custom video player with WebVTT subtitle support
|
||||
- **SnowPeaks.tsx**: Animated background graphics
|
||||
- **Toast.tsx**: Notification component
|
||||
|
||||
#### Backend (`server.ts` & `src/api/`)
|
||||
- **server.ts**: Main Express API server
|
||||
- **api/contact.ts**: Contact form endpoint with email sending
|
||||
- **api/subscribe.ts**: Newsletter subscription endpoint
|
||||
- **lib/email.ts**: Email service integration (Gmail SMTP)
|
||||
- **lib/rate-limit.ts**: Rate limiting logic
|
||||
|
||||
### Important Patterns
|
||||
|
||||
#### 1. Video Resource Structure
|
||||
Each video requires 4 files:
|
||||
```
|
||||
public/videos/video-name.mp4 # Video file
|
||||
public/subtitles/video-name.vtt # WebVTT subtitles
|
||||
public/transcriptions/video-name.txt # Full text transcript
|
||||
public/images/thumbnails/video-name.png # Thumbnail image
|
||||
```
|
||||
|
||||
#### 2. Interactive Map Data
|
||||
Location data structure in `Services.tsx`:
|
||||
```typescript
|
||||
const relationshipPoints: RelationshipPoint[] = [
|
||||
{
|
||||
coordinates: [-longitude, latitude],
|
||||
city: "City Name",
|
||||
state: "State",
|
||||
events: [{
|
||||
name: "Organization Acronym",
|
||||
description: "Full event description",
|
||||
startDate: "Month DD, YYYY",
|
||||
endDate: "Month DD, YYYY"
|
||||
}]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### 3. Environment Variables
|
||||
Critical `.env` variables:
|
||||
```env
|
||||
NODE_ENV=production
|
||||
GMAIL_USER=system@deafgain.org
|
||||
GMAIL_PASS=gmail_app_password
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
REDIS_URL=redis://localhost:6379
|
||||
API_URL=http://localhost:804
|
||||
```
|
||||
|
||||
### Development Workflow
|
||||
|
||||
#### Making Changes to the Website
|
||||
|
||||
1. **Pull latest changes**
|
||||
```bash
|
||||
git pull
|
||||
```
|
||||
|
||||
2. **Make your changes**
|
||||
- Edit files as needed
|
||||
- Test locally with `pnpm dev`
|
||||
|
||||
3. **Check what changed**
|
||||
```bash
|
||||
git status
|
||||
git diff
|
||||
```
|
||||
|
||||
4. **Stage and commit**
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Descriptive message about changes"
|
||||
```
|
||||
|
||||
5. **Push to Gitea**
|
||||
```bash
|
||||
git push
|
||||
```
|
||||
|
||||
6. **Deploy to production**
|
||||
- Changes are pulled to production server
|
||||
- Docker containers rebuilt with `docker-compose up --build -d`
|
||||
|
||||
#### Adding New Videos
|
||||
|
||||
1. **Prepare files:**
|
||||
- Video: `public/videos/video-name.mp4`
|
||||
- Subtitles: `public/subtitles/video-name.vtt`
|
||||
- Transcript: `public/transcriptions/video-name.txt`
|
||||
- Thumbnail: `public/images/thumbnails/video-name.png`
|
||||
|
||||
2. **Update Resources.tsx:**
|
||||
```typescript
|
||||
{
|
||||
id: 'video-name',
|
||||
title: 'Video Title',
|
||||
thumbnail: '/images/thumbnails/video-name.png',
|
||||
description: 'Description',
|
||||
category: 'Professional Development & Governance'
|
||||
}
|
||||
```
|
||||
|
||||
3. **Commit and push:**
|
||||
```bash
|
||||
git add public/videos/ public/subtitles/ public/transcriptions/ public/images/thumbnails/ src/pages/Resources.tsx
|
||||
git commit -m "Add new video: Video Title"
|
||||
git push
|
||||
```
|
||||
|
||||
#### Updating Interactive Map
|
||||
|
||||
1. **Edit Services.tsx**
|
||||
2. **Add new location to relationshipPoints array**
|
||||
3. **Use exact coordinates from Google Maps**
|
||||
4. **Commit and push changes**
|
||||
5. **Docker must rebuild with `no_cache: true` flag**
|
||||
|
||||
### Production Deployment
|
||||
|
||||
#### Current Production Setup
|
||||
- **URL**: https://deafgain.org/
|
||||
- **Server**: 10.4.0.206 (behind Caddy reverse proxy)
|
||||
- **Network**: caddy_network (172.22.0.0/16)
|
||||
- **Containers**:
|
||||
- deafgain-website-web-1 (port 804)
|
||||
- deafgain-website-api-1 (port 3000)
|
||||
- deafgain-website-redis-1
|
||||
|
||||
#### Deployment Process
|
||||
```bash
|
||||
# On production server
|
||||
cd /docker/websites/deafgain/
|
||||
git pull
|
||||
docker-compose up --build -d
|
||||
docker-compose logs -f # Monitor logs
|
||||
```
|
||||
|
||||
### Common Tasks Reference
|
||||
|
||||
#### View Recent Changes
|
||||
```bash
|
||||
git log --oneline --graph --all -15
|
||||
```
|
||||
|
||||
#### See What Files Changed in Last Commit
|
||||
```bash
|
||||
git show --stat HEAD
|
||||
```
|
||||
|
||||
#### See Full Changes in Last Commit
|
||||
```bash
|
||||
git show HEAD
|
||||
```
|
||||
|
||||
#### Compare Two Commits
|
||||
```bash
|
||||
git diff abc123 def456
|
||||
```
|
||||
|
||||
#### Search Commit History
|
||||
```bash
|
||||
# Find commits by message
|
||||
git log --grep="map"
|
||||
|
||||
# Find commits that changed a specific file
|
||||
git log -- src/pages/Services.tsx
|
||||
|
||||
# Find commits by author
|
||||
git log --author="eliza"
|
||||
```
|
||||
|
||||
#### Undo Last Commit (Keep Changes)
|
||||
```bash
|
||||
git reset --soft HEAD~1
|
||||
```
|
||||
|
||||
#### Discard All Local Changes
|
||||
```bash
|
||||
git reset --hard HEAD
|
||||
git clean -fd
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Commit Messages
|
||||
- Use descriptive, clear messages
|
||||
- Start with a verb (Add, Update, Fix, Remove)
|
||||
- Be specific about what changed
|
||||
- Examples:
|
||||
- ✅ "Add RID conference to Missoula MT on interactive map"
|
||||
- ✅ "Fix email SMTP configuration and update app password"
|
||||
- ❌ "Updates"
|
||||
- ❌ "Fixed stuff"
|
||||
|
||||
### Before Making Changes
|
||||
1. Always `git pull` first
|
||||
2. Check current status with `git status`
|
||||
3. Review what you're about to commit with `git diff`
|
||||
|
||||
### After Making Changes
|
||||
1. Test locally if possible
|
||||
2. Review changes with `git status` and `git diff`
|
||||
3. Commit with clear message
|
||||
4. Push to remote
|
||||
5. Verify on production if critical
|
||||
|
||||
### Working with Production
|
||||
- Test changes locally before pushing
|
||||
- Be cautious with Docker configuration changes
|
||||
- Monitor logs after deployment
|
||||
- Keep `.env` file secure (never commit)
|
||||
|
||||
## Security Notes
|
||||
|
||||
- **Never commit `.env` file** - contains sensitive credentials
|
||||
- **Keep access token secure** - treat like a password
|
||||
- **Regenerate token if exposed** - create new one immediately
|
||||
- **Use app-specific passwords** - for Gmail integration
|
||||
- **Review changes before pushing** - especially configuration files
|
||||
|
||||
## Quick Reference Commands
|
||||
|
||||
| Task | Command |
|
||||
|------|---------|
|
||||
| Pull latest changes | `git pull` |
|
||||
| Check status | `git status` |
|
||||
| View recent commits | `git log --oneline -15` |
|
||||
| View last commit | `git show HEAD` |
|
||||
| Stage all changes | `git add .` |
|
||||
| Commit changes | `git commit -m "message"` |
|
||||
| Push to remote | `git push` |
|
||||
| Undo last commit (keep changes) | `git reset --soft HEAD~1` |
|
||||
| Discard local changes | `git reset --hard HEAD` |
|
||||
| View file history | `git log -- path/to/file` |
|
||||
| Search commits | `git log --grep="keyword"` |
|
||||
|
||||
## Useful Git Aliases
|
||||
|
||||
Add these to your `.gitconfig` for shortcuts:
|
||||
```bash
|
||||
git config --global alias.st status
|
||||
git config --global alias.co checkout
|
||||
git config --global alias.br branch
|
||||
git config --global alias.ci commit
|
||||
git config --global alias.lg "log --oneline --graph --all"
|
||||
git config --global alias.last "show HEAD"
|
||||
```
|
||||
|
||||
Then use:
|
||||
- `git st` instead of `git status`
|
||||
- `git lg` instead of `git log --oneline --graph --all`
|
||||
- `git last` instead of `git show HEAD`
|
||||
373
cline_docs/memoryBank.md
Normal file
373
cline_docs/memoryBank.md
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
# 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.206
|
||||
- **SSH User**: `chaulmark`
|
||||
- **Project Path**: `/docker/websites/deafgain/`
|
||||
- **Purpose**: Deploy Docker containers on production server
|
||||
|
||||
### 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** (SSH as chaulmark):
|
||||
```bash
|
||||
ssh chaulmark@10.4.0.206 "cd /docker/websites/deafgain/ && git pull && docker-compose up --build -d"
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
### Production Deployment (I Execute via SSH)
|
||||
```bash
|
||||
# SSH into production server as chaulmark
|
||||
ssh chaulmark@10.4.0.206
|
||||
|
||||
# Navigate to project
|
||||
cd /docker/websites/deafgain/
|
||||
|
||||
# Pull latest changes
|
||||
git pull
|
||||
|
||||
# Rebuild and restart containers
|
||||
docker-compose up --build -d
|
||||
|
||||
# Monitor logs (if needed)
|
||||
docker-compose logs -f
|
||||
|
||||
# Exit SSH
|
||||
exit
|
||||
```
|
||||
|
||||
## 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)
|
||||
- 18 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: ssh chaulmark@10.4.0.206 "cd /docker/websites/deafgain/ && git pull && docker-compose up --build -d"
|
||||
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: ssh chaulmark@10.4.0.206 "cd /docker/websites/deafgain/ && git pull && docker-compose up --build -d"
|
||||
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: ssh chaulmark@10.4.0.206 "cd /docker/websites/deafgain/ && git pull && docker-compose up --build -d"
|
||||
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: ssh chaulmark@10.4.0.206 "cd /docker/websites/deafgain/ && git pull && docker-compose up --build -d"
|
||||
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
|
||||
- **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**: SSH to production, pull latest, rebuild Docker containers with `--build` flag
|
||||
|
||||
### 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, deploy
|
||||
- "Add video [Title]" → Save 4 files, edit Resources.tsx, commit, push, deploy
|
||||
- "Update [Page] content" → Edit page file, commit, push, deploy
|
||||
- "Email not working" → Diagnose, fix .env or code, commit, push, deploy
|
||||
- "Fix [problem]" → Diagnose, fix code, test locally, commit, push, deploy
|
||||
|
||||
### 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 SSH
|
||||
- ✅ 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
|
||||
Loading…
Add table
Reference in a new issue