Skip to content

Commit bcff84e

Browse files
committed
docs(migration-plan): add comprehensive Next.js migration plan
Introduces `MIGRATION_PLAN.md`, detailing the strategic roadmap for migrating the Islamic Da'wah website from its vanilla stack to Next.js. The plan prioritizes user experience continuity and content accessibility. Added: - A detailed 6-phase, 12-week migration plan covering: - Islamic Content & Navigation - Audio System enhancements - PDF Integration & Interactive Content - Video Content & Advanced Features - Forms & Analytics - Multilingual & PWA Features - Sections on migration methodology, development approach, content strategy, and technical considerations (Next.js 15, Tailwind v4). - Defined success metrics, risk mitigation strategies, and an implementation timeline. - An analysis of the current architecture, including existing tech stack, asset structure, and content organization. - Highlights accelerated migration benefits, leveraging existing Islamic theme colors, audio player styles, and responsive layouts for direct conversion to Tailwind v4. - Notes on the already complete Next.js 15 foundation with Tailwind v4 configuration, base UI components, and layout structure, enabling an immediate start to Phase 1.
1 parent 9f387a1 commit bcff84e

1 file changed

Lines changed: 296 additions & 0 deletions

File tree

MIGRATION_PLAN.md

Lines changed: 296 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
# Islamic Da'wah Website Migration Plan: Vanilla → Next.js
2+
3+
## Migration Strategy Overview
4+
5+
This plan prioritizes **user experience continuity** and **content accessibility** while modernizing the technical stack. We'll migrate incrementally to maintain the Islamic educational mission and ensure zero downtime.
6+
7+
## **Phase 1: Islamic Content & Navigation (Weeks 1-2)**
8+
*Priority: CRITICAL - Essential for site functionality*
9+
10+
### 1.1 Islamic Branding & Content Migration ✅ FOUNDATION READY
11+
- **Targets**:
12+
- [ ] Update layout.tsx with Islamic metadata and fonts (DM Sans + Inter)
13+
- [ ] Replace boilerplate content with Islamic welcome message
14+
- [ ] Add Islamic color palette to Tailwind config (`#132a1a`, `#e7d296`)
15+
- [ ] Migrate favicon and Islamic branding assets
16+
- **Timeline**: Week 1
17+
18+
### 1.2 Navigation Component Conversion
19+
- **Targets**:
20+
- [ ] Convert existing navbar to Islamic navigation structure
21+
- [ ] Add multilingual dropdown menus (English, Spanish, Mandarin)
22+
- [ ] Implement audiobook dropdown navigation
23+
- [ ] Add video and audio content navigation sections
24+
- [ ] Convert existing responsive mobile navigation
25+
- **Timeline**: Week 1
26+
27+
### 1.3 Homepage Islamic Content
28+
- **Targets**:
29+
- [ ] Replace boilerplate hero with Islamic welcome content
30+
- [ ] Add "What is Islam?", "Who is Allah?", "What is Prayer?" content cards
31+
- [ ] Implement modal system for educational content
32+
- [ ] Add contact section with masjid information
33+
- [ ] Add "How to become Muslim" content
34+
- [ ] Convert link copying functionality
35+
- **Timeline**: Week 2
36+
37+
## **Phase 2: Audio System (Weeks 2-4)**
38+
*Priority: HIGH - Core feature for Islamic education*
39+
40+
### 2.1 Audio Player Component Enhancement
41+
- **Targets**: ✅ BASE AUDIOPLAYER.TSX EXISTS
42+
- [ ] Enhance existing AudioPlayer.tsx with Web Audio API features
43+
- [ ] Add progress bar with scrubbing functionality
44+
- [ ] Implement volume control with gain nodes
45+
- [ ] Add Media Session API integration for background play
46+
- [ ] Apply Islamic theming to match existing design
47+
- [ ] Convert metadata system from `/assets/js/audio.js`
48+
- **Timeline**: Week 2-3
49+
50+
### 2.2 Audio Content Pages
51+
- **Targets**:
52+
- [ ] Create `/audiobook/a-glimpse-into-the-religion-of-islam/` page
53+
- [ ] Create `/audiobook/un-vistazo-dentro-de-la-religion-del-islam/` page
54+
- [ ] Create `/audiobook/a-glimpse-into-the-religion-of-islam-mandarin/` page
55+
- [ ] Create `/audio/comprehensive-guide-new-muslim/` page
56+
- [ ] Create `/audio/listen-to-quran/` page
57+
- [ ] Add Quran recitation components (Arabic/English Fatihah)
58+
- [ ] Implement PDF book viewer integration
59+
- **Timeline**: Week 3-4
60+
61+
## **Phase 3: PDF Integration & Interactive Content (Weeks 4-6)**
62+
*Priority: HIGH - Educational resource access*
63+
64+
### 3.1 PDF Viewer System
65+
- **Targets**:
66+
- [ ] Implement React-PDF or PDF.js integration for Next.js
67+
- [ ] Create PDF viewer component for Islamic educational materials
68+
- [ ] Replace DFlip.js with modern React PDF solution
69+
- [ ] Add PDF download functionality
70+
- [ ] Ensure mobile-responsive PDF viewing
71+
- [ ] Migrate PDF assets from `/assets/pdf/`
72+
- **Timeline**: Week 4-5
73+
74+
### 3.2 Modal & Interactive Content System
75+
- **Targets**:
76+
- [ ] Create reusable Modal component (replacing Fusilli.js)
77+
- [ ] Implement "Who is Allah?" educational modal
78+
- [ ] Implement "What is Prayer?" educational modal
79+
- [ ] Implement "What is Islam?" educational modal
80+
- [ ] Implement "How to become Muslim" modal
81+
- [ ] Add ARIA-compliant accessibility features
82+
- [ ] Ensure responsive design for mobile devices
83+
- **Timeline**: Week 5-6
84+
85+
## **Phase 4: Video Content & Advanced Features (Weeks 6-8)**
86+
*Priority: MEDIUM - Supplementary educational content*
87+
88+
### 4.1 Video Integration
89+
- **Targets**:
90+
- [ ] Create `/video/wudu-video/` page (How to make Wudū)
91+
- [ ] Create `/video/prayer-video/` page (How to Pray)
92+
- [ ] Implement responsive video player component
93+
- [ ] Add video accessibility features (captions, descriptions)
94+
- [ ] Optimize video loading and performance
95+
- **Timeline**: Week 6-7
96+
97+
### 4.2 Search & Performance Optimization
98+
- **Targets**:
99+
- [ ] Implement site-wide search functionality for Islamic content
100+
- [ ] Optimize image assets (convert to WebP)
101+
- [ ] Implement performance monitoring
102+
- [ ] Add SEO enhancements for Islamic content discovery
103+
- [ ] Optimize audio file loading and caching
104+
- **Timeline**: Week 7-8
105+
106+
## **Phase 5: Forms & Analytics (Weeks 8-10)**
107+
*Priority: MEDIUM - User engagement features*
108+
109+
### 5.1 Contact Forms
110+
- **Targets**:
111+
- [ ] Create modern contact form component with validation
112+
- [ ] Implement server-side form processing
113+
- [ ] Integrate reCAPTCHA v2 (existing implementation)
114+
- [ ] Add email notification system
115+
- [ ] Convert existing form submission logic to Next.js API routes
116+
- **Timeline**: Week 8-9
117+
118+
### 5.2 Analytics & Monitoring
119+
- **Targets**:
120+
- [ ] Integrate Google Analytics 4 with Next.js App Router
121+
- [ ] Migrate Microsoft Clarity integration
122+
- [ ] Implement performance monitoring
123+
- [ ] Add error tracking and reporting
124+
- [ ] Ensure privacy-compliant analytics for Islamic content
125+
- **Timeline**: Week 9-10
126+
127+
## **Phase 6: Multilingual & PWA Features (Weeks 10-12)**
128+
*Priority: LOW - Enhancement features*
129+
130+
### 6.1 Internationalization (i18n)
131+
- **Targets**:
132+
- [ ] Set up Next.js i18n routing configuration
133+
- [ ] Create language-specific content management system
134+
- [ ] Implement language switcher component
135+
- [ ] Add RTL support for Arabic content
136+
- [ ] Migrate Spanish and Mandarin content with proper routing
137+
- **Timeline**: Week 10-11
138+
139+
### 6.2 Progressive Web App Enhancement
140+
- **Targets**:
141+
- [ ] Enhance existing manifest for Islamic content
142+
- [ ] Implement service worker for offline Islamic educational content
143+
- [ ] Add app-like installation experience
144+
- [ ] Implement push notifications for Islamic reminders/content
145+
- [ ] Optimize for mobile Islamic learning experience
146+
- **Timeline**: Week 11-12
147+
148+
---
149+
150+
## **Migration Methodology**
151+
152+
### Development Approach
153+
1. **Parallel Development**: Build Next.js version alongside existing site
154+
2. **Feature Parity**: Ensure 100% functional equivalence before switching
155+
3. **A/B Testing**: Gradual rollout with user feedback collection
156+
4. **Rollback Plan**: Maintain vanilla version as backup
157+
158+
### Content Migration Strategy
159+
1. **Asset Optimization**: Convert to modern formats (WebP, optimized audio)
160+
2. **SEO Preservation**: Maintain all URLs and metadata
161+
3. **Performance Baseline**: Measure and improve on current metrics
162+
4. **Accessibility Enhancement**: Improve WCAG compliance
163+
164+
### Technical Considerations
165+
- **Framework**: Next.js 15 with App Router
166+
- **Styling**: Tailwind v4 (converting from existing Bootstrap/SCSS - **STYLES ALREADY IMPLEMENTED**)
167+
- **State Management**: React Context for audio players
168+
- **Deployment**: Vercel or similar with CDN optimization
169+
- **Monitoring**: Real-time performance and error tracking
170+
- **Style Migration**: Direct conversion from `/assets/scss/main.scss` to Tailwind v4 classes
171+
172+
---
173+
174+
## **Success Metrics**
175+
176+
### Performance Targets
177+
- **Lighthouse Scores**: 90+ across all categories
178+
- **Core Web Vitals**: Green ratings for LCP, FID, CLS
179+
- **Audio Playback**: 99%+ reliability
180+
- **Mobile Performance**: Perfect responsive experience
181+
182+
### Content Quality
183+
- **SEO**: Maintain or improve search rankings for Islamic content
184+
- **Accessibility**: WCAG 2.1 AA compliance
185+
- **Islamic Content Integrity**: Zero content degradation
186+
- **Multilingual Support**: Seamless language switching
187+
188+
---
189+
190+
## **Risk Mitigation**
191+
192+
### Technical Risks
193+
- **Audio System**: Extensive testing of Web Audio API across browsers
194+
- **PDF Rendering**: Fallback systems for different devices
195+
- **Performance**: Regular performance audits and optimization
196+
- **Mobile Experience**: Comprehensive device testing
197+
198+
### Content Risks
199+
- **Islamic Content Integrity**: Rigorous testing of all religious content
200+
- **Cultural Sensitivity**: Preserve respectful presentation of Islamic teachings
201+
- **Accessibility**: Ensure Islamic content is accessible to all users
202+
- **Multilingual Accuracy**: Professional review of translations
203+
204+
---
205+
206+
## **Implementation Timeline**
207+
208+
| Phase | Duration | Key Deliverables | Critical Path |
209+
|-------|----------|------------------|---------------|
210+
| 1 | Weeks 1-2 | Islamic Content + Navigation | ✅ Critical |
211+
| 2 | Weeks 2-4 | Audio System | ✅ Critical |
212+
| 3 | Weeks 4-6 | PDF + Modals | ✅ Critical |
213+
| 4 | Weeks 6-8 | Video + Search | ⚠️ Medium |
214+
| 5 | Weeks 8-10 | Forms + Analytics | ⚠️ Medium |
215+
| 6 | Weeks 10-12 | i18n + PWA | ℹ️ Enhancement |
216+
217+
---
218+
219+
## **Current Architecture Analysis**
220+
221+
### Existing Tech Stack
222+
- **Frontend**: Vanilla HTML5, Bootstrap 5.3.3, custom SCSS
223+
- **JavaScript**: Vanilla JS with Web Audio API, Modal system
224+
- **External Libraries**: DFlip.js (PDF), Fusilli.js (modals), Axios
225+
- **Analytics**: Google Analytics, Microsoft Clarity
226+
- **Audio**: Custom player with Media Session API
227+
228+
### Asset Structure
229+
```
230+
assets/
231+
├── css/ # Compiled CSS + Bootstrap/Bulma
232+
├── scss/ # Custom SCSS with Islamic theming
233+
├── js/ # Vanilla JS modules (audio.js, etc.)
234+
├── audio/ # MP3 files (audiobooks, Quran)
235+
├── pdf/ # Educational materials
236+
├── img/ # Images with WebP optimization
237+
└── dflip/ # PDF reader library
238+
```
239+
240+
### Content Organization
241+
- **Multilingual**: English (primary), Spanish, Mandarin
242+
- **Audio Content**: Islamic audiobooks, Quran recitations
243+
- **Educational Materials**: PDFs, videos, interactive content
244+
- **SEO**: Structured data, social sharing optimization
245+
246+
---
247+
248+
## **Next Steps**
249+
250+
1. **Phase 1 Kickoff**: Set up Next.js foundation in `/new` directory
251+
2. **Component Library**: Create reusable Islamic-themed components
252+
3. **Asset Migration**: Optimize and migrate static assets
253+
4. **Audio System**: Rebuild custom audio player in React
254+
5. **Content Migration**: Transfer educational content with SEO preservation
255+
6. **Testing**: Comprehensive testing across devices and browsers
256+
7. **Deployment**: Gradual rollout with monitoring and feedback
257+
258+
This migration will modernize your Islamic educational platform while preserving its core mission and ensuring an excellent user experience for those seeking to learn about Islam.
259+
260+
## **ACCELERATED MIGRATION BENEFITS**
261+
262+
### Existing Assets Advantage
263+
- **Islamic Theme Colors**: Already defined (`#132a1a`, `#e7d296`) in `/assets/scss/main.scss`
264+
- **Audio Player Styles**: Complete custom player design ready for Tailwind conversion
265+
- **Modal System**: Fusilli.js modal styles can be directly mapped to Tailwind v4
266+
- **Responsive Layout**: Bootstrap grid system easily converts to Tailwind v4 grid
267+
- **Component Styles**: All UI components already styled and tested
268+
269+
### Conversion Strategy
270+
1. **Style Mapping**: Direct 1:1 conversion from SCSS variables to Tailwind v4 config
271+
2. **Component Library**: Create Tailwind v4 components matching existing designs exactly
272+
3. **Islamic Theming**: Preserve exact color palette and Islamic design elements
273+
4. **Responsive Breakpoints**: Maintain current mobile-responsive behavior
274+
275+
### Time Savings
276+
- **50% faster styling phase** - No design decisions needed
277+
- **Immediate visual consistency** - Styles already proven and optimized
278+
- **Focus on functionality** - More time for React component logic and performance
279+
- **Reduced testing** - Visual regression testing simplified
280+
281+
**NEW ACCELERATED TIMELINE: 12 weeks total (vs original 13 weeks)**
282+
283+
## **🚀 FOUNDATION ALREADY COMPLETE**
284+
285+
### ✅ What's Already Implemented in `/new/`:
286+
- **Next.js 15 App Router**: Complete foundation with TypeScript
287+
- **Tailwind v4**: Configured and ready for Islamic theming
288+
- **UI Components**: Button, Card, Input, AudioPlayer.tsx base
289+
- **Layout Structure**: Root layout with font configuration
290+
- **Boilerplate Page**: Ready for Islamic content replacement
291+
- **Component Architecture**: Organized `/src/components/` structure
292+
293+
### 🎯 Ready to Start:
294+
- Phase 1 can begin immediately with content migration
295+
- AudioPlayer.tsx base exists - just needs Islamic features
296+
- Styling system ready for direct SCSS → Tailwind conversion

0 commit comments

Comments
 (0)