Initial commit for boilerplate website
This commit is contained in:
commit
42b9d1b162
11 changed files with 2024 additions and 0 deletions
38
.gitignore
vendored
Normal file
38
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Dependencies
|
||||
node_modules
|
||||
.pnp
|
||||
.pnp.js
|
||||
|
||||
# Next.js build output
|
||||
.next/
|
||||
out/
|
||||
|
||||
# Production build
|
||||
build
|
||||
dist
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Debug logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# IDE files
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Docker volumes
|
||||
mongodb-data
|
||||
redis-data
|
||||
76
TECH_STACK
Normal file
76
TECH_STACK
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
## Tech Stack
|
||||
|
||||
### Frontend
|
||||
- React 19
|
||||
- TypeScript 5.7
|
||||
- React Router DOM 7
|
||||
- Tailwind CSS 3.4
|
||||
- Framer Motion 11
|
||||
- React Icons 5.4
|
||||
- React Simple Maps 4.0 (beta)
|
||||
- React Intersection Observer 9.13
|
||||
- Next.js 14.1
|
||||
|
||||
### Backend
|
||||
- Node.js with Express 4.21
|
||||
- TypeScript
|
||||
- Nodemailer 6.9 for email handling
|
||||
- CORS for cross-origin resource sharing
|
||||
- dotenv 16.4 for environment variable management
|
||||
- Upstash Redis 1.28 for caching/rate limiting
|
||||
|
||||
### Development & Build Tools
|
||||
- Docker & Docker Compose
|
||||
- PostCSS 8.4
|
||||
- Autoprefixer 10.4
|
||||
- pnpm 9.14 (package manager)
|
||||
- Vite 6.0
|
||||
- ESLint 9
|
||||
- Concurrently for running multiple processes
|
||||
- tsx/ts-node for TypeScript execution
|
||||
- Hot module replacement (HMR)
|
||||
|
||||
### Production
|
||||
- Nginx (Production server for frontend)
|
||||
- Node.js server for backend API
|
||||
|
||||
### Architecture
|
||||
- Frontend running on port 3000 (development)
|
||||
- Backend API running on port 4000
|
||||
- Containerized development and production environments
|
||||
- REST API for contact form handling
|
||||
- Gmail SMTP for email delivery
|
||||
- Rate limiting implementation
|
||||
- Context-based state management
|
||||
- Redis-backed caching layer
|
||||
|
||||
### Key Features
|
||||
- Responsive design
|
||||
- Animated UI components with Framer Motion
|
||||
- Interactive USA region map
|
||||
- Contact form with email notifications
|
||||
- Timeline visualization
|
||||
- Service showcase
|
||||
- Biography section
|
||||
- Testimonials section
|
||||
- Video playback with WebVTT subtitles
|
||||
- Transcription support
|
||||
- Toast notification system
|
||||
- Snow peaks animation effect
|
||||
- Custom video player component
|
||||
|
||||
### Development Environment
|
||||
- Multi-container setup with Docker Compose
|
||||
- Hot-reloading enabled
|
||||
- Separate development and production builds
|
||||
- Environment variable management for sensitive data
|
||||
- TypeScript configuration for both client and server
|
||||
- Concurrent development server (frontend + backend)
|
||||
|
||||
### Production Environment
|
||||
- Nginx serving static frontend files
|
||||
- Node.js backend API
|
||||
- Containerized deployment
|
||||
- Secure email handling with Google App credentials
|
||||
- Multi-stage Docker builds
|
||||
- Production-optimized builds with tree-shaking
|
||||
274
TO_DO.txt
Normal file
274
TO_DO.txt
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
# Olathe Club of the Deaf (OCD) Website Development Plan
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### Frontend (Next.js + React)
|
||||
- Server-side rendered pages for better SEO and performance
|
||||
- TypeScript for type safety
|
||||
- Tailwind CSS for responsive design
|
||||
- Framer Motion for animations and transitions
|
||||
- React Context for state management
|
||||
- Protected admin dashboard
|
||||
|
||||
### Backend (Node.js + Express)
|
||||
- REST API endpoints for data operations
|
||||
- Simple authentication for admin access
|
||||
- Email handling with Nodemailer
|
||||
- Rate limiting with Upstash Redis
|
||||
- Environment variable management with dotenv
|
||||
- Comprehensive logging system for external analytics
|
||||
|
||||
### Database
|
||||
- MongoDB for document storage (board members, events, minutes, bylaws, members)
|
||||
- Redis for caching and session management
|
||||
|
||||
### Deployment
|
||||
- Docker containerization with Portainer for deployment
|
||||
- Nginx as reverse proxy
|
||||
- GitHub repository integration
|
||||
|
||||
## Core Features & Components
|
||||
|
||||
### 1. Public-Facing Pages
|
||||
- [ ] Home Page
|
||||
- [ ] Hero section with mission statement
|
||||
- [ ] Featured upcoming events
|
||||
- [ ] News/announcements section
|
||||
- [ ] Sponsor showcase
|
||||
- [ ] Quick links to important pages
|
||||
|
||||
- [ ] About OCD Section
|
||||
- [ ] Organization history and mission
|
||||
- [ ] Meet the Board page with photos and bios
|
||||
- [ ] Bylaws page with downloadable PDF
|
||||
- [ ] Minutes archive with search/filter functionality
|
||||
|
||||
- [ ] Calendar/Events
|
||||
- [ ] Interactive calendar view
|
||||
- [ ] List view of upcoming events
|
||||
- [ ] Event detail pages
|
||||
- [ ] Filter by event type (social, athletic, etc.)
|
||||
|
||||
- [ ] Membership
|
||||
- [ ] Membership benefits information
|
||||
- [ ] Online application form (non-payment)
|
||||
- [ ] Information about dues and payment methods
|
||||
|
||||
- [ ] Contact
|
||||
- [ ] Contact form with validation
|
||||
- [ ] Map to OCD location
|
||||
- [ ] Email notification system
|
||||
- [ ] Social media links
|
||||
|
||||
- [ ] Donation Integration
|
||||
- [ ] Zeffy donation widget embedding
|
||||
- [ ] Donation information page
|
||||
|
||||
### 2. Admin Dashboard
|
||||
- [ ] Authentication System
|
||||
- [ ] Single admin login/logout functionality
|
||||
- [ ] Password reset functionality
|
||||
- [ ] Secure session management
|
||||
|
||||
- [ ] WYSIWYG Content Editor
|
||||
- [ ] Page content management
|
||||
- [ ] Rich text editing capabilities
|
||||
- [ ] Image upload and management
|
||||
- [ ] Version history
|
||||
|
||||
- [ ] Event Management
|
||||
- [ ] Create/edit/delete events
|
||||
- [ ] Recurring event setup
|
||||
- [ ] Event categories management
|
||||
- [ ] Calendar visualization
|
||||
|
||||
- [ ] Member Management
|
||||
- [ ] Member directory
|
||||
- [ ] Email list generation for newsletters
|
||||
- [ ] Basic member information storage
|
||||
- [ ] Membership status tracking
|
||||
- [ ] Membership expiration notifications
|
||||
- [ ] Automated alerts for upcoming expirations
|
||||
- [ ] Expired membership notifications to board
|
||||
|
||||
- [ ] Document Repository
|
||||
- [ ] Upload/manage meeting minutes
|
||||
- [ ] Bylaws document management
|
||||
- [ ] File categorization and search
|
||||
|
||||
- [ ] ASL Video Management
|
||||
- [ ] Video upload functionality
|
||||
- [ ] VTT subtitle file association
|
||||
- [ ] Transcription display options
|
||||
- [ ] Custom video player implementation (based on shared codebase)
|
||||
|
||||
### 3. Technical Implementation
|
||||
|
||||
- [ ] Database Schema Design
|
||||
- [ ] Admin user model (single user)
|
||||
- [ ] Member model (with expiration dates)
|
||||
- [ ] Event model
|
||||
- [ ] Page content model
|
||||
- [ ] Minutes/document model
|
||||
- [ ] Video/transcription model
|
||||
|
||||
- [ ] API Endpoints
|
||||
- [ ] Authentication routes
|
||||
- [ ] Content management routes
|
||||
- [ ] Event CRUD operations
|
||||
- [ ] Member management
|
||||
- [ ] Contact form submission
|
||||
- [ ] Document upload/retrieval
|
||||
- [ ] Video and subtitle management
|
||||
- [ ] Membership expiration handling
|
||||
|
||||
- [ ] Frontend Components
|
||||
- [ ] Responsive navigation
|
||||
- [ ] Calendar component
|
||||
- [ ] Contact form
|
||||
- [ ] WYSIWYG editor
|
||||
- [ ] File uploader
|
||||
- [ ] Admin dashboard layout
|
||||
- [ ] Authentication forms
|
||||
- [ ] Custom video player with subtitle support
|
||||
|
||||
- [ ] Integrations
|
||||
- [ ] Zeffy donation widget
|
||||
- [ ] Email service (system@olathedeafclub.com)
|
||||
- [ ] Google Maps for location
|
||||
- [ ] Social media sharing
|
||||
|
||||
- [ ] Logging & Analytics
|
||||
- [ ] Comprehensive request logging
|
||||
- [ ] User action tracking
|
||||
- [ ] Error logging
|
||||
- [ ] Performance metrics
|
||||
- [ ] Structured log format for external analysis
|
||||
|
||||
## Development Phases
|
||||
|
||||
### Phase 1: Setup & Infrastructure
|
||||
- [ ] Initialize Next.js project with TypeScript
|
||||
- [ ] Set up Express backend
|
||||
- [ ] Configure Docker development environment
|
||||
- [ ] Establish database connections
|
||||
- [ ] Create basic project structure
|
||||
- [ ] Set up admin authentication system
|
||||
- [ ] Implement logging infrastructure
|
||||
|
||||
### Phase 2: Core Public Pages
|
||||
- [ ] Develop home page layout and components
|
||||
- [ ] Build About section pages
|
||||
- [ ] Implement calendar functionality
|
||||
- [ ] Create membership information pages
|
||||
- [ ] Develop contact form with validation
|
||||
- [ ] Implement Zeffy donation integration
|
||||
- [ ] Implement SEO optimization
|
||||
|
||||
### Phase 3: Admin Functionality
|
||||
- [ ] Build admin dashboard UI
|
||||
- [ ] Implement WYSIWYG editor
|
||||
- [ ] Create event management system
|
||||
- [ ] Develop document repository
|
||||
- [ ] Build member management features
|
||||
- [ ] Implement membership expiration notification system
|
||||
- [ ] Implement ASL video management system
|
||||
|
||||
### Phase 4: Accessibility & Refinement
|
||||
- [ ] Implement comprehensive accessibility features
|
||||
- [ ] Set up email notifications
|
||||
- [ ] Implement social sharing
|
||||
- [ ] Optimize for performance
|
||||
- [ ] Test with screen readers and assistive technologies
|
||||
|
||||
### Phase 5: Testing & Deployment
|
||||
- [ ] Conduct user testing
|
||||
- [ ] Fix bugs and refine UI/UX
|
||||
- [ ] Set up production Docker environment
|
||||
- [ ] Configure Nginx and SSL
|
||||
- [ ] Deploy to production server with Portainer
|
||||
- [ ] Set up monitoring and analytics
|
||||
|
||||
## SEO Optimization
|
||||
- [ ] Implement Next.js metadata API for dynamic meta tags
|
||||
- [ ] Create XML sitemap generation
|
||||
- [ ] Implement structured data (JSON-LD) for events and organization
|
||||
- [ ] Optimize image alt text and file names
|
||||
- [ ] Implement canonical URLs
|
||||
- [ ] Create SEO-friendly URL structure
|
||||
- [ ] Implement Open Graph and Twitter card metadata
|
||||
- [ ] Ensure proper heading hierarchy
|
||||
- [ ] Implement server-side rendering for critical pages
|
||||
- [ ] Create robots.txt file
|
||||
- [ ] Implement breadcrumb navigation
|
||||
|
||||
## Membership Management
|
||||
- [ ] Member registration system (admin-managed)
|
||||
- [ ] Membership expiration tracking
|
||||
- [ ] Automated email notifications for:
|
||||
- [ ] Upcoming membership expirations (30 days prior)
|
||||
- [ ] Expired memberships (day of expiration)
|
||||
- [ ] Notification to board about expired members
|
||||
- [ ] Membership status indicators in admin dashboard
|
||||
- [ ] Exportable member list for meeting attendance verification
|
||||
- [ ] Email list generation for newsletter distribution
|
||||
- [ ] Member search and filtering capabilities
|
||||
- [ ] Membership statistics and reporting
|
||||
|
||||
## Accessibility Considerations
|
||||
- [ ] Ensure WCAG 2.1 AA compliance
|
||||
- [ ] Implement proper semantic HTML
|
||||
- [ ] Add appropriate ARIA attributes
|
||||
- [ ] Test with screen readers
|
||||
- [ ] Provide captions/transcripts for all video content
|
||||
- [ ] Ensure keyboard navigation
|
||||
- [ ] Maintain sufficient color contrast
|
||||
- [ ] Specific focus on DeafBlind/Blind user accessibility
|
||||
- [ ] Text resizing without breaking layout
|
||||
- [ ] Screen magnifier compatibility
|
||||
|
||||
## Video and Transcription Features
|
||||
- [ ] Custom video player implementation based on existing codebase:
|
||||
- [ ] Play/pause toggle with visual indicators
|
||||
- [ ] Progress bar with clickable position seeking
|
||||
- [ ] Forward/backward 5-second skip controls
|
||||
- [ ] Fullscreen toggle functionality
|
||||
- [ ] Playback rate selection (0.5x, 1x, 2x, 3x)
|
||||
- [ ] Auto-hiding controls during playback
|
||||
- [ ] Keyboard shortcuts (space for play/pause, arrow keys for seeking)
|
||||
- [ ] WebVTT subtitle integration with toggle option
|
||||
- [ ] Accessible control buttons with ARIA labels and icon titles
|
||||
- [ ] Touch-friendly controls for mobile devices
|
||||
- [ ] Enhancements to existing video player:
|
||||
- [ ] Transcript view option alongside video
|
||||
- [ ] Direct linking to specific video segments/timestamps
|
||||
- [ ] Video thumbnail generation for previews
|
||||
- [ ] Responsive container sizing for different screen sizes
|
||||
- [ ] Volume control with mute option
|
||||
- [ ] Picture-in-picture support
|
||||
- [ ] Improved subtitle styling options
|
||||
- [ ] Video quality selection if multiple sources available
|
||||
- [ ] Video management in admin dashboard:
|
||||
- [ ] Video upload with automatic processing
|
||||
- [ ] VTT subtitle file upload and association
|
||||
- [ ] Transcript generation/editing interface
|
||||
- [ ] Video metadata management (title, description, categories)
|
||||
- [ ] Video organization by categories/tags
|
||||
|
||||
## Responsive Design
|
||||
- [ ] Mobile-first approach
|
||||
- [ ] Tablet optimization
|
||||
- [ ] Desktop layouts
|
||||
- [ ] Touch-friendly interface elements
|
||||
- [ ] Flexible content containers
|
||||
- [ ] Responsive typography
|
||||
- [ ] Optimized images for different screen sizes
|
||||
|
||||
## Performance Optimization
|
||||
- [ ] Implement image optimization
|
||||
- [ ] Configure caching strategies
|
||||
- [ ] Minimize JavaScript bundles
|
||||
- [ ] Optimize CSS delivery
|
||||
- [ ] Implement lazy loading
|
||||
- [ ] Set up CDN for static assets
|
||||
- [ ] Optimize video delivery
|
||||
421
best_practices.txt
Normal file
421
best_practices.txt
Normal file
|
|
@ -0,0 +1,421 @@
|
|||
# Best Practices for OCD Website Development
|
||||
|
||||
## Accessibility (WCAG 2.1 AA Compliance)
|
||||
|
||||
### Video Accessibility (Critical for Deaf Community)
|
||||
- Implement custom video player with WebVTT support for synchronized captions
|
||||
- Include speaker identification in captions for multi-person videos
|
||||
- Provide transcript view alongside videos for DeafBlind users
|
||||
- Support variable playback speeds (0.5x, 1x, 1.5x, 2x) for ASL videos
|
||||
- Implement keyboard shortcuts for video navigation (space: play/pause, arrow keys: skip)
|
||||
- Create thumbnails for video preview with descriptive alt text
|
||||
- Support direct linking to video timestamps for sharing specific segments
|
||||
|
||||
### General Accessibility
|
||||
- Use semantic HTML elements (`<nav>`, `<main>`, `<section>`, etc.) for screen reader compatibility
|
||||
- Implement proper heading hierarchy (h1-h6) for structural navigation
|
||||
- Maintain minimum 4.5:1 color contrast ratio for all text content
|
||||
- Add skip-to-content links for keyboard navigation
|
||||
- Ensure all interactive elements are keyboard accessible
|
||||
- Include ARIA attributes where necessary (aria-label, aria-required, aria-expanded)
|
||||
- Use ARIA live regions for dynamic content updates
|
||||
- Implement focus indicators with high visibility for keyboard users
|
||||
- Test with screen readers (NVDA, JAWS, VoiceOver)
|
||||
- Provide text alternatives for all non-text content
|
||||
|
||||
### DeafBlind Specific Considerations
|
||||
- Support high contrast mode and text resizing without layout breaking
|
||||
- Ensure compatibility with screen magnifiers
|
||||
- Implement haptic feedback alternatives for notifications where possible
|
||||
- Structure content with clear hierarchical patterns for braille display users
|
||||
|
||||
## Next.js & React Architecture
|
||||
|
||||
### Server-Side Rendering Strategy
|
||||
- Use Next.js App Router for hybrid rendering approach
|
||||
- Implement SSR for SEO-critical pages (home, about, events)
|
||||
- Use Static Site Generation (SSG) with Incremental Static Regeneration (ISR) for content that changes infrequently
|
||||
- Employ Client Components only where interactivity is required
|
||||
- Keep critical above-the-fold content in Server Components for faster initial load
|
||||
|
||||
### Component Structure
|
||||
- Follow atomic design principles (atoms, molecules, organisms, templates, pages)
|
||||
- Create reusable UI components with well-defined props
|
||||
- Implement responsive design using Tailwind's responsive modifiers
|
||||
- Use CSS modules or Tailwind for component styling
|
||||
- Keep components focused on single responsibilities
|
||||
- Create clear separation between UI components and data fetching
|
||||
|
||||
### State Management
|
||||
- Use React Context for global state that doesn't change frequently
|
||||
- Implement proper form state management with validation
|
||||
- Employ NextAuth.js for authentication state
|
||||
- Use SWR or React Query for data fetching, caching and revalidation
|
||||
- Minimize props drilling with context providers
|
||||
|
||||
## TypeScript Best Practices
|
||||
|
||||
### Type Definitions
|
||||
- Create comprehensive interfaces for all data models
|
||||
- Use union types for state management
|
||||
- Implement strict type checking with tsconfig
|
||||
- Create reusable utility types for common patterns
|
||||
- Define proper return types for all functions
|
||||
- Use generics for reusable components
|
||||
|
||||
### Error Handling
|
||||
- Implement typed error handling
|
||||
- Create custom error classes for different error scenarios
|
||||
- Use discriminated unions for error states
|
||||
- Implement graceful degradation for components on error
|
||||
|
||||
## Backend & API Design
|
||||
|
||||
### Express API Structure
|
||||
- Organize routes by domain/resource
|
||||
- Implement proper middleware for authentication, logging, etc.
|
||||
- Use controller pattern to separate route handlers from business logic
|
||||
- Implement comprehensive error handling middleware
|
||||
- Add request validation using middleware
|
||||
|
||||
### Database Patterns
|
||||
- Design MongoDB schemas with proper indexing
|
||||
- Implement data validation at the schema level
|
||||
- Use aggregation pipeline for complex queries
|
||||
- Implement soft delete pattern when appropriate
|
||||
- Create clear separation between data access and business logic
|
||||
|
||||
### Caching Strategy with Redis
|
||||
- Implement cache-aside pattern for frequently accessed data:
|
||||
```typescript
|
||||
async function getEventData(id: string) {
|
||||
const cacheKey = `event:${id}`;
|
||||
const cachedData = await redis.get(cacheKey);
|
||||
|
||||
if (cachedData) {
|
||||
return JSON.parse(cachedData);
|
||||
}
|
||||
|
||||
const eventData = await db.collection('events').findOne({ _id: id });
|
||||
|
||||
// Cache for 1 hour
|
||||
await redis.set(cacheKey, JSON.stringify(eventData), { EX: 3600 });
|
||||
|
||||
return eventData;
|
||||
}
|
||||
```
|
||||
- Use Redis for session management
|
||||
- Implement Redis pub/sub for real-time notifications
|
||||
- Add cache invalidation on data updates
|
||||
- Use Redis sorted sets for time-based content (upcoming events)
|
||||
- Implement rate limiting with Redis for API protection
|
||||
|
||||
## Docker & Deployment
|
||||
|
||||
### Container Strategy
|
||||
- Create multi-stage Docker builds for smaller production images
|
||||
- Separate containers for frontend, backend, and databases
|
||||
- Use Docker Compose for local development
|
||||
- Implement health checks for containers
|
||||
- Use environment variables for configuration
|
||||
- Create separate development and production Docker configurations
|
||||
|
||||
### CI/CD Pipeline
|
||||
- Implement automated testing in CI pipeline
|
||||
- Add accessibility testing with tools like axe-core
|
||||
- Perform Docker image security scanning
|
||||
- Implement progressive deployment strategy
|
||||
- Add automated rollback on deployment failure
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Frontend Performance
|
||||
- Implement code splitting with dynamic imports
|
||||
- Optimize images with next/image
|
||||
- Lazy load non-critical components
|
||||
- Implement resource prioritization
|
||||
- Use web fonts with proper fallback strategy
|
||||
- Minimize JavaScript bundle size with tree shaking
|
||||
- Implement responsive images for different screen sizes
|
||||
|
||||
### Backend Performance
|
||||
- Implement connection pooling for database connections
|
||||
- Use Redis for caching frequently accessed data
|
||||
- Implement proper indexing strategy for MongoDB
|
||||
- Use streaming for large data responses
|
||||
- Implement pagination for list endpoints
|
||||
- Optimize query patterns to minimize database load
|
||||
|
||||
## Security Considerations
|
||||
|
||||
### Authentication & Authorization
|
||||
- Implement proper password hashing with bcrypt
|
||||
- Use JWTs with appropriate expiration
|
||||
- Store sensitive data in environment variables
|
||||
- Implement proper CORS configuration
|
||||
- Add rate limiting for authentication endpoints
|
||||
- Use secure HTTP-only cookies for session management
|
||||
|
||||
### Data Protection
|
||||
- Validate all input data on server
|
||||
- Implement output encoding to prevent XSS
|
||||
- Use prepared statements/ODM to prevent injection
|
||||
- Implement CSRF protection
|
||||
- Add security headers (Content-Security-Policy, X-Frame-Options, etc.)
|
||||
- Regularly update dependencies for security patches
|
||||
|
||||
## Testing Strategy
|
||||
|
||||
### Automated Testing
|
||||
- Implement unit tests for business logic and utilities
|
||||
- Add integration tests for API endpoints
|
||||
- Create component tests for UI components
|
||||
- Implement end-to-end tests for critical user flows
|
||||
- Add accessibility tests with axe-core
|
||||
|
||||
### Manual Testing
|
||||
- Test with screen readers for accessibility
|
||||
- Verify keyboard navigation works properly
|
||||
- Test with different screen sizes for responsive design
|
||||
- Perform usability testing with deaf and DeafBlind users
|
||||
- Verify VTT caption synchronization
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Code Quality
|
||||
- Use ESLint with accessibility rules
|
||||
- Implement Prettier for code formatting
|
||||
- Add TypeScript strict checking
|
||||
- Create clear PR templates with accessibility checklist
|
||||
- Implement pre-commit hooks for linting and formatting
|
||||
|
||||
### Documentation
|
||||
- Document all components with JSDoc
|
||||
- Create API documentation with Swagger/OpenAPI
|
||||
- Add README files for different parts of the application
|
||||
- Document accessibility features and implementation
|
||||
- Create developer onboarding documentation
|
||||
|
||||
## Custom Video Player Implementation
|
||||
|
||||
### Features
|
||||
```tsx
|
||||
// Example of accessible video player component
|
||||
const VideoPlayer = ({ src, captionsSrc, title, description }) => {
|
||||
return (
|
||||
<div className="video-container">
|
||||
<h2 id="videoTitle">{title}</h2>
|
||||
<p id="videoDescription">{description}</p>
|
||||
|
||||
<div className="video-wrapper">
|
||||
<video
|
||||
controls
|
||||
aria-labelledby="videoTitle"
|
||||
aria-describedby="videoDescription"
|
||||
>
|
||||
<source src={src} type="video/mp4" />
|
||||
<track
|
||||
kind="captions"
|
||||
src={captionsSrc}
|
||||
label="English"
|
||||
default
|
||||
/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
<div className="custom-controls">
|
||||
<button
|
||||
aria-label="Play video"
|
||||
className="play-button"
|
||||
onClick={togglePlayPause}
|
||||
>
|
||||
{isPlaying ? "Pause" : "Play"}
|
||||
</button>
|
||||
|
||||
<div className="progress-container">
|
||||
<div
|
||||
className="progress-bar"
|
||||
style={{ width: `${progress}%` }}
|
||||
role="progressbar"
|
||||
aria-valuenow={progress}
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
aria-label="Toggle captions"
|
||||
className="captions-button"
|
||||
onClick={toggleCaptions}
|
||||
>
|
||||
{captionsEnabled ? "Captions On" : "Captions Off"}
|
||||
</button>
|
||||
|
||||
<select
|
||||
aria-label="Playback speed"
|
||||
onChange={changePlaybackRate}
|
||||
value={playbackRate}
|
||||
>
|
||||
<option value="0.5">0.5x</option>
|
||||
<option value="1">1x</option>
|
||||
<option value="1.5">1.5x</option>
|
||||
<option value="2">2x</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Transcript display */}
|
||||
<div className="transcript-container">
|
||||
<h3>Transcript</h3>
|
||||
<div>{transcript}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
### WebVTT Implementation
|
||||
- Use standard WebVTT format with timestamps
|
||||
- Include speaker identification in captions
|
||||
- Support styling and positioning of captions
|
||||
- Implement transcript view from WebVTT content
|
||||
- Allow toggling between different caption tracks
|
||||
|
||||
## Form Accessibility
|
||||
|
||||
### Contact Form Example
|
||||
```tsx
|
||||
// Example of accessible form implementation
|
||||
const ContactForm = () => {
|
||||
const [formData, setFormData] = useState({
|
||||
name: '',
|
||||
email: '',
|
||||
message: ''
|
||||
});
|
||||
const [errors, setErrors] = useState({});
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const [submitStatus, setSubmitStatus] = useState(null);
|
||||
|
||||
// Implementation details omitted for brevity
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit} noValidate>
|
||||
<div className="form-group">
|
||||
<label htmlFor="name" className="required">Name</label>
|
||||
<input
|
||||
id="name"
|
||||
type="text"
|
||||
name="name"
|
||||
value={formData.name}
|
||||
onChange={handleChange}
|
||||
aria-required="true"
|
||||
aria-invalid={!!errors.name}
|
||||
aria-describedby={errors.name ? "name-error" : undefined}
|
||||
/>
|
||||
{errors.name && (
|
||||
<div id="name-error" className="error" role="alert">
|
||||
{errors.name}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Similar pattern for email and message fields */}
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={isSubmitting}
|
||||
aria-busy={isSubmitting}
|
||||
>
|
||||
{isSubmitting ? 'Submitting...' : 'Send Message'}
|
||||
</button>
|
||||
|
||||
{submitStatus && (
|
||||
<div
|
||||
className={`submit-status ${submitStatus.type}`}
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
>
|
||||
{submitStatus.message}
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
## SEO Optimization
|
||||
|
||||
### Next.js Metadata API
|
||||
```tsx
|
||||
// Example of Next.js 14.1 metadata implementation
|
||||
export const metadata = {
|
||||
title: 'Events | Olathe Club of the Deaf',
|
||||
description: 'Upcoming events hosted by the Olathe Club of the Deaf',
|
||||
openGraph: {
|
||||
title: 'Events | Olathe Club of the Deaf',
|
||||
description: 'Upcoming events hosted by the Olathe Club of the Deaf',
|
||||
images: [
|
||||
{
|
||||
url: '/images/events-banner.jpg',
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: 'Calendar of OCD events',
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: 'Events | Olathe Club of the Deaf',
|
||||
description: 'Upcoming events hosted by the Olathe Club of the Deaf',
|
||||
images: ['/images/events-banner.jpg'],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### Structured Data
|
||||
- Implement structured data for events (JSON-LD)
|
||||
- Add organization schema for OCD
|
||||
- Include breadcrumb structured data
|
||||
- Add FAQ schema where appropriate
|
||||
|
||||
## Responsive Design
|
||||
|
||||
### Mobile-First Approach
|
||||
- Design for mobile devices first
|
||||
- Use Tailwind's responsive breakpoints
|
||||
- Implement responsive typography
|
||||
- Ensure touch targets are at least 44px × 44px
|
||||
- Test on various device sizes
|
||||
- Optimize images for different screen sizes
|
||||
- Ensure forms are usable on mobile devices
|
||||
|
||||
## Error Handling & Fallbacks
|
||||
|
||||
### Graceful Degradation
|
||||
- Implement error boundaries for React components
|
||||
- Add fallback UI for failed components
|
||||
- Create custom 404 and 500 pages
|
||||
- Implement retry logic for failed API requests
|
||||
- Add offline support where possible
|
||||
- Log errors for monitoring and debugging
|
||||
|
||||
## Monitoring & Analytics
|
||||
|
||||
### Performance Monitoring
|
||||
- Implement Core Web Vitals tracking
|
||||
- Add server-side logging for API performance
|
||||
- Track client-side performance metrics
|
||||
- Monitor Redis cache hit/miss ratio
|
||||
- Implement error tracking and alerting
|
||||
|
||||
## Documentation Resources
|
||||
|
||||
- [WCAG 2.1 AA Requirements](https://www.w3.org/TR/WCAG21/)
|
||||
- [Next.js Accessibility Guide](https://nextjs.org/docs/app/building-your-application/accessibility)
|
||||
- [Redis Caching Patterns](https://redis.io/learn/howtos/solutions/caching-architecture/)
|
||||
- [Tailwind CSS Accessibility](https://tailwindcss.com/docs/screen-readers)
|
||||
- [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
|
||||
- [Express.js Best Practices](https://expressjs.com/en/advanced/best-practice-performance.html)
|
||||
- [MongoDB Performance Best Practices](https://www.mongodb.com/developer/products/mongodb/performance-best-practices/)
|
||||
- [Docker Compose Specification](https://docs.docker.com/compose/compose-file/)
|
||||
- [Web Content Accessibility Guidelines (WCAG) 2.1](https://www.w3.org/TR/WCAG21/)
|
||||
27
cline_docs/activeContext.md
Normal file
27
cline_docs/activeContext.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Active Context: OCD Website Implementation Planning
|
||||
|
||||
## What I'm Working On Now
|
||||
- Created a comprehensive best practices guide for developing the OCD website, focusing on accessibility for deaf and DeafBlind users
|
||||
|
||||
## Recent Changes
|
||||
- Successfully installed and configured the Perplexity MCP server
|
||||
- Created planned_implementation.txt with detailed development roadmap
|
||||
- Set up Memory Bank documentation to maintain project context
|
||||
- Used Perplexity MCP to generate best practices for the tech stack
|
||||
- Created best_practices.txt with detailed development guidelines
|
||||
|
||||
## Next Steps
|
||||
1. Begin implementation of Phase 1: Project Setup & Infrastructure
|
||||
- Initialize Next.js project with TypeScript
|
||||
- Set up project directory structure
|
||||
- Configure development environment with Docker
|
||||
- Establish database connections
|
||||
2. Develop core public-facing pages
|
||||
3. Implement membership and event management systems
|
||||
4. Focus on accessibility features for deaf and DeafBlind users
|
||||
|
||||
## Special Considerations
|
||||
- Maintain WCAG 2.1 AA compliance throughout development
|
||||
- Implement accessible custom video player with WebVTT support
|
||||
- Ensure responsive design works across all device sizes
|
||||
- Follow server-side rendering best practices for SEO and performance
|
||||
32
cline_docs/productContext.md
Normal file
32
cline_docs/productContext.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Product Context: Olathe Club of the Deaf (OCD) Website
|
||||
|
||||
## Why This Project Exists
|
||||
The Olathe Club of the Deaf (OCD) website is being developed to provide an accessible online presence for the deaf community in Olathe. This website serves as an information hub, community portal, and administrative tool for the organization.
|
||||
|
||||
## Problems It Solves
|
||||
1. **Information Accessibility**: Provides easy access to club information, events, and resources for deaf community members
|
||||
2. **Community Engagement**: Facilitates event announcements, membership management, and community interaction
|
||||
3. **Administrative Efficiency**: Streamlines club operations including membership tracking, event management, and document storage
|
||||
4. **Accessibility**: Ensures deaf and DeafBlind users have equitable access to club information with ASL videos, captions, and screen reader compatibility
|
||||
|
||||
## How It Should Work
|
||||
The website functions as both a public-facing portal and an administrative tool:
|
||||
|
||||
### For Public Users
|
||||
- Access information about OCD, its mission, and leadership
|
||||
- View upcoming events and calendar
|
||||
- Learn about membership benefits and application process
|
||||
- Contact the organization
|
||||
- Access documents like bylaws and meeting minutes
|
||||
- View ASL videos with captions/transcripts
|
||||
- Make donations through Zeffy integration
|
||||
|
||||
### For Administrators
|
||||
- Manage website content through a protected dashboard
|
||||
- Update event information and calendar
|
||||
- Track membership status, expirations, and contact info
|
||||
- Upload and manage documents
|
||||
- Upload and manage ASL videos with transcripts
|
||||
- Receive automated notifications about membership expirations
|
||||
|
||||
The system prioritizes accessibility, focusing on the specific needs of deaf, hard-of-hearing, and DeafBlind users while maintaining high standards for responsiveness and performance.
|
||||
33
cline_docs/progress.md
Normal file
33
cline_docs/progress.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Project Progress: OCD Website
|
||||
|
||||
## What Works
|
||||
Currently, the project appears to be in the planning phase. No implementation has been completed yet.
|
||||
|
||||
## What's Left to Build
|
||||
The entire project is still pending implementation. Key features that need to be built include:
|
||||
|
||||
1. Public-facing pages (Home, About, Calendar, Membership, Contact)
|
||||
2. Admin dashboard with authentication
|
||||
3. Event management system
|
||||
4. Membership tracking and notification system
|
||||
5. Document repository
|
||||
6. ASL video management with custom player
|
||||
7. Responsive design implementation
|
||||
8. Database schema and API endpoints
|
||||
9. Zeffy donation integration
|
||||
10. Email notification system
|
||||
|
||||
For a detailed breakdown of specific tasks, refer to TO_DO.txt.
|
||||
|
||||
## Progress Status
|
||||
- **Current Phase**: Pre-development planning
|
||||
- **Tasks Completed**:
|
||||
- Initial requirements gathering
|
||||
- Technology stack definition
|
||||
- Setup of Perplexity MCP server for research assistance
|
||||
- Creation of comprehensive best practices documentation
|
||||
- **Tasks In Progress**: Finalizing development approach based on best practices
|
||||
- **Next Tasks**: Setup development environment, initialize Next.js project, establish database connections
|
||||
|
||||
## Current Task
|
||||
Using the best practices documentation to guide the initial project setup and infrastructure. The best_practices.txt file provides detailed guidance on accessibility implementation, architecture patterns, component structure, and development workflow, with specific focus on the needs of deaf and DeafBlind users.
|
||||
42
cline_docs/systemPatterns.md
Normal file
42
cline_docs/systemPatterns.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# System Patterns: OCD Website
|
||||
|
||||
## How the System is Built
|
||||
|
||||
### Architecture
|
||||
- **Frontend**: Next.js with React for server-side rendered pages
|
||||
- **Backend**: Node.js with Express for API endpoints
|
||||
- **Database Layer**: MongoDB for document storage, Redis for caching
|
||||
- **Containerization**: Docker with Portainer for deployment
|
||||
- **Web Server**: Nginx as reverse proxy
|
||||
|
||||
### Directory Structure
|
||||
The project appears to be in initial planning stages. A full directory structure will be established as development progresses.
|
||||
|
||||
## Key Technical Decisions
|
||||
- Server-side rendering with Next.js for improved SEO and performance
|
||||
- TypeScript for type safety throughout the stack
|
||||
- Tailwind CSS for responsive design
|
||||
- MongoDB for flexible document storage of club data
|
||||
- Redis for caching and rate limiting
|
||||
- Docker containerization for consistent deployment
|
||||
- Custom video player implementation for ASL content
|
||||
|
||||
## Architecture Patterns
|
||||
- REST API for data operations
|
||||
- Context-based state management in React
|
||||
- Server-side rendering for critical pages
|
||||
- Responsive design with mobile-first approach
|
||||
- Component-based UI architecture
|
||||
- Authentication for admin dashboard
|
||||
- Automated notifications for membership status
|
||||
- Accessibility-first development approach
|
||||
|
||||
## Development Workflow
|
||||
Development is organized into phases:
|
||||
1. Setup & Infrastructure
|
||||
2. Core Public Pages
|
||||
3. Admin Functionality
|
||||
4. Accessibility & Refinement
|
||||
5. Testing & Deployment
|
||||
|
||||
Each phase has specific tasks and goals as outlined in the TO_DO.txt document.
|
||||
58
cline_docs/techContext.md
Normal file
58
cline_docs/techContext.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# Tech Context: OCD Website
|
||||
|
||||
## Technologies Used
|
||||
|
||||
### Frontend
|
||||
- React 19
|
||||
- TypeScript 5.7
|
||||
- Next.js 14.1
|
||||
- Tailwind CSS 3.4
|
||||
- Framer Motion 11
|
||||
- React Router DOM 7
|
||||
- React Icons 5.4
|
||||
- React Simple Maps 4.0 (beta)
|
||||
- React Intersection Observer 9.13
|
||||
|
||||
### Backend
|
||||
- Node.js with Express 4.21
|
||||
- TypeScript
|
||||
- MongoDB for document storage
|
||||
- Redis for caching and session management
|
||||
- Nodemailer 6.9 for email handling
|
||||
- CORS for cross-origin resource sharing
|
||||
- dotenv 16.4 for environment variable management
|
||||
|
||||
### Development & Build Tools
|
||||
- Docker & Docker Compose
|
||||
- Portainer for container management
|
||||
- PostCSS 8.4
|
||||
- Autoprefixer 10.4
|
||||
- pnpm 9.14 (package manager)
|
||||
- Vite 6.0
|
||||
- ESLint 9
|
||||
- Concurrently for running multiple processes
|
||||
- tsx/ts-node for TypeScript execution
|
||||
- Hot module replacement (HMR)
|
||||
|
||||
### Production
|
||||
- Nginx (Production server for frontend)
|
||||
- Node.js server for backend API
|
||||
- SSL for secure connections
|
||||
|
||||
## Development Setup
|
||||
- Multi-container Docker setup with Docker Compose
|
||||
- Hot-reloading enabled
|
||||
- Separate development and production builds
|
||||
- Environment variable management for sensitive data
|
||||
- TypeScript configuration for both client and server
|
||||
- Concurrent development server (frontend + backend)
|
||||
|
||||
## Technical Constraints
|
||||
- Emphasis on accessibility for deaf and DeafBlind users
|
||||
- WCAG 2.1 AA compliance required
|
||||
- ASL video support with WebVTT subtitles
|
||||
- Screen reader compatibility
|
||||
- High performance requirements for video content
|
||||
- Secure admin access restrictions
|
||||
- Responsive design for all screen sizes
|
||||
- Support for membership expiration notifications
|
||||
151
how_to_use_perplexity_mcp.md
Normal file
151
how_to_use_perplexity_mcp.md
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
# How to Use the Perplexity MCP Server with Cline
|
||||
|
||||
The Perplexity MCP server you've installed provides powerful research and documentation capabilities that can assist you throughout the development of the OCD website. Here's how to leverage these tools effectively:
|
||||
|
||||
## Available Tools
|
||||
|
||||
The Perplexity MCP server provides four main tools:
|
||||
|
||||
1. **search**: Get comprehensive information on any topic
|
||||
2. **get_documentation**: Retrieve detailed documentation for technologies and libraries
|
||||
3. **find_apis**: Discover and evaluate APIs for integration
|
||||
4. **check_deprecated_code**: Analyze code for deprecated features
|
||||
|
||||
## How to Use the Tools
|
||||
|
||||
Since the MCP server is now configured and running, you can simply ask Cline to use any of these tools during your development process. Here are examples of how to use each tool:
|
||||
|
||||
### 1. Using the Search Tool
|
||||
|
||||
When you need general information or research on any topic, simply ask Cline to search for it:
|
||||
|
||||
```
|
||||
Could you search for "best practices for membership expiration notifications" using the Perplexity MCP server?
|
||||
```
|
||||
|
||||
Behind the scenes, Cline will use:
|
||||
|
||||
```
|
||||
use_mcp_tool:
|
||||
server_name: github.com/pashpashpash/perplexity-mcp
|
||||
tool_name: search
|
||||
arguments: {
|
||||
"query": "best practices for membership expiration notifications",
|
||||
"detail_level": "detailed"
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Getting Documentation
|
||||
|
||||
When implementing specific features or working with libraries, ask for detailed documentation:
|
||||
|
||||
```
|
||||
Using the Perplexity MCP server, could you get documentation about "React Server Components in Next.js 14" to help with our implementation?
|
||||
```
|
||||
|
||||
This will utilize:
|
||||
|
||||
```
|
||||
use_mcp_tool:
|
||||
server_name: github.com/pashpashpash/perplexity-mcp
|
||||
tool_name: get_documentation
|
||||
arguments: {
|
||||
"query": "React Server Components in Next.js 14",
|
||||
"context": "Implementation in a production website with SSR"
|
||||
}
|
||||
```
|
||||
|
||||
### 3. Finding APIs
|
||||
|
||||
When you need to integrate external services (like maps, payment processing, etc.):
|
||||
|
||||
```
|
||||
Could you use the Perplexity MCP server to find APIs for "video transcription services that support WebVTT"?
|
||||
```
|
||||
|
||||
Cline will execute:
|
||||
|
||||
```
|
||||
use_mcp_tool:
|
||||
server_name: github.com/pashpashpash/perplexity-mcp
|
||||
tool_name: find_apis
|
||||
arguments: {
|
||||
"requirement": "video transcription services that support WebVTT",
|
||||
"context": "For a deaf community website with accessibility requirements"
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Checking Deprecated Code
|
||||
|
||||
When refactoring or improving existing code:
|
||||
|
||||
```
|
||||
Could you check if this code has any deprecated features using the Perplexity MCP server?
|
||||
|
||||
```jsx
|
||||
class MemberCard extends React.Component {
|
||||
componentWillMount() {
|
||||
this.fetchMemberData();
|
||||
}
|
||||
// ...rest of component
|
||||
}
|
||||
```
|
||||
|
||||
This will use:
|
||||
|
||||
```
|
||||
use_mcp_tool:
|
||||
server_name: github.com/pashpashpash/perplexity-mcp
|
||||
tool_name: check_deprecated_code
|
||||
arguments: {
|
||||
"code": "class MemberCard extends React.Component {\n componentWillMount() {\n this.fetchMemberData();\n }\n // ...rest of component\n}",
|
||||
"technology": "React"
|
||||
}
|
||||
```
|
||||
|
||||
## Practical Development Scenarios
|
||||
|
||||
Here are practical ways to incorporate the Perplexity MCP server during the OCD website development:
|
||||
|
||||
### Phase 1: Project Setup & Infrastructure
|
||||
|
||||
- **Ask about setup**: "Using the Perplexity MCP server, what are the best practices for structuring a Next.js project with TypeScript and MongoDB?"
|
||||
- **Get configuration examples**: "Can you search for example Docker configurations for Next.js applications with MongoDB and Redis?"
|
||||
|
||||
### Phase 2-3: Public Pages & Event Management
|
||||
|
||||
- **Research accessibility**: "Use the Perplexity MCP server to get documentation on implementing WCAG 2.1 AA compliance in React components."
|
||||
- **Find calendar libraries**: "Could you find APIs or libraries for interactive calendars that are accessible and support event management?"
|
||||
|
||||
### Phase 4-5: Membership System & Admin Dashboard
|
||||
|
||||
- **Research notification systems**: "Search for best practices in implementing expiration notification systems using Node.js and MongoDB."
|
||||
- **API integration**: "Find APIs for email delivery services that integrate well with Node.js applications."
|
||||
|
||||
### Phase 6: Video & Accessibility Features
|
||||
|
||||
- **Video player implementation**: "Get documentation on building accessible custom video players with WebVTT support in React."
|
||||
- **Code review**: "Check if this custom video player code has any deprecated or accessibility issues."
|
||||
|
||||
### Phase 7-9: Integration, Testing & Deployment
|
||||
|
||||
- **Performance optimization**: "Find best practices for optimizing Next.js applications with server-side rendering."
|
||||
- **Deployment guidance**: "Search for secure Nginx configuration for serving Next.js applications."
|
||||
|
||||
## Benefits During Development
|
||||
|
||||
1. **Rapid research**: Get accurate information without leaving your development environment
|
||||
2. **Up-to-date documentation**: Access the latest best practices and API documentation
|
||||
3. **Code modernization**: Identify and fix deprecated patterns before they cause issues
|
||||
4. **API discovery**: Find the right tools and services to integrate into your project
|
||||
5. **Problem-solving assistance**: Get detailed solutions to specific technical challenges
|
||||
|
||||
## Best Practices for Using the MCP Server
|
||||
|
||||
1. **Be specific with queries**: The more specific your request, the more relevant the results
|
||||
2. **Provide context**: Include information about your specific implementation needs
|
||||
3. **Use for research, not implementation**: The MCP server provides guidance, but Cline will still handle the actual implementation
|
||||
4. **Verify critical information**: While Perplexity provides reliable information, always verify critical details from official documentation
|
||||
5. **Use for learning**: When unfamiliar with a technology, use the documentation tool to get comprehensive overviews
|
||||
|
||||
By leveraging these tools throughout your development process, you'll be able to make more informed decisions, implement features more efficiently, and stay up-to-date with best practices in web development.
|
||||
872
planned_implementation.txt
Normal file
872
planned_implementation.txt
Normal file
|
|
@ -0,0 +1,872 @@
|
|||
# Olathe Club of the Deaf (OCD) Website: Comprehensive Implementation Plan
|
||||
|
||||
## Project Overview
|
||||
|
||||
The Olathe Club of the Deaf (OCD) website will serve as a digital hub for the deaf community in Olathe, providing accessible information, event management, membership tracking, and administrative capabilities. This implementation plan outlines the detailed technical approach, architecture, development phases, and timelines.
|
||||
|
||||
## Technical Architecture
|
||||
|
||||
### Frontend Architecture
|
||||
- **Framework**: Next.js 14.1 with React 19
|
||||
- **Rendering Strategy**:
|
||||
- Server-side rendering for critical pages (home, about, events)
|
||||
- Static generation for stable content (bylaws, history)
|
||||
- Client-side rendering for interactive components (calendar, forms)
|
||||
- **State Management**: React Context for application state
|
||||
- **Styling**:
|
||||
- Tailwind CSS 3.4 for responsive design
|
||||
- PostCSS 8.4 with Autoprefixer 10.4
|
||||
- Custom CSS variables for theming
|
||||
- **Animation**: Framer Motion 11 for UI transitions
|
||||
- **Routing**: Next.js App Router with nested layouts
|
||||
- **Interactive Components**:
|
||||
- React Simple Maps 4.0 for location visualization
|
||||
- Custom video player with WebVTT support
|
||||
- React Intersection Observer 9.13 for scroll animations
|
||||
|
||||
### Backend Architecture
|
||||
- **Framework**: Node.js with Express 4.21
|
||||
- **API Design**: RESTful endpoints
|
||||
- **Authentication**:
|
||||
- JWT-based authentication for admin access
|
||||
- HTTP-only cookies for session management
|
||||
- **Data Layer**:
|
||||
- MongoDB for document storage
|
||||
- Mongoose for schema validation and ODM
|
||||
- Redis for caching and session management
|
||||
- **Email**: Nodemailer 6.9 with Gmail SMTP
|
||||
- **Performance**:
|
||||
- Redis-backed rate limiting
|
||||
- Response compression
|
||||
- Efficient database queries with indexing
|
||||
|
||||
### Database Schema
|
||||
1. **Admin User**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
username: String,
|
||||
passwordHash: String,
|
||||
email: String,
|
||||
lastLogin: Date,
|
||||
resetToken: String,
|
||||
resetTokenExpiry: Date
|
||||
}
|
||||
```
|
||||
|
||||
2. **Member**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
firstName: String,
|
||||
lastName: String,
|
||||
email: String,
|
||||
phone: String,
|
||||
address: {
|
||||
street: String,
|
||||
city: String,
|
||||
state: String,
|
||||
zip: String
|
||||
},
|
||||
membershipType: String, // "regular", "lifetime", "honorary"
|
||||
joinDate: Date,
|
||||
expirationDate: Date,
|
||||
status: String, // "active", "expired", "pending"
|
||||
notificationPreference: String, // "email", "sms", "both"
|
||||
lastRenewalDate: Date,
|
||||
boardMember: Boolean,
|
||||
boardPosition: String, // if applicable
|
||||
emergencyContact: {
|
||||
name: String,
|
||||
relationship: String,
|
||||
phone: String
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. **Event**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
title: String,
|
||||
description: String,
|
||||
startDate: Date,
|
||||
endDate: Date,
|
||||
location: {
|
||||
name: String,
|
||||
address: String,
|
||||
coordinates: {
|
||||
lat: Number,
|
||||
lng: Number
|
||||
}
|
||||
},
|
||||
category: String, // "social", "athletic", "board", "general"
|
||||
image: String, // URL to image
|
||||
recurring: Boolean,
|
||||
recurrencePattern: String, // "weekly", "monthly", "annual"
|
||||
createdAt: Date,
|
||||
updatedAt: Date,
|
||||
isPublished: Boolean,
|
||||
registrationRequired: Boolean,
|
||||
registeredMembers: [ObjectId], // References to Member
|
||||
featuredOnHomepage: Boolean
|
||||
}
|
||||
```
|
||||
|
||||
4. **Page Content**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
slug: String, // URL path
|
||||
title: String,
|
||||
content: String, // Rich text HTML
|
||||
metaDescription: String,
|
||||
lastUpdated: Date,
|
||||
createdBy: ObjectId, // Reference to Admin
|
||||
publishStatus: String, // "draft", "published"
|
||||
sections: [
|
||||
{
|
||||
id: String,
|
||||
title: String,
|
||||
content: String,
|
||||
order: Number
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
5. **Document**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
title: String,
|
||||
description: String,
|
||||
category: String, // "minutes", "bylaws", "forms"
|
||||
fileUrl: String,
|
||||
mimeType: String,
|
||||
fileSize: Number,
|
||||
uploadDate: Date,
|
||||
lastModified: Date,
|
||||
isPublic: Boolean,
|
||||
tags: [String]
|
||||
}
|
||||
```
|
||||
|
||||
6. **Video**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
title: String,
|
||||
description: String,
|
||||
fileUrl: String,
|
||||
thumbnailUrl: String,
|
||||
duration: Number, // in seconds
|
||||
uploadDate: Date,
|
||||
category: String,
|
||||
subtitleUrl: String, // WebVTT file URL
|
||||
transcriptText: String,
|
||||
isPublished: Boolean,
|
||||
relatedPageId: ObjectId // Reference to Page Content
|
||||
}
|
||||
```
|
||||
|
||||
7. **Contact Submission**
|
||||
```javascript
|
||||
{
|
||||
_id: ObjectId,
|
||||
name: String,
|
||||
email: String,
|
||||
phone: String,
|
||||
message: String,
|
||||
submissionDate: Date,
|
||||
isRead: Boolean,
|
||||
status: String, // "pending", "responded", "closed"
|
||||
responseText: String,
|
||||
responseDate: Date
|
||||
}
|
||||
```
|
||||
|
||||
### API Endpoints
|
||||
|
||||
#### Authentication
|
||||
- `POST /api/auth/login` - Admin login
|
||||
- `POST /api/auth/logout` - Admin logout
|
||||
- `POST /api/auth/reset-password` - Password reset request
|
||||
- `POST /api/auth/set-password` - Set new password
|
||||
|
||||
#### Content Management
|
||||
- `GET /api/pages` - List all pages
|
||||
- `GET /api/pages/:slug` - Get page by slug
|
||||
- `POST /api/pages` - Create new page
|
||||
- `PUT /api/pages/:id` - Update page
|
||||
- `DELETE /api/pages/:id` - Delete page
|
||||
- `PUT /api/pages/:id/publish` - Publish/unpublish page
|
||||
|
||||
#### Events
|
||||
- `GET /api/events` - List events with filtering
|
||||
- `GET /api/events/:id` - Get event details
|
||||
- `POST /api/events` - Create event
|
||||
- `PUT /api/events/:id` - Update event
|
||||
- `DELETE /api/events/:id` - Delete event
|
||||
- `GET /api/events/calendar/:year/:month` - Get calendar data
|
||||
|
||||
#### Members
|
||||
- `GET /api/members` - List members (admin only)
|
||||
- `GET /api/members/:id` - Get member details (admin only)
|
||||
- `POST /api/members` - Add member (admin only)
|
||||
- `PUT /api/members/:id` - Update member (admin only)
|
||||
- `DELETE /api/members/:id` - Delete member (admin only)
|
||||
- `GET /api/members/expiring` - Get soon-to-expire memberships
|
||||
- `POST /api/members/notify` - Send notifications to members
|
||||
|
||||
#### Documents
|
||||
- `GET /api/documents` - List documents with filtering
|
||||
- `GET /api/documents/:id` - Get document details
|
||||
- `POST /api/documents` - Upload document
|
||||
- `PUT /api/documents/:id` - Update document metadata
|
||||
- `DELETE /api/documents/:id` - Delete document
|
||||
|
||||
#### Videos
|
||||
- `GET /api/videos` - List videos
|
||||
- `GET /api/videos/:id` - Get video details
|
||||
- `POST /api/videos` - Upload video
|
||||
- `PUT /api/videos/:id` - Update video metadata
|
||||
- `DELETE /api/videos/:id` - Delete video
|
||||
- `POST /api/videos/:id/subtitles` - Upload subtitle file
|
||||
|
||||
#### Contact
|
||||
- `POST /api/contact` - Submit contact form
|
||||
- `GET /api/contact` - List contact submissions (admin only)
|
||||
- `PUT /api/contact/:id` - Update contact submission status
|
||||
- `POST /api/contact/:id/respond` - Respond to contact submission
|
||||
|
||||
## Development Phases & Timeline
|
||||
|
||||
### Phase 1: Project Setup & Infrastructure (Weeks 1-2)
|
||||
- [ ] Initialize Next.js project with TypeScript
|
||||
- [ ] Configure project structure (app directory, API routes)
|
||||
- [ ] Set up ESLint with accessibility rules
|
||||
- [ ] Create basic layout components (Header, Footer, Navigation)
|
||||
- [ ] Implement responsive design breakpoints
|
||||
- [ ] Configure MongoDB connection
|
||||
- [ ] Set up Redis for caching
|
||||
- [ ] Implement Docker development environment
|
||||
- [ ] Create authentication middleware
|
||||
- [ ] Configure admin login system
|
||||
- [ ] Set up email service connection
|
||||
|
||||
#### Deliverables:
|
||||
- Project repository with initial commit
|
||||
- Development environment documentation
|
||||
- Basic site structure with placeholder pages
|
||||
- Admin authentication system
|
||||
- Database connection and schema documentation
|
||||
|
||||
### Phase 2: Core Public Pages (Weeks 3-5)
|
||||
- [ ] Implement home page with featured events section
|
||||
- [ ] Create About OCD section pages
|
||||
- [ ] History page
|
||||
- [ ] Mission statement page
|
||||
- [ ] Board members page with photo grid
|
||||
- [ ] Implement bylaws page with document viewer
|
||||
- [ ] Create minutes archive with filtering and search
|
||||
- [ ] Develop responsive navigation system
|
||||
- [ ] Implement SEO optimization
|
||||
- [ ] Dynamic meta tags
|
||||
- [ ] Structured data for events
|
||||
- [ ] Sitemap generation
|
||||
- [ ] Create contact form with validation and email notifications
|
||||
- [ ] Implement breadcrumb navigation
|
||||
|
||||
#### Deliverables:
|
||||
- Fully functional public-facing pages
|
||||
- Responsive navigation system
|
||||
- SEO implementation
|
||||
- Contact form with notification system
|
||||
- Document viewing capabilities
|
||||
|
||||
### Phase 3: Event Management & Calendar (Weeks 6-7)
|
||||
- [ ] Implement event data model and API endpoints
|
||||
- [ ] Create calendar visualization
|
||||
- [ ] Monthly view
|
||||
- [ ] List view
|
||||
- [ ] Filtering capabilities
|
||||
- [ ] Develop event detail pages
|
||||
- [ ] Implement recurring event functionality
|
||||
- [ ] Create event management interface for admin
|
||||
- [ ] Implement featured events selection for homepage
|
||||
- [ ] Develop event category system
|
||||
|
||||
#### Deliverables:
|
||||
- Interactive calendar with multiple views
|
||||
- Event detail pages
|
||||
- Admin event management interface
|
||||
- Event categorization system
|
||||
|
||||
### Phase 4: Membership System (Weeks 8-9)
|
||||
- [ ] Implement member data model and API endpoints
|
||||
- [ ] Create membership information pages
|
||||
- [ ] Develop membership application form
|
||||
- [ ] Implement membership tracking system
|
||||
- [ ] Expiration dates
|
||||
- [ ] Status tracking
|
||||
- [ ] Renewal notifications
|
||||
- [ ] Create member management interface for admin
|
||||
- [ ] Implement automated email notifications
|
||||
- [ ] Develop member directory (admin-only view)
|
||||
- [ ] Create exportable member lists
|
||||
|
||||
#### Deliverables:
|
||||
- Membership information pages
|
||||
- Online application form
|
||||
- Admin membership management interface
|
||||
- Automated expiration notifications
|
||||
- Member directory with export capabilities
|
||||
|
||||
### Phase 5: Admin Dashboard (Weeks 10-12)
|
||||
- [ ] Create dashboard layout and navigation
|
||||
- [ ] Implement WYSIWYG editor for content management
|
||||
- [ ] Develop document repository management
|
||||
- [ ] Upload interface
|
||||
- [ ] Categorization
|
||||
- [ ] Search functionality
|
||||
- [ ] Create image management system
|
||||
- [ ] Implement user analytics dashboard
|
||||
- [ ] Develop contact submission management
|
||||
- [ ] Create admin notification center
|
||||
- [ ] Implement dashboard customization
|
||||
|
||||
#### Deliverables:
|
||||
- Complete admin dashboard
|
||||
- Content management system
|
||||
- Document repository
|
||||
- Analytics dashboard
|
||||
- Contact management system
|
||||
|
||||
### Phase 6: Video & Accessibility Features (Weeks 13-14)
|
||||
- [ ] Implement custom video player with accessibility features
|
||||
- [ ] WebVTT subtitle support
|
||||
- [ ] Playback speed controls
|
||||
- [ ] Keyboard shortcuts
|
||||
- [ ] Create video management interface
|
||||
- [ ] Implement transcript display alongside videos
|
||||
- [ ] Develop thumbnail generation system
|
||||
- [ ] Create video category organization
|
||||
- [ ] Implement comprehensive ARIA attributes
|
||||
- [ ] Test with screen readers
|
||||
- [ ] Implement high-contrast mode
|
||||
|
||||
#### Deliverables:
|
||||
- Accessible custom video player
|
||||
- Video management system
|
||||
- Screen reader compatibility
|
||||
- Accessibility compliance documentation
|
||||
|
||||
### Phase 7: Integration & Donation Features (Weeks 15-16)
|
||||
- [ ] Implement Zeffy donation widget
|
||||
- [ ] Create donation information page
|
||||
- [ ] Integrate social media sharing
|
||||
- [ ] Implement Google Maps for location
|
||||
- [ ] Create social media preview cards
|
||||
- [ ] Develop printable content functionality
|
||||
- [ ] Implement newsletter signup form
|
||||
|
||||
#### Deliverables:
|
||||
- Donation system integration
|
||||
- Social media integration
|
||||
- Location mapping
|
||||
- Newsletter signup functionality
|
||||
|
||||
### Phase 8: Testing & Optimization (Weeks 17-18)
|
||||
- [ ] Conduct comprehensive user testing
|
||||
- [ ] Perform accessibility audit
|
||||
- [ ] Implement performance optimizations
|
||||
- [ ] Image optimization
|
||||
- [ ] Code splitting
|
||||
- [ ] Bundle size reduction
|
||||
- [ ] Conduct security audit
|
||||
- [ ] Fix bugs and refine UI/UX
|
||||
- [ ] Optimize database queries
|
||||
- [ ] Implement caching strategies
|
||||
|
||||
#### Deliverables:
|
||||
- User testing report
|
||||
- Accessibility audit report
|
||||
- Performance optimization documentation
|
||||
- Security audit report
|
||||
- Finalized application with bugfixes
|
||||
|
||||
### Phase 9: Deployment & Documentation (Weeks 19-20)
|
||||
- [ ] Set up production Docker environment
|
||||
- [ ] Configure Nginx and SSL
|
||||
- [ ] Implement automated backups
|
||||
- [ ] Create deployment documentation
|
||||
- [ ] Develop admin user guide
|
||||
- [ ] Create technical documentation
|
||||
- [ ] Implement monitoring and alerting
|
||||
- [ ] Conduct training session for administrators
|
||||
|
||||
#### Deliverables:
|
||||
- Production-ready deployment
|
||||
- Comprehensive documentation
|
||||
- Admin user guide
|
||||
- Training materials
|
||||
- Monitoring system
|
||||
|
||||
## Technical Implementation Details
|
||||
|
||||
### Responsive Design Implementation
|
||||
- Mobile-first approach with breakpoints:
|
||||
- Mobile: < 640px
|
||||
- Tablet: 640px - 1023px
|
||||
- Desktop: ≥ 1024px
|
||||
- Fluid typography using CSS clamp()
|
||||
- Flexible grid layouts with CSS Grid and Flexbox
|
||||
- Component-based media queries using Tailwind's screen variants
|
||||
|
||||
### Accessibility Implementation
|
||||
- WCAG 2.1 AA compliance requirements:
|
||||
- Semantic HTML structure
|
||||
- Keyboard navigation support
|
||||
- Focus management for interactive elements
|
||||
- Color contrast ratio ≥ 4.5:1
|
||||
- Text resizing support without breaking layouts
|
||||
- Screen reader considerations:
|
||||
- ARIA landmarks and labels
|
||||
- Skip navigation links
|
||||
- Descriptive alt text for images
|
||||
- Status announcements for dynamic content
|
||||
- DeafBlind user support:
|
||||
- High contrast mode
|
||||
- Text-only content alternatives
|
||||
- Simple navigation patterns
|
||||
- Reduced motion option
|
||||
|
||||
### Video Player Implementation
|
||||
```typescript
|
||||
// Custom video player component
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
|
||||
const VideoPlayer = ({
|
||||
videoUrl,
|
||||
subtitleUrl,
|
||||
thumbnailUrl,
|
||||
title
|
||||
}) => {
|
||||
const videoRef = useRef<HTMLVideoElement>(null);
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [progress, setProgress] = useState(0);
|
||||
const [currentTime, setCurrentTime] = useState(0);
|
||||
const [duration, setDuration] = useState(0);
|
||||
const [showSubtitles, setShowSubtitles] = useState(true);
|
||||
const [playbackRate, setPlaybackRate] = useState(1);
|
||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||
|
||||
// Implementation for controls (play/pause, seeking, etc.)
|
||||
// Keyboard shortcut handling
|
||||
// Fullscreen toggle
|
||||
// Subtitle display logic
|
||||
// Progress tracking
|
||||
|
||||
return (
|
||||
<div className="video-player-container" aria-label={`Video player: ${title}`}>
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={videoUrl}
|
||||
poster={thumbnailUrl}
|
||||
className="video-element"
|
||||
onClick={togglePlayPause}
|
||||
onTimeUpdate={updateProgress}
|
||||
onLoadedMetadata={initializeVideo}
|
||||
>
|
||||
{subtitleUrl && showSubtitles && (
|
||||
<track
|
||||
kind="subtitles"
|
||||
src={subtitleUrl}
|
||||
srcLang="en"
|
||||
label="English"
|
||||
default
|
||||
/>
|
||||
)}
|
||||
</video>
|
||||
|
||||
{/* Custom control bar */}
|
||||
<div className="controls-container">
|
||||
<button
|
||||
onClick={togglePlayPause}
|
||||
aria-label={isPlaying ? "Pause" : "Play"}
|
||||
>
|
||||
{isPlaying ? "Pause" : "Play"}
|
||||
</button>
|
||||
|
||||
{/* Progress bar */}
|
||||
<div
|
||||
className="progress-container"
|
||||
onClick={seekToPosition}
|
||||
role="slider"
|
||||
aria-label="Video progress"
|
||||
aria-valuemin={0}
|
||||
aria-valuemax={100}
|
||||
aria-valuenow={progress}
|
||||
>
|
||||
<div
|
||||
className="progress-bar"
|
||||
style={{ width: `${progress}%` }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Additional controls */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default VideoPlayer;
|
||||
```
|
||||
|
||||
### Membership Expiration Notification System
|
||||
```typescript
|
||||
// Automated notification system
|
||||
import { getAllMembers } from '../models/Member';
|
||||
import { sendEmail } from '../utils/email';
|
||||
|
||||
async function checkExpiringMemberships() {
|
||||
const today = new Date();
|
||||
const thirtyDaysFromNow = new Date();
|
||||
thirtyDaysFromNow.setDate(today.getDate() + 30);
|
||||
|
||||
// Get members expiring in the next 30 days
|
||||
const expiringMembers = await getAllMembers({
|
||||
expirationDate: {
|
||||
$gte: today,
|
||||
$lte: thirtyDaysFromNow
|
||||
},
|
||||
status: 'active'
|
||||
});
|
||||
|
||||
// Send notifications to each member
|
||||
for (const member of expiringMembers) {
|
||||
await sendEmail({
|
||||
to: member.email,
|
||||
subject: 'Your OCD Membership is Expiring Soon',
|
||||
template: 'membership-expiration',
|
||||
data: {
|
||||
firstName: member.firstName,
|
||||
expirationDate: member.expirationDate,
|
||||
renewalLink: `https://olathedeafclub.com/membership/renew?id=${member._id}`
|
||||
}
|
||||
});
|
||||
|
||||
// Update member notification status
|
||||
await updateMemberNotificationSent(member._id, 'expiration-warning');
|
||||
}
|
||||
|
||||
// Notify board about expiring members
|
||||
await sendBoardNotification({
|
||||
subject: 'Upcoming Membership Expirations',
|
||||
data: {
|
||||
expiringMembers: expiringMembers.map(m => ({
|
||||
name: `${m.firstName} ${m.lastName}`,
|
||||
expirationDate: m.expirationDate
|
||||
}))
|
||||
}
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Component Implementation
|
||||
```typescript
|
||||
// Month view calendar component
|
||||
import { useState, useEffect } from 'react';
|
||||
import { fetchEventsForMonth } from '../api/events';
|
||||
|
||||
const Calendar = ({ year, month }) => {
|
||||
const [events, setEvents] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [calendarDays, setCalendarDays] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
async function loadEvents() {
|
||||
setLoading(true);
|
||||
try {
|
||||
const eventsData = await fetchEventsForMonth(year, month);
|
||||
setEvents(eventsData);
|
||||
generateCalendarDays(year, month, eventsData);
|
||||
} catch (error) {
|
||||
console.error('Error loading events:', error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
loadEvents();
|
||||
}, [year, month]);
|
||||
|
||||
function generateCalendarDays(year, month, events) {
|
||||
// Logic to generate calendar grid with events
|
||||
// Handle month start/end dates
|
||||
// Map events to specific days
|
||||
// Calculate appropriate rows/columns
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="calendar-container" aria-label={`Calendar for ${getMonthName(month)} ${year}`}>
|
||||
{/* Calendar header with month/year and navigation */}
|
||||
<div className="calendar-header">
|
||||
<button onClick={() => navigateMonth(-1)} aria-label="Previous month">
|
||||
←
|
||||
</button>
|
||||
<h2>{getMonthName(month)} {year}</h2>
|
||||
<button onClick={() => navigateMonth(1)} aria-label="Next month">
|
||||
→
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Calendar grid */}
|
||||
<div className="calendar-grid" role="grid">
|
||||
{/* Day of week headers */}
|
||||
<div className="calendar-weekdays" role="row">
|
||||
{['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].map(day => (
|
||||
<div key={day} role="columnheader">{day}</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Calendar days */}
|
||||
<div className="calendar-days">
|
||||
{calendarDays.map(day => (
|
||||
<div
|
||||
key={day.date}
|
||||
className={`calendar-day ${day.isCurrentMonth ? '' : 'other-month'}`}
|
||||
role="gridcell"
|
||||
>
|
||||
<div className="day-number">{day.dayOfMonth}</div>
|
||||
|
||||
{/* Events for this day */}
|
||||
<div className="day-events">
|
||||
{day.events.map(event => (
|
||||
<div
|
||||
key={event._id}
|
||||
className={`event-pill ${event.category}`}
|
||||
title={event.title}
|
||||
>
|
||||
{event.title}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Event legend */}
|
||||
<div className="event-legend" aria-label="Event categories">
|
||||
<div className="legend-item social">Social</div>
|
||||
<div className="legend-item athletic">Athletic</div>
|
||||
<div className="legend-item board">Board</div>
|
||||
<div className="legend-item general">General</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Calendar;
|
||||
```
|
||||
|
||||
## Deployment Architecture
|
||||
|
||||
### Docker Compose Setup
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Frontend service
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- backend
|
||||
env_file: ./frontend/.env
|
||||
volumes:
|
||||
- ./logs:/app/logs
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
# Backend API service
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "4000:4000"
|
||||
depends_on:
|
||||
- mongodb
|
||||
- redis
|
||||
env_file: ./backend/.env
|
||||
volumes:
|
||||
- ./uploads:/app/uploads
|
||||
- ./logs:/app/logs
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
# MongoDB service
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
networks:
|
||||
- app-network
|
||||
env_file: ./backend/.env
|
||||
|
||||
# Redis service
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
# Nginx service for production
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/conf:/etc/nginx/conf.d
|
||||
- ./nginx/ssl:/etc/nginx/ssl
|
||||
- ./frontend/public:/var/www/html
|
||||
depends_on:
|
||||
- frontend
|
||||
- backend
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
# Networks
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
# Volumes
|
||||
volumes:
|
||||
mongo-data:
|
||||
redis-data:
|
||||
```
|
||||
|
||||
### Nginx Configuration for Production
|
||||
```nginx
|
||||
# nginx/conf/default.conf
|
||||
server {
|
||||
listen 80;
|
||||
server_name olathedeafclub.com www.olathedeafclub.com;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name olathedeafclub.com www.olathedeafclub.com;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/olathedeafclub.com.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/olathedeafclub.com.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||
|
||||
# Security headers
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_min_length 1000;
|
||||
|
||||
# Frontend static assets
|
||||
location / {
|
||||
proxy_pass http://frontend:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# Backend API
|
||||
location /api {
|
||||
proxy_pass http://backend:4000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# Static files
|
||||
location /static {
|
||||
alias /var/www/html;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000";
|
||||
}
|
||||
|
||||
# Media files
|
||||
location /uploads {
|
||||
alias /app/uploads;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Monitoring & Maintenance
|
||||
|
||||
### Monitoring Strategy
|
||||
- Server health monitoring with Portainer
|
||||
- Application performance monitoring
|
||||
- Error tracking and notification
|
||||
- Database performance monitoring
|
||||
- Uptime monitoring for critical services
|
||||
|
||||
### Backup Strategy
|
||||
- Daily MongoDB backups
|
||||
- Weekly full system backups
|
||||
- Offsite backup storage
|
||||
- Automated backup verification
|
||||
- Database backup rotation (30-day retention)
|
||||
|
||||
### Maintenance Schedule
|
||||
- Weekly dependency updates review
|
||||
- Monthly security patch application
|
||||
- Quarterly performance optimization
|
||||
- Semi-annual accessibility audit
|
||||
- Annual system architecture review
|
||||
|
||||
## Next Steps After Launch
|
||||
|
||||
### Phase 1 Extensions
|
||||
- Member login portal for personalized experience
|
||||
- Enhanced analytics dashboard
|
||||
- Content recommendation system based on user interests
|
||||
- Advanced search functionality with filters
|
||||
- Integration with additional community services
|
||||
- Mobile application development
|
||||
|
||||
### Phase 2 Extensions
|
||||
- Live streaming capability for events
|
||||
- Member-to-member messaging system
|
||||
- Community forum or discussion board
|
||||
- Event registration with payment processing
|
||||
- Automated membership renewal system
|
||||
- Interactive community map
|
||||
|
||||
This implementation plan provides a comprehensive roadmap for developing the Olathe Club of the Deaf website, addressing all requirements outlined in the project specification while maintaining focus on accessibility, performance, and user experience.
|
||||
Loading…
Add table
Reference in a new issue