https://github.com/pasan93/opengovui
An Open Source UI for Government Web sites and Web apps.
https://github.com/pasan93/opengovui
e-gov e-governance e-government government sri-lanka srilanka
Last synced: about 2 months ago
JSON representation
An Open Source UI for Government Web sites and Web apps.
- Host: GitHub
- URL: https://github.com/pasan93/opengovui
- Owner: pasan93
- License: mit
- Created: 2024-11-18T23:57:44.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-15T11:11:10.000Z (3 months ago)
- Last Synced: 2025-07-15T14:59:52.911Z (3 months ago)
- Topics: e-gov, e-governance, e-government, government, sri-lanka, srilanka
- Language: PHP
- Homepage: https://govui.openxs.org
- Size: 2.66 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenGovUI




A 100% open source modern, accessible, and multilingual website template designed specifically for government portals. Available as both a **static HTML template** and a **full WordPress CMS solution** with advanced multilingual support.
[Live Demo](https://govui.openxs.org)
## ๐ **Two Deployment Options**
### ๐ **Option 1: Static Template** *(Recommended for simple sites)*
Perfect for straightforward government portals that don't need content management.- **โ No server required** - Works with any web hosting
- **โ Fast loading** - Pure HTML/CSS/JavaScript
- **โ Easy deployment** - Just upload files
- **โ No database needed**### ๐๏ธ **Option 2: WordPress CMS** *(Recommended for dynamic content)*
Full content management system with advanced multilingual support and admin interface.- **โ Admin dashboard** - Manage content without coding
- **โ Custom post types** - Services, Categories, Government Updates
- **โ Polylang integration** - Professional multilingual support
- **โ REST API** - Advanced integration capabilities
- **โ Content population** - Automated content creation system
- **โ AI Translation System** - Claude Sonnet 3.7 powered auto-translation---
## ๐ Features
### ๐ฑ Responsive Design
- Mobile-first approach
- Fluid layouts that work across all device sizes
- Optimised navigation for both desktop and mobile users### โฟ Accessibility
- Skip to main content functionality
- ARIA labels where necessary
- Semantic HTML structure
- Government accessibility standards compliant### ๐ Advanced Multilingual Support
- **Polylang Integration**: Professional WordPress multilingual plugin support
- **Language Syncing**: Automatic synchronization of meta fields across translations
- **Smart Language Detection**: Automatic language mapping and detection
- **AI-Powered Translation**: Claude Sonnet 3.7 API integration for intelligent translations
- **Auto-Translation Manager**: Automated filling of missing translations with admin interface
- **Translation Scanning**: Intelligent detection of missing translations across all content
- **Content Synchronization**: Seamless content management across all languages
- Full support for **English (en_GB, en_US)**, **Sinhala (si_LK)**, and **Tamil (ta_LK)**### ๐จ Design Features [[memory:3285333]]
- Clean, professional government aesthetic with rounded, easy-to-read fonts
- FontAwesome 6.5.1 icons (CDN hosted)
- Service cards with intuitive icons
- Grid-based layouts for services and topics
- Social media integration
- Custom color schemes for categories### ๐ง WordPress CMS Advanced Features
- **Custom Post Types**:
- Government Services with rich metadata
- Service Categories with icons and colors
- Government Updates with featured content
- **Enhanced REST API**: Custom endpoints for all content types
- **Content Population System**: One-click content creation with sample data
- **Meta Field Management**: Service URLs, processing times, requirements, featured status
- **Admin Interface**: Custom admin pages for content management
- **Language-Aware Content**: All content respects current language context### ๐ค AI-Powered Translation System
- **Claude Sonnet 3.7 Integration**: Advanced AI for contextually accurate translations
- **Intelligent Translation Manager**:
- Scans all content for missing translations
- Automatically fills gaps using AI
- Maintains translation consistency across the site
- **Admin Dashboard**: Easy-to-use interface for managing translations
- One-click translation scanning
- Bulk auto-translation capabilities
- Translation backup and restore
- **Multi-Language Support**: Seamlessly translates between English, Sinhala, and Tamil
- **Government-Specific Context**: AI trained to understand government terminology and formal language
- **API Key Management**: Secure configuration for Claude API integration---
## ๐ **Quick Start - Static Template**
Perfect for simple government portals. No server or database required.
### Download Static Template
```bash
# Get the static template (v1.2.0)
git clone -b v1.2.0 https://github.com/pasan93/opengovui.git opengovui-static
cd opengovui-static
```### Deploy
1. **Local Development:**
```bash
python3 -m http.server 3000
```
Open http://localhost:30002. **Production:** Upload files to any web hosting service
---
## ๐๏ธ **Quick Start - WordPress CMS**
Full content management system with advanced multilingual capabilities.
### Requirements
- **PHP 8.4+**
- **MariaDB/MySQL**
- **Web server** (Apache/Nginx) or PHP built-in server
- **Polylang Plugin** (for full multilingual support)### Installation
```bash
# Get the WordPress version (v2.1.0)
git clone https://github.com/pasan93/opengovui.git opengovui-cms
cd opengovui-cms
```### Setup WordPress
1. **Download WordPress Core:**
```bash
curl -O https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
cp -r wordpress/* .
rm -rf wordpress latest.tar.gz
```2. **Setup Database:**
```bash
mariadb -u root < setup_database.sql
```3. **Start Server:**
```bash
php -S localhost:8080
```4. **Complete Installation:**
- Open http://localhost:8080
- Follow WordPress installation wizard
- **Install Polylang Plugin** for multilingual support
- Activate "OpenGovUI" theme
- **Configure AI Translation** (Optional):
- Add your Claude API key to wp-config.php: `define('CLAUDE_API_KEY', 'your-api-key');`
- Or configure via WordPress admin: Tools โ Auto Translation
- **Populate Content**: Use the built-in content population system
- **Auto-Translate Content**: Access Tools โ Auto Translation for AI-powered translations
- Start managing government services and content!๐ **[View Full WordPress Setup Guide](WORDPRESS_SETUP_GUIDE.md)**
---
## ๐ง Structure
### Static Template Structure
```
opengovui-static/
โโโ index.html # Main page
โโโ css/
โ โโโ styles.css # Styling
โโโ js/
โ โโโ i18n.js # Internationalization
โ โโโ script.js # Interactive features
โโโ images/
โโโ govt-logo.png # Government branding
```### WordPress CMS Structure
```
opengovui-cms/
โโโ wp-content/
โ โโโ themes/
โ โ โโโ opengovui/ # Custom government theme
โ โ โโโ style.css # Theme styles
โ โ โโโ index.php # Main template
โ โ โโโ front-page.php # Homepage template
โ โ โโโ header.php # Header template
โ โ โโโ footer.php # Footer template
โ โ โโโ functions.php # Theme functionality
โ โ โโโ single-gov_service.php # Service template
โ โ โโโ js/
โ โ โ โโโ multilingual.js # Polylang integration
โ โ โ โโโ admin-auto-translate.js
โ โ โโโ includes/
โ โ โโโ content-populator.php
โ โ โโโ translation-manager.php
โ โโโ plugins/
โ โ โโโ polylang/ # Multilingual support
โ โโโ languages/ # Translation files
โโโ wp-config.php # Database configuration
โโโ setup_database.sql # Database setup
โโโ WORDPRESS_SETUP_GUIDE.md
```---
## ๐ Key Components
### WordPress CMS Features (v2.1.0)
#### Custom Post Types & REST API
- **Government Services** (`/wp-json/wp/v2/gov_service`)
- Service icons, URLs, processing times
- Requirements and featured status
- Full multilingual support
- **Service Categories** (`/wp-json/wp/v2/service_category`)
- Custom icons and color schemes
- Multilingual category management
- **Government Updates** (`/wp-json/wp/v2/gov_update`)
- Featured updates and announcements
- Date-based sorting and archives#### Enhanced API Endpoints
```
/wp-json/opengovui/v1/featured-services?lang=en # Featured services
/wp-json/opengovui/v1/categories?lang=si # Service categories
/wp-json/opengovui/v1/updates?lang=ta # Government updates
/wp-json/opengovui/v1/services?lang=en # All services
```#### Content Population System
- **One-Click Setup**: Automatically creates sample government content
- **Multilingual Content**: Creates content in English, Sinhala, and Tamil
- **Realistic Data**: Government services, categories, and updates
- **Admin Interface**: Easy-to-use content management dashboard#### Polylang Integration
- **Advanced Language Management**: Professional multilingual plugin support
- **Meta Field Syncing**: Automatic synchronization of custom fields across languages
- **Language Detection**: Smart language mapping and detection
- **Translation Workflow**: Streamlined content translation process### i18n Implementation (Static Template)
The template uses a straightforward i18n system:1. **HTML Markup**: Uses `data-i18n` attributes for translatable content:
```htmlAccess government services and information in one place
```2. **Language Selection**: Simple language switcher in the header:
```html
```### Main Sections
- **Header** with Polylang language selector and search
- **Hero section** with featured services from WordPress
- **Topic categories** with dynamic icon navigation
- **Government updates** with content management
- **Footer** with important links and social media---
## ๐ Customisation
### WordPress CMS (Recommended)
- **Admin Dashboard**: Full WordPress interface for content management
- **Content Population**: Use the built-in system to create sample content
- **Service Management**: Add/edit services with icons, URLs, and metadata
- **Category Management**: Create categories with custom colors and icons
- **Update Publishing**: Manage government announcements and news
- **Multilingual Content**: Full translation support via Polylang
- **Custom Fields**: Rich metadata for all content types### Static Template
- Edit the HTML directly to change content
- Update the `data-i18n` attributes and corresponding translation files
- Modify icons by changing FontAwesome classes
- Customize CSS for branding### Styling
- WordPress version inherits all static template styling
- Edit theme's `style.css` for WordPress-specific customizations
- FontAwesome 6.5.1 included for comprehensive icon support
- Custom color schemes available for categories---
## ๐ Plugin Dependencies
### Required for Full Functionality
- **Polylang** (Free): Multilingual support
- Language management and switching
- Content translation workflow
- Meta field synchronization### Recommended
- **Classic Editor**: For traditional WordPress editing experience
- **Yoast SEO**: Enhanced SEO with multilingual support---
## ๐ **Version History**
- **v2.1.0** - Enhanced WordPress CMS with Polylang Integration (Current)
- Full Polylang multilingual plugin support
- **AI-powered translation system** with Claude Sonnet 3.7 integration
- Advanced REST API endpoints
- Content population system
- Intelligent translation manager with admin dashboard
- Enhanced admin interface
- **v2.0.0** - WordPress CMS Integration
- **v1.2.0** - Complete Static Template with Tamil translations
- **v1.1.0** - Fira Sans typography update
- **v1.0.0** - Initial static template release---
## ๐ **API Documentation**
### REST API Endpoints
#### Custom OpenGovUI Endpoints
```bash
# Get featured services
GET /wp-json/opengovui/v1/featured-services?lang=en# Get service categories
GET /wp-json/opengovui/v1/categories?lang=si# Get government updates
GET /wp-json/opengovui/v1/updates?lang=ta# Get all services
GET /wp-json/opengovui/v1/services?lang=en&category=health
```#### Standard WordPress Endpoints
```bash
# Government Services
GET /wp-json/wp/v2/gov_service# Service Categories
GET /wp-json/wp/v2/service_category# Government Updates
GET /wp-json/wp/v2/gov_update
```All endpoints support language parameters and return properly formatted content with metadata.
---
## ๐ Licence
This project is licensed under the MIT Licence - see the [LICENCE](LICENSE) file for details.
## ๐ค Contributing
Contributions are welcome! Feel free to submit pull requests or open issues for any improvements.
## ๐ Support
For support, please open an issue in the [GitHub repository](https://github.com/pasan93/opengovui/issues).
---
Made with โค๏ธ in ๐ฑ๐ฐ for better government services