2.0 KiB
2.0 KiB
AI Assistant Navigation Guide
Reading Strategy
Start Here
- repo-overview.md - Understand the project purpose, technologies, and high-level structure
- architecture.md - Learn module interactions and data flows
Locating Code
- Use file-map.json to find which module contains your target file
- Use function-index.json to locate specific functions/classes by name
Reading Details
- Read the corresponding module/*.md for component-level understanding
- Read file/*.md for implementation details
When to Open Source Files
Only open original source files when:
- Implementation details are not documented
- Debugging requires exact line numbers
- Understanding edge cases not covered in documentation
Quick Reference
| Task | Best Approach |
|---|---|
| Find login logic | Check LoginController in function-index.json, then read app/Http/Controllers/LoginController.php |
| Add new user role | Modify app/Enums/UserTypes.php, update permissions in UserPermissions |
| Create new product API | Add route in routes/web.php, create controller in app/Http/Controllers/Market/ |
| File upload handling | Use FilesMainController@UploadFilefromRequest |
Common Operations
Adding a New Page
- Update
file-map.jsonto add file mapping - Create Vue component in
resources/js/Pages/ - Add route in
routes/web.php - Create controller if needed
- Update viewmap config if server-side rendering required
Modifying User Permissions
- Check
UserActionsenum inapp/Enums/UserActions.php - Review
UserPermissions::isActionPermitted()logic - Update role matrix as needed
Debugging API Endpoints
- Find route in
routes/web.php - Locate controller from function-index.json
- Check middleware requirements in
Kernel.php
Architecture Tips
- Vue Router: SPA routes handled via Vue's client-side routing
- Server Rendering: Use
/p/{page}/s/for server-rendered pages - Permissions: Role checking happens via
canDo()method on User model