Use Case


Use case - 图1

Throughout this documentation we are going to assume that we are building an accounting application.

Requirements

  • MVC application using Phalcon\Mvc\Application
  • Store data in a database (MariaDB/MySQL)
  • Offer a UI for users to work
    • Login page
    • Administration area
      • Cache management
      • Permissions
      • Products CRUD
      • Users CRUD
    • Accounting department area
      • Invoices
      • Customers
      • Payments
    • Customer portal area
      • Invoices (view)
      • Payment
      • Reports

Groups - User roles

GroupDescription
GuestsUsers that are not logged in, visitors to the site
CustomersUsers that have purchased products
AccountingUsers of the accounting department
ManagersAccounting department managers
AdministratorsFull access to the whole application

Endpoints

EndpointDescription
/loginPath /session/login. Presents the login screen
/logoutPath /session/logout. Logs user out, redirects to /login
/portal/invoices/listList invoices for the currently logged in customer
/portal/invoices/view/{0-9}View invoice for the currently logged in customer
/portal/invoices/pay/{0-9}Pay invoice (payment gateway)
/portal/reports/listList available reports for the logged in customer
/portal/reports/view/{0-9}View report for this customer
/accounting/invoices/addAdd new invoice
/accounting/invoices/edit/{0-9}Edit an invoice
/accounting/invoices/view/{0-9}View an invoice
/accounting/invoices/listList all invoices
/accounting/invoices/void/{0-9}Void an invoice
/admin/cache/viewView all cache items
/admin/cache/delete/{0-9}Delete a cache item
/admin/cache/voidVoid the whole cache
/admin/permissions/listShow the current permissions
/admin/permissions/addAdd a new permission
/admin/permissions/edit/{0-9}Edit a permission
/admin/products/listList all products
/admin/products/addAdd a product
/admin/products/edit/{0-9}Edit a product
/admin/products/delete/{0-9}Delete a product
/admin/products/view/{0-9}View a product
/admin/users/listList all users
/admin/users/addAdd a user
/admin/users/edit/{0-9}Edit a user
/admin/users/delete/{0-9}Delete a user
/admin/users/view/{0-9}View a user