# How to Malaysia CMS

A comprehensive content management system for Malaysian guides, tutorials, and "how-to" articles. This platform helps locals, tourists, and expats navigate various aspects of life in Malaysia.

## Quick Start

### Prerequisites
- XAMPP 8.2+ (PHP 8.1+, MySQL 8.0+, Apache 2.4+)
- Node.js 18+ and NPM
- Composer (PHP package manager)
- Git

### Installation
1. **Clone the repository**
   ```bash
   git clone <repository-url> c:\xampp\htdocs\HowToMalaysia
   cd c:\xampp\htdocs\HowToMalaysia
   ```

2. **Environment setup**
   ```bash
   copy .env.example .env
   # Edit .env file with your database credentials
   ```

3. **Install dependencies**
   ```bash
   composer install
   npm install
   ```

4. **Database setup**
   - Start XAMPP (Apache + MySQL)
   - Create database `how_to_malaysia`
   - Import schema: `mysql -u root how_to_malaysia < database/schema.sql`

5. **Build assets**
   ```bash
   npm run build
   ```

6. **Access the site**
   - Visit: `http://localhost/HowToMalaysia`

## Project Structure

```
HowToMalaysia/
 docs/                    # Project documentation
 src/                     # Source code
    assets/             # CSS, JS, Images
    templates/          # Page templates
    includes/           # PHP includes
    api/                # API endpoints
 content/                # Content files
 database/               # Database files
 tests/                  # Test files
```

## Features

### Content Management
- Multi-category article system
- Rich text editor with media support
- SEO optimization tools
- Multi-language support (EN/MY/ZH)
- Comment and rating system
- Newsletter integration

### User Experience
- Responsive design (mobile-first)
- Advanced search and filtering
- Social media integration
- Fast loading (< 2s LCP)
- Accessibility (WCAG 2.1 AA)

### Technical Features
- RESTful API architecture
- Database optimization
- Caching system
- Security best practices
- Performance monitoring

## Documentation

### Project Management
- [Work Breakdown Structure](docs/WBS-HowToMalaysia-Website.md)
- [Project Timeline](docs/Project-Gantt-Chart.md)
- [Resource Allocation](docs/Resource-Allocation-Matrix.md)

### Technical Documentation
- [Technical Specifications](docs/Technical-Specifications.md)
- [Content Guidelines](docs/Content-Creation-Templates.md)
- [API Documentation](docs/api-documentation.md)

### Development Guidelines
- [Coding Standards](docs/coding-standards.md)
- [Testing Guidelines](docs/testing-guidelines.md)
- [Deployment Guide](docs/deployment-guide.md)

## Development

### Available Scripts
```bash
# Development
npm run dev          # Start development with watch
npm run sass         # Compile SCSS with watch
composer migrate     # Run database migrations

# Production
npm run build        # Build for production
composer optimize    # Optimize autoloader

# Quality Assurance
npm test            # Run JavaScript tests
composer test       # Run PHP tests
npm run lint        # Lint JavaScript
composer lint       # Lint PHP code
```

### Content Categories
1. **Tourism & Travel** - Attractions, transportation, accommodations
2. **Living in Malaysia** - Housing, utilities, daily life
3. **Business & Work** - Employment, business registration, taxes
4. **Government Services** - Visa, permits, official procedures
5. **Food & Culture** - Local cuisine, traditions, etiquette
6. **Healthcare** - Medical services, insurance, wellness
7. **Education** - Schools, universities, certification
8. **Technology** - Apps, services, digital life in Malaysia

### Content Creation Workflow
1. **Research** - Verify information from official sources
2. **Write** - Follow content templates and SEO guidelines
3. **Review** - Quality check and fact verification
4. **Optimize** - SEO optimization and performance
5. **Publish** - Schedule and promote content

## Deployment

### Production Environment
- **Web Server:** Nginx/Apache with PHP 8.1+
- **Database:** MySQL 8.0+ or MariaDB 10.6+
- **Cache:** Redis or Memcached
- **CDN:** CloudFlare or AWS CloudFront
- **Monitoring:** New Relic or similar APM

### Security Checklist
- [ ] HTTPS enabled with strong SSL
- [ ] Security headers configured
- [ ] Input validation and sanitization
- [ ] SQL injection prevention
- [ ] XSS protection
- [ ] CSRF tokens implemented
- [ ] File upload security
- [ ] Regular security updates

## Performance Targets

### Loading Speed
- **Homepage:** < 2.0s LCP
- **Article Pages:** < 2.5s LCP
- **Search Results:** < 1.5s
- **Mobile Performance:** 90+ Lighthouse score

### SEO Goals
- **Organic Traffic:** 10K+ monthly visits by month 6
- **Search Rankings:** Top 10 for 50+ target keywords
- **Content Library:** 200+ comprehensive articles
- **Social Engagement:** 1K+ social followers

## Contributing

### Team Roles
- **Project Manager** - Overall coordination and timeline
- **UI/UX Designer** - User experience and visual design
- **Frontend Developer** - Template and JavaScript development
- **Backend Developer** - CMS and database development
- **Content Writer** - Article creation and SEO optimization
- **SEO Specialist** - Search optimization and analytics
- **QA Tester** - Quality assurance and testing

### Development Process
1. **Issue Creation** - Create detailed GitHub issues
2. **Branch Creation** - Create feature branches from main
3. **Development** - Follow coding standards and guidelines
4. **Testing** - Write and run tests for new features
5. **Code Review** - Peer review before merging
6. **Deployment** - Deploy to staging for final testing

## Support

### Getting Help
- **Documentation:** Check `/docs/` directory first
- **Issues:** Create GitHub issues for bugs/features
- **Discussions:** Use GitHub discussions for questions
- **Email:** team@howtomalaysia.com

### Project Status
- **Current Phase:** Foundation & Planning 
- **Next Milestone:** Design System Creation
- **Target Launch:** Q1 2026
- **Current Version:** 1.0.0-alpha

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Malaysian Government Open Data initiatives
- Tourism Malaysia for official information
- Local community contributors
- Open source community for tools and libraries

---

**Made with care for the Malaysian community**
