This file provides guidance to WARP (warp.dev) when working with code in this repository.
- Install dependencies:
npm install - Development build with watch:
npm run dev(runsgulp) - Production build:
npm run build(runsgulp build) - Lint backend JS:
gulpincludes JSHint for backend JS files
- Install dependencies:
cd editor && npm install - Development server:
cd editor && npm start(runsng serveon http://localhost:4200) - Build for development:
cd editor && npm run dev(builds with watch) - Build for production:
cd editor && npm run build - Run tests:
cd editor && npm test
- Install dependencies:
cd _api_app && composer install - Development server:
cd _api_app && npm run dev(Vite dev server) - Build assets:
cd _api_app && npm run build - Run tests:
cd _api_app && ./vendor/bin/pest - Run tests (CI mode):
cd _api_app && ./vendor/bin/pest --ci
Berta is a file-based CMS consisting of three main components that work together:
- Legacy PHP Engine (
engine/directory) - Original Berta CMS core - Angular Editor (
editor/directory) - Modern admin interface built with Angular 8 - Laravel API (
_api_app/directory) - REST API backend using Laravel 12
- Compiles SCSS to CSS for multiple templates
- Concatenates and minifies JS/CSS assets
- Builds separate bundles for frontend and backend
- Template-specific SCSS compilation for themes in
_templates/
- Templates located in
_templates/directory (default, messy, white, mashup) - Each template has its own SCSS files that are compiled separately
- Template CSS is built to template-specific directories
- NGXS state management for application state
- Component-based modular architecture with inline templates
- Outputs built files to
../engine/dist/
- Modern Laravel 12 application
- Pest testing framework
- Vite for asset compilation
- RESTful API structure
- Main site:
index.php(delegates toengine/index.php) - Editor interface: Angular app served from
engine/dist/ - API endpoints: Laravel routes in
_api_app/routes/
- Frontend assets: Use
npm run devin root for CSS/JS compilation with watch - Admin interface: Use
npm startineditor/for Angular development server - API development: Use Laravel's built-in server or Vite dev server in
_api_app/
- Content stored in files (not database) as per CMS design
- Storage directory contains user uploads and content files