📋 Tóm tắt những gì đã được làm:
✨ Files & Folders Tạo Mới
README.md - Hướng dẫn project chính
.gitignore - Quy tắc bỏ qua (db, cache, venv, IDE files, backups)
docs/ - Tổng hợp 11 file documentation
docs/LEGAL/ - 3 file báo cáo pháp lý
scripts/README.md - Hướng dẫn các utility scripts
backups/README.md - Hướng dẫn backup & restore
📁 Cấu Trúc Mới

website-bmc/
├── README.md                    ← Project overview
├── manage.py                    ← Django
├── requirements.txt
├── .gitignore                   ← New ignore rules
├── .env.example
│
├── docs/                        ← 14 MB documentation
│   ├── ARCHITECTURE.md
│   ├── CHATBOT_SETUP.md
│   ├── DEPLOYMENT_GUIDE.md
│   ├── DEVELOPER_GUIDE.md
│   ├── PROJECT_OVERVIEW.md
│   ├── TRANSLATION_SETUP.md
│   ├── WINDOWS_*.md
│   └── LEGAL/
│       ├── AUDIT_REPORT.md
│       ├── LEGAL_DEPLOYMENT_REPORT.md
│       └── LEGAL_IMPLEMENTATION_SUMMARY.md
│
├── scripts/                     ← Utility scripts
│   ├── compile_po.py
│   ├── run_dev.bat
│   ├── run_dev.ps1
│   └── README.md
│
├── backups/                     ← Database backups (3.9 MB)
│   ├── backup-19-10.sql
│   ├── dumpdata.sql
│   ├── datadump.json
│   ├── update_data.json
│   ├── backup-data19-10/
│   └── README.md
│
├── BMC/                         ← Django project (unchanged)
├── BmcBase/                     ← Main app (unchanged)
├── legal/                       ← Legal app (unchanged)
└── [other dirs unchanged]
🚀 Bước Tiếp Theo:
1️⃣ Kiểm tra Changes

git status
2️⃣ Commit Changes (nếu muốn)

git add .
git commit -m "chore: organize project structure per Django best practices

- Move documentation to docs/ folder
- Move scripts to scripts/ folder
- Move backups to backups/ folder
- Create .gitignore for sensitive files (db, cache, etc)
- Create comprehensive README.md
- Add READMEs for scripts/ and backups/ directories"
3️⃣ Push Changes

git push origin main
📚 Các File Cần Đọc:
README.md - Setup & quick start
docs/DEPLOYMENT_GUIDE.md - Production deployment
scripts/README.md - Available utility scripts
backups/README.md - Backup/restore procedures
Project giờ đã sạch sẽ, dễ navigate, và tuân theo Django best practices! 🎉

=============================================================================
# BMC Vietnam - Plant Protection Website

Professional e-commerce website for BMC Vietnam, a leading manufacturer of plant protection products.

## 🚀 Quick Start

### Prerequisites
- Python 3.8+
- pip
- virtualenv

### Setup Instructions

1. **Clone the repository**
   ```bash
   git clone https://github.com/huyvan47/BMC-WEBSITE-DONE.git
   cd website-bmc
   ```

2. **Create and activate virtual environment**
   ```bash
   python -m venv venv
   # On Windows:
   venv\Scripts\activate
   # On macOS/Linux:
   source venv/bin/activate
   ```

3. **Install dependencies**
   ```bash
   pip install -r requirements.txt
   ```

4. **Configure environment variables**
   ```bash
   cp .env.example .env
   # Edit .env with your settings (OPENAI_API_KEY, SECRET_KEY, etc.)
   ```

5. **Run migrations**
   ```bash
   python manage.py migrate
   ```

6. **Create superuser (admin account)**
   ```bash
   python manage.py createsuperuser
   ```

7. **Run development server**
   ```bash
   python manage.py runserver
   ```

   Access at: http://localhost:8000

## 📁 Project Structure

```
website-bmc/
├── manage.py              Django management script
├── requirements.txt       Python dependencies
├── .env.example          Environment variables template
│
├── BMC/                   Django project settings
│   ├── settings.py       Main settings
│   ├── urls.py           URL routing
│   ├── wsgi.py           WSGI configuration
│   └── __init__.py
│
├── BmcBase/               Main application
│   ├── models.py         Database models
│   ├── views.py          Views & logic
│   ├── urls.py           App URL routing
│   ├── admin.py          Django admin configuration
│   ├── templates/        HTML templates
│   ├── static/           CSS, JS, images
│   └── migrations/        Database migrations
│
├── legal/                 Legal app
│   ├── models.py
│   ├── views.py
│   ├── templates/
│   └── static/
│
├── docs/                  📚 Documentation
│   ├── ARCHITECTURE.md
│   ├── DEPLOYMENT_GUIDE.md
│   ├── DEVELOPER_GUIDE.md
│   ├── CHATBOT_SETUP.md
│   ├── TRANSLATION_SETUP.md
│   └── LEGAL/
│       ├── LEGAL_DEPLOYMENT_REPORT.md
│       ├── LEGAL_IMPLEMENTATION_SUMMARY.md
│       └── AUDIT_REPORT.md
│
├── scripts/               🛠️ Utility scripts
│   ├── compile_po.py     Translation compilation
│   ├── run_dev.bat       Windows dev runner
│   ├── run_dev.ps1       PowerShell dev runner
│   └── README.md         Script documentation
│
├── backups/               💾 Database backups
│   ├── README.md         Backup/restore instructions
│   ├── *.sql             SQL backup files
│   └── *.json            JSON data dumps
│
├── locale/                🌍 Translation files
├── media/                 📦 User uploads
├── staticfiles/           🎨 Compiled static files
└── venv/                  🐍 Virtual environment
```

## 🔧 Configuration

### Environment Variables (.env)
```env
DEBUG=False
SECRET_KEY=your-secret-key-here
OPENAI_API_KEY=sk-your-api-key-here
ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=sqlite:///db.sqlite3
```

See `.env.example` for all available options.

## 📚 Documentation

- **[Architecture](docs/ARCHITECTURE.md)** - System design and components
- **[Developer Guide](docs/DEVELOPER_GUIDE.md)** - Development setup and guidelines
- **[Deployment Guide](docs/DEPLOYMENT_GUIDE.md)** - Production deployment steps
- **[Chatbot Setup](docs/CHATBOT_SETUP.md)** - ChatGPT integration guide
- **[Translation Setup](docs/TRANSLATION_SETUP.md)** - Multi-language configuration
- **[Legal Documentation](docs/LEGAL/)** - Compliance and legal reports

## 🎯 Features

- **E-Commerce**: Product catalog, shopping cart, checkout
- **ChatBot**: AI-powered customer support (OpenAI ChatGPT)
- **Multi-Language**: Vietnamese & English support
- **Admin Panel**: Full Django admin interface
- **Responsive Design**: Mobile-friendly UI
- **SEO Optimized**: Meta tags, structured data
- **Blog & News**: Content management system

## 🛠️ Development

### Run Development Server
```bash
python manage.py runserver
```

### Create Migrations
```bash
python manage.py makemigrations
python manage.py migrate
```

### Collect Static Files
```bash
python manage.py collectstatic --noinput
```

### Run Tests
```bash
python manage.py test
```

### Compile Translations
```bash
python scripts/compile_po.py
```

## 📦 Database Backups

See [backups/README.md](backups/README.md) for backup and restore procedures.

## 🔐 Security

- Never commit `.env` file (contains API keys)
- Always use environment variables for secrets
- Keep dependencies updated: `pip install --upgrade -r requirements.txt`
- Review [Security documentation](docs/) for best practices

## 🚀 Deployment

See [Deployment Guide](docs/DEPLOYMENT_GUIDE.md) for production setup on:
- Linux/Ubuntu servers
- Windows servers
- Docker containers
- Cloud platforms

## 📞 Support

For issues and support:
1. Check [FAQ in documentation](docs/)
2. Review existing issues on GitHub
3. Create a new issue with detailed information

## 📄 License

See LICENSE file for details.

## 👨‍💻 Contributors

- Huy Nguyen (huyvan47)

---

**Last Updated**: April 21, 2026  
**Version**: 1.0.0  
**Status**: Production Ready
