This repository contains the source code of Aikeedo's default theme that comes pre-built and embedded with the main Aikeedo software. As a licensed user, you have access to this source code and can either:
- Customize and rebuild the theme from source (recommended for developers)
- Make direct modifications to the built theme (suitable for non-technical users)
An open source default theme for Aikeedo built with a modern theme development starter kit for Aikeedo, using Vite.js for asset building and Twig for templating. This project compiles into a PHP Composer package that integrates with Aikeedo's theming system.
- Frontend:
- Alpine.js for JavaScript interactivity
- Tailwind CSS for styling
- Tabler Icons for iconography
- Backend:
- Twig templates for PHP templating
- Gettext for translations
- PHP Composer package structure
default/
├── src/ # Frontend source
│ ├── js/ # JavaScript files
│ │ ├── components/ # Custom elements
│ │ └── index.js # Main JS entry
│ └── css/ # CSS files
│ ├── base.css # Base styles
│ └── index.css # Main CSS entry
│
├── static/ # PHP package structure
│ ├── composer.json # Package definition
│ ├── templates/ # Twig template files
│ ├── sections/ # Reusable template sections
│ ├── snippets/ # Template partials
│ ├── layouts/ # Base layouts
│ ├── locale/ # Translation files (.po)
│
└── scripts/ # Build and utility scripts
├── pack.mjs # Theme packaging
├── release.mjs # Release creation
└── locale-extract.mjs # Translation extraction
- Node.js 18+ and npm (for asset building)
- Composer (for package installation in Aikeedo)
- Running Aikeedo installation
- Basic knowledge of:
- Alpine.js and Tailwind CSS
- Twig templating
- PHP Composer packages
-
Clone the Repository
git clone https://github.com/heyaikeedo/themes-default.git my-theme cd my-theme
-
Configure Your Theme Package
Edit
/static/composer.json
with your theme details:{ "name": "your-vendor/your-theme-name", "description": "Your theme description", "version": "1.0.0", "type": "aikeedo-theme", "homepage": "https://your-site.com", "license": "AIKEEDO", "authors": [ { "name": "Your Name", "email": "your.email@example.com", "homepage": "https://your-site.com", "role": "Developer" } ], "support": { "email": "support@your-site.com", "docs": "https://docs.your-site.com/" }, "require": { "heyaikeedo/composer": "^1.0.0" }, "extra": { "title": "Your Theme Title", "description": "Your theme description", "logo": "https://your-site.com/logo.png", "icon": "https://your-site.com/icon.png", "status": "active" }, "autoload": {} }
-
Set Up Environment
a. Create your local environment file:
cp .env .env.local
b. Configure
.env.local
with your paths:# Windows path example: BUILD_DIR=C:/xampp/htdocs/aikeedo/public/content/plugins/your-vendor/your-theme-name # Linux/Mac path example: BUILD_DIR=/var/www/aikeedo/public/content/plugins/your-vendor/your-theme-name # Aikeedo server URL (required for development) AIKEEDO_SERVER=http://localhost:8000
Critical: The final path segments (
your-vendor/your-theme-name
) MUST match your composer.json package name! -
Install Dependencies
a. Install npm packages:
npm install
b. Verify installation:
# Should list alpinejs and other dependencies npm list
-
Start Development Server
npm run dev
This will:
- Start Vite dev server on port 5174
- Watch for file changes
- Copy static files to
BUILD_DIR
- Extract translations automatically
-
Configure Aikeedo
Add or update these settings in your Aikeedo's
.env
file:# Required for development THEME_ASSETS_SERVER=http://localhost:5174/ # Set environment to development ENVIRONMENT=dev # Enable debug mode for development DEBUG=1 # Disable caching for development CACHE=0
-
Verify Installation
# Your theme should be here ls /path/to/aikeedo/public/content/plugins/your-vendor/your-theme-name
-
Activate Your Theme
a. Log into Aikeedo admin panel b. Navigate to: Themes c. Find your theme in the list d. Click "Publish" to activate
-
Verify Development Setup
Check these points:
- Vite dev server running (http://localhost:5174)
- Static files copied to BUILD_DIR
- Theme visible in Aikeedo admin
- CSS/JS changes reflect immediately
- Twig template changes trigger reload
- Translations being extracted
If theme assets aren't loading:
- Verify THEME_ASSETS_SERVER in Aikeedo's .env
- Ensure Vite server is running
- Check proxy settings in vite.config.mjs
- Clear Aikeedo's cache
- Check BUILD_DIR path is correct
- Instant CSS updates via Tailwind
- Alpine.js component reloading
- Full page reload for Twig changes
- Automatic static file copying
- Automatic string extraction to PO files
- Multiple language support
- Translation file watching
- Uses PHP's Gettext
<!-- Dark/Light Mode Switcher -->
<mode-switcher>
<button class="text-2xl">
<i class="ti ti-moon-stars dark:hidden"></i>
<i class="hidden ti ti-sun-filled dark:block"></i>
</button>
</mode-switcher>
<!-- Avatar Component -->
<x-avatar title="User Name" src="/path/to/avatar.jpg" length="2"></x-avatar>
{% extends "@theme/layouts/theme.twig" %}
{% block template %}
<div class="container">
{% include "@theme/sections/header.twig" %}
{{ content }}
</div>
{% endblock %}
Command | Purpose |
---|---|
npm run dev |
Start Vite development server |
npm run build |
Build production assets |
npm run serve |
Preview production build |
npm run locale |
Extract translatable strings |
npm run pack |
Create installable theme package |
npm run release |
Create distribution package |
-
Assets Not Loading
- Verify Vite server is running (port 5174)
- Check AIKEEDO_SERVER setting
- Verify proxy settings in vite.config.mjs
-
Template Changes Not Reflecting
- Check BUILD_DIR permissions
- Verify Twig file locations
- Clear Aikeedo's cache
-
Build Problems
- Verify all paths in .env.local
- Check write permissions
- Review Vite build output
- Review Aikeedo Documentation
- Check GitHub Issues
For users who want to make simple modifications without rebuilding the theme, you can modify the pre-built version directly. However, it's recommended to create a copy first to preserve your changes during software updates.
The app doesn't include a UI theme editor yet. To customize the built-in landing page, you should make modifications through code. Although it's possible to alter the default theme, it's recommended to duplicate the theme and make your changes there. This approach ensures that your customizations are not lost during app updates.
Follow these steps:
- Duplicate the default theme located at
/public/content/plugins/heyaikeedo/default
to a new location within/public/content/plugins/
, e.g.,/public/content/plugins/yourorganization/themename
- In the duplicated theme, update the
composer.json
file to reflectyourorganization/themename
as the theme name to match its location - Activate your new theme on the Themes page in the admin UI
- Enable debug mode in the app
- Make necessary changes to the new theme files
- Clear the app cache
- Disable debug mode
- Always work on a copy of the theme to prevent losing changes during updates
- Remember to clear the cache after making changes
- Keep debug mode enabled only while making changes