How jacksonhoran/blog-app works
Blog App is a Vue 3 client backed by a CakePHP JSON API and MySQL. Readers browse public articles; users can register and log in, and authenticated authors can create or edit articles. The frontend routes views, manages session state, and sends API requests; backend controllers handle article and user operations through CakePHP authentication and authorization, with model tables/entities persisting domain data. The README also documents database-backed operation. Edges are limited to relationships shown in the supplied excerpts, SOURCE INDEX references, or README; several frontend views and persistence connections are therefore not asserted.
Main entry points: api.js HTTP API client · ArticlesController.php Article endpoints · UsersController.php User endpoints · main.js Client bootstrap
Components 22
Vue client
- App shell
frontend/src/App.vue - Client bootstrap
frontend/src/main.js - Page routing
frontend/src/router/index.js - Article views
frontend/src/views - Article form
frontend/src/components/ArticleForm.vue - Login and registration
frontend/src/views - Auth state
frontend/src/composables/useAuth.js - HTTP API client
frontend/src/services/api.js - Article prefetch
frontend/src/directives/prefetch.js
CakePHP API
- Request middleware
backend/src/Application.php - Host validation
backend/src/Middleware/HostHeaderMiddleware.php - Article endpoints
backend/src/Controller/ArticlesController.php - User endpoints
backend/src/Controller/UsersController.php
Domain and persistence
- Article persistence
backend/src/Model/Table/ArticlesTable.php - Article entity
backend/src/Model/Entity/Article.php - User persistence
backend/src/Model/Table/UsersTable.php - User entity
backend/src/Model/Entity/User.php
Identity and access
- Authentication setup
backend/src/Application.php - Controller components
backend/src/Controller/AppController.php - Article policy
backend/src/Policy/ArticlePolicy.php
Other components
- Reader or author
- MySQL database
Connections 23
- Reader or author → App shell: uses
README.md - App shell → Page routing: renders routes
frontend/src/App.vue - Client bootstrap → App shell: mounts
frontend/src/main.js - Client bootstrap → Page routing: installs
frontend/src/main.js - Client bootstrap → Auth state: clears on 401
frontend/src/main.js - Article views → HTTP API client: requests data
- Article form → HTTP API client: submits articles
- Login and registration → HTTP API client: requests identity
- Auth state → HTTP API client: checks status
frontend/src/composables/useAuth.js - Article prefetch → HTTP API client: prefetches data
- HTTP API client → Article endpoints: HTTP requests
README.md - HTTP API client → User endpoints: HTTP requests
README.md - Request middleware → Host validation: adds middleware
backend/src/Application.php - Request middleware → Authentication setup: configures
backend/src/Application.php - Article endpoints → Controller components: inherits components
backend/src/Controller/ArticlesController.php - User endpoints → Controller components: inherits components
backend/src/Controller/UsersController.php - Article endpoints → Article persistence: reads and saves
backend/src/Controller/ArticlesController.php - Article endpoints → Article entity: creates entities
backend/src/Controller/ArticlesController.php - User endpoints → User persistence: reads and saves
- User endpoints → User entity: handles users
backend/src/Controller/UsersController.php - Article endpoints → Article policy: authorizes edits
- MySQL database → Article persistence: stores records
README.md - MySQL database → User persistence: stores records
README.md