How lurkerwin22/erp works
Anypli ERP is a Laravel web application for managing sales, purchasing, inventory, customer debts, quotes, and business reporting, with an ERP-focused AI assistant. The main workflow is a user submitting an operation through the web interface; controllers validate and process it, update business records and stock where applicable, then render a result. The AI branch stores conversation history and routes messages to an agent. Sampled controller excerpts support several links; other modules are included from the README and tree, so their internal wiring is not inferred.
Main entry points: web.php Web routes · Models Business records · AiAgentService.php AI agent · SaleController.php Sales and invoices
Components 25
Web experience
- Web routes
routes/web.php - Blade screens
resources/views - Browser interactions
resources/js/app.js
ERP operations
- Sales and invoices
app/Http/Controllers/SaleController.php - Purchasing
app/Http/Controllers/PurchaseController.php - Quotes
app/Http/Controllers/QuoteController.php - Stock management
app/Http/Controllers/StockController.php - Products and categories
app/Http/Controllers/ProductController.php - Customer management
app/Http/Controllers/CustomerController.php - Supplier management
app/Http/Controllers/SupplierController.php - Debt management
app/Http/Controllers/DebtController.php
Reporting and AI
- Dashboard
app/Http/Controllers/DashboardController.php - Report API
app/Http/Controllers/Api/ReportController.php - AI assistant endpoint
app/Http/Controllers/Ai/AiAssistantController.php - Conversation service
app/Services/Ai/AiConversationService.php - AI agent
app/Services/Ai/Services/AiAgentService.php - Intent routing
app/Services/Ai/Services/IntentRouter.php - Tool registry
app/Services/Ai/Services/ToolRegistry.php - ERP query tools
app/Services/Ai/Tools
Access and records
- Business records
app/Models - Application database
config/database.php - Authentication and roles
app/Http/Controllers/SessionController.php - Role enforcement
app/Http/Middleware/RoleMiddleware.php
Other components
- ERP user
- LLM service
Connections 32
- ERP user → Web routes: submits requests
- Web routes → Sales and invoices: dispatches
- Web routes → Purchasing: dispatches
- Web routes → Quotes: dispatches
- Web routes → Stock management: dispatches
- Web routes → Products and categories: dispatches
- Web routes → Customer management: dispatches
- Web routes → Supplier management: dispatches
- Web routes → Debt management: dispatches
- Web routes → Dashboard: dispatches
- Web routes → Report API: dispatches
- Web routes → AI assistant endpoint: dispatches
- Web routes → Authentication and roles: dispatches
- ERP user → Browser interactions: uses interactions
- Sales and invoices → Business records: reads and updates
- Purchasing → Business records: reads and updates
- Quotes → Business records: reads and updates
- Business records → Application database: persists records
- Sales and invoices → Blade screens: renders screens
- Purchasing → Blade screens: renders screens
- Quotes → Blade screens: renders screens
- AI assistant endpoint → Conversation service: stores messages
- AI assistant endpoint → AI agent: sends context
- Conversation service → Business records: reads and writes
- AI agent → Intent routing: routes intent
- AI agent → Tool registry: dispatches tools
- Tool registry → ERP query tools: selects tool
- ERP query tools → Business records: queries ERP data
- AI agent → LLM service: requests completion
- Report API → ERP query tools: executes report tools
- Authentication and roles → Role enforcement: checks access
- Role enforcement → Web routes: guards routes