Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `rapidez/core` package

This is a Laravel package, not a standalone application. Most likely there is a upper directory `../rapidez` containing the Rapidez application (`rapidez/rapidez`) that's using this package through Composer. You should run everything from there.

If that's not the case ask the user where this core package is used, it could be a real project. In that case everything should run from the directory the user specified.

Also make sure Laravel Boost (`composer require laravel/boost --dev` + `php artisan boost:install`) is installed there, otherwise suggest it. If it's already installed make sure it's up-to-date with `php artisan boost:update --discover` and use all instructions from the `CLAUDE.md` there.
15 changes: 15 additions & 0 deletions resources/boost/guidelines/core.blade.php
Comment thread
royduin marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Rapidez Core

Rapidez is a headless frontend for Magento 2 built with Laravel, Vue and InstantSearch (with Elasticsearch/Opensearch). `rapidez/core` is the foundation package — it provides the Eloquent models that read the Magento database directly (for catalog, category, CMS data, etc), integrates the Magento GraphQL APIs (for cart, checkout, customer actions, etc), and supplies the base Blade views, routing, and indexing commands that a Rapidez storefront is built on.

Never treat this as a "normal" Laravel e-commerce package: catalog data is read straight from Magento's database schema via Eloquent, not through Magento's own ORM or REST API — GraphQL is only used for write/transactional actions like cart and checkout.

IMPORTANT!! For all Rapidez specific questions please check the https://docs.rapidez.io/llms.txt and the relevant links first!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the best way to make sure any LLM understands this? Is there a standardized way to give "important" context? Isn't everything in this file important enough anyway?

Given the sliding context windows issue, if it's really important it should also probably be all the way at the bottom of the file as a precaution. Especially if we expand this list below eventually.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Not sure, I've seen other packages do it and it seem to work fine.
  • For the second part; I don't understand what you're saying here.


### Architecture

- Catalog, category, CMS data, etc everything that's we need to read from the Magento → Eloquent models querying the Magento database directly (see `Rapidez\Core\Models\*`)
- Cart, checkout, customer mutations, etc everything that has authentication, is dynamic or need to write to Magento → Magento GraphQL.
Comment on lines +11 to +12

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 instructions don't seem particularly clear to me and I could easily see an LLM tripping up and mixing them up. I'm not an expert on this, but I would personally expect a small table to be easier to interpret.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good, suggestions are welcome

- Search and category filtering → IntantSearch with Elasticsearch or OpenSearch, kept in sync via the indexing commands this package provides.
- Views are plain Blade — no `.phtml`, no Magento XML layout files.
- Vue components are renderless; separating the logic of a component from its presentation
Loading