Initial commit: UK Data Services website

This commit is contained in:
Peter
2025-06-07 10:53:32 +01:00
commit 3e9968f1b4
63 changed files with 6597 additions and 0 deletions

232
README.md Normal file
View File

@@ -0,0 +1,232 @@
# UK Data Services - Professional Website
A modern, secure, and SEO-optimized website for UK Data Services built with PHP, HTML, CSS, and JavaScript.
## Features
### 🚀 **Modern Design & UX**
- Professional gradient designs and animations
- Fully responsive layout for all devices
- Modern typography with Inter font family
- Smooth scrolling and interactive elements
- Loading states and micro-animations
### 🔒 **Advanced Security**
- Content Security Policy (CSP) headers
- XSS protection and CSRF tokens
- Rate limiting on forms
- Input validation and sanitization
- Secure email handling
- Protection against common attacks
### 📈 **SEO Optimized**
- Schema.org structured data
- Open Graph and Twitter Card meta tags
- Semantic HTML structure
- Optimized meta descriptions and titles
- XML sitemap generation
- Robots.txt configuration
- Clean URL structure
### 💼 **Professional Features**
- Advanced contact form with auto-reply
- Detailed quote request system
- Email logging and tracking
- Professional email templates
- Mobile-first responsive design
- Performance optimizations
### ⚡ **Performance**
- Lazy loading images
- Compressed CSS/JS
- Browser caching headers
- Optimized file structure
- Minimal dependencies
## File Structure
```
ukdataservices-new/
├── index.php # Main homepage
├── quote.php # Quote request page
├── contact-handler.php # Contact form processor
├── quote-handler.php # Quote form processor
├── 404.php # Custom 404 error page
├── .htaccess # Apache configuration
├── robots.txt # SEO crawler instructions
├── sitemap.xml # XML sitemap
├── assets/
│ ├── css/
│ │ └── main.css # Main stylesheet
│ ├── js/
│ │ └── main.js # Interactive JavaScript
│ └── images/ # Image assets directory
└── logs/ # Auto-created for form submissions
```
## Installation & Setup
### 1. **Server Requirements**
- Apache web server with mod_rewrite enabled
- PHP 7.4 or higher
- Linux/Unix environment
- SSL certificate (recommended)
### 2. **Upload Files**
Upload all files to your web server's document root (typically `/var/www/html/` or `/public_html/`)
### 3. **Configure Apache**
Ensure your Apache configuration allows:
- `.htaccess` files
- `mod_rewrite` module
- `mod_headers` module
- `mod_deflate` module (for compression)
### 4. **Set Permissions**
```bash
# Set proper permissions
chmod 755 /path/to/website/
chmod 644 /path/to/website/*.php
chmod 644 /path/to/website/.htaccess
chmod 755 /path/to/website/assets/
chmod -R 644 /path/to/website/assets/
chmod 755 /path/to/website/logs/ (will be auto-created)
```
### 5. **Configure Email**
Update email addresses in:
- `contact-handler.php` (line 140: `$to = 'your-email@domain.com';`)
- `quote-handler.php` (line 178: `$to = 'your-email@domain.com';`)
### 6. **SSL Certificate**
Install SSL certificate and uncomment HTTPS redirect in `.htaccess`:
```apache
# Uncomment these lines after SSL is configured:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
```
### 7. **Add Images**
Place your logo and images in `assets/images/`:
- `logo.svg` - Main logo
- `logo-white.svg` - White version for footer
- `favicon.ico` - Favicon
- `hero-data-analytics.svg` - Hero section image
- Various service icons (see HTML for complete list)
## Configuration Options
### **Email Configuration**
The contact and quote forms send HTML emails. Configure your server's mail settings or use SMTP:
```php
// For SMTP configuration, modify the mail() calls in handlers
// Consider using PHPMailer for enhanced email features
```
### **Security Headers**
All security headers are configured in `.htaccess`. Adjust CSP policy if needed:
```apache
Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; ..."
```
### **Rate Limiting**
Contact form: 5 submissions per hour per IP
Quote form: 3 submissions per hour per IP
Adjust in respective handler files:
```php
// Change rate limits here
if ($data['count'] >= 5) { // Modify this number
```
## Customization
### **Colors & Branding**
Main brand colors in `assets/css/main.css`:
```css
/* Primary gradient */
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
/* Update these hex codes to match your brand */
```
### **Content Updates**
- Update phone number: Search for `+44 1692 689150`
- Update email: Search for `info@ukdataservices.co.uk`
- Modify service descriptions in `index.php`
- Update company information in structured data
### **Adding New Pages**
1. Create new PHP file
2. Include security headers
3. Add to `sitemap.xml`
4. Update navigation in all files
## Monitoring & Maintenance
### **Log Files**
Monitor these auto-generated log files:
- `logs/contact-submissions.log` - Successful contact submissions
- `logs/contact-errors.log` - Contact form errors
- `logs/quote-requests.log` - Quote requests
- `logs/quote-errors.log` - Quote form errors
### **Regular Tasks**
- Monitor log files for errors
- Update content regularly for SEO
- Check SSL certificate expiration
- Review security headers
- Backup website files and logs
### **Performance Monitoring**
- Use Google PageSpeed Insights
- Monitor Core Web Vitals
- Check GTmetrix scores
- Monitor server response times
## Security Best Practices
1. **Keep PHP Updated**: Always use the latest stable PHP version
2. **Regular Backups**: Backup files and logs regularly
3. **Monitor Logs**: Check error logs for suspicious activity
4. **SSL Only**: Force HTTPS for all pages
5. **Rate Limiting**: Monitor and adjust rate limits as needed
6. **Input Validation**: All user inputs are validated and sanitized
## SEO Features
- **Structured Data**: Schema.org markup for better search results
- **Meta Tags**: Optimized titles, descriptions, and keywords
- **Social Media**: Open Graph and Twitter Card support
- **XML Sitemap**: Auto-generated sitemap for search engines
- **Clean URLs**: SEO-friendly URL structure
- **Performance**: Fast loading times for better rankings
## Support
For technical support or customization requests:
- Review the code comments for guidance
- Check Apache error logs for server issues
- Ensure all file permissions are correct
- Verify email configuration is working
## Browser Compatibility
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
## License
Professional website code for UK Data Services. All rights reserved.
---
**Created**: June 2025
**Version**: 1.0
**Framework**: Pure PHP/HTML/CSS/JavaScript
**Server**: Apache/Linux optimized