Archetype is a PHP-based headless CMS designed around a schema-driven HTTP API. It exposes content, users, files, and system operations exclusively through endpoints, without any built-in UI.
The API is role-based (ADMIN, EDITOR, PUBLIC) and relies on token authentication.
All content is validated against versioned schemas and stored as structured data.
This repository contains:
specs.md: the authoritative functional and technical specificationchecklist.md: the active development roadmap- The core framework implementation
dashboard.php: Internal system diagnostic and dashboard tool
Archetype is designed to be:
- framework-agnostic
- easy to self-host
- suitable for custom admin panels and frontends
- production-oriented with explicit configuration and validation
The project documentation is intentionally centralized and kept up to date.
specs.md- Complete architecture and API reference.checklist.md- Living development roadmap.
Each endpoint is described with its HTTP method, route, expected parameters, and a short functional description.
Any change to the API must be reflected in api.md.
- PHP 8.0 or newer
- Composer & Git
- A web server (Apache with
mod_rewriteenabled) - Database: SQLite or MySQL
git clone https://github.com/qmisslin/archetype.git
cd archetype
composer install
The web server (e.g., www-data or _www) requires write access to several directories for logging, database management, and uploads:
# Example for Linux/macOS to allow PHP write access
mkdir -p data logs uploads
chmod -R 775 data logs uploads
# Ensure your web server user owns these directories
sudo chown -R _www:_www data logs uploads
cp .env.example .env
Edit .env and configure:
DB_TYPE(SQLITE or MYSQL)SMTP_PORT(Recommended: 587) andSMTP_SECURE(Recommended: tls)
Archetype supports MySQL for production-grade environments.
brew install mysql
brew services start mysql
mysql -u root -e "CREATE DATABASE archetype_db;"
Archetype relies on .htaccess for URL rewriting to handle API endpoints.
Ensure mod_rewrite is enabled in your httpd.conf:
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
Ensure AllowOverride All is set for the project directory to permit Archetype to manage routing and security:
<Directory "/path/to/archetype">
AllowOverride All
Require all granted
</Directory>After installation, access the diagnostic dashboard to verify your configuration:
- Diagnostic Dashboard:
http://127.0.0.1:8080/dashboard.php - This tool verifies:
- Filesystem writability (Logs, Uploads, Data)
- Critical file presence (.env, vendor, composer)
- Apache URL rewriting for API routes
- Security folder protections
Core infrastructure is in place.
- Core bootstrap and routing
- Environment validation
- Database layer (SQLite / MySQL)
- Logging system and API
- Email service (SMTP)
- User authentication and login
- System Diagnostic Dashboard
- Content entries and advanced search
- Permissions and access control refinement
See checklist.md for the detailed and up-to-date roadmap.
MIT License.
You are free to use, modify, and distribute this project in both open-source and commercial contexts.
See LICENSE.md for details.