Requirements
Requirements
Stack
Below is a guideline for the base dev stack.
Application Architecture
A monolithic approach will be accepted; however, a hybrid approach, similar to the use of Laravel
Jetstream with Inertia.js, will be preferred to keep things simple while also providing a modern and
dynamic user interface.
Design / Layout
A theme/template will be supplied and must be integrated into the application. Elements from the theme
must be utilized to set up the page layouts and elements effectively. The provided theme/template is
essential for maintaining consistency in the UI/UX design.
Theme/Template:
Registration / Authentication
The application will implement a standard Laravel login setup, incorporating roles and permissions to
manage user access and functionality. This setup will ensure secure and efficient user management,
aligning with best practices for authentication and authorization.
Authentication:
Utilize Laravel's built-in authentication features to handle user registration, login, and password
management.
Ensure standard secure handling of user credentials, including password encryption and
protection against common security threats.
Roles and Permissions:
Store roles and permissions in the database, allowing for dynamic assignment and modification.
Security Considerations:
Ensure that role and permission checks are enforced on both the server side and the client side to
prevent unauthorized access.
SuperUser
The superuser will simply have a Dealership(See Dealership below) and Manage Users(see User
Management below) section for now.
It should however be possible for SuperUser to have access to any dealership admin account to navigate
as that specific Admin user(this should not require an additional login, but rather just to navigate to the
account with the use of a “Log in as Dealership” on the Dealership list item.).
That will give SuperUser a full view of the specific account and can navigate as an Admin user.
Dealership:
This is where SuperUser can create a Dealership with basic detail. Once the Dealership is created an
Admin user can be created and assigned to the Dealership. This is where the Dealership and Admin
Account are linked. Any user that Admin creates from this account will be linked to the Dealership. All
other table data (vehicles, costs, notes, invoices etc.) is then related to this Dealership ID.
Dealership List:
A paginated list of dealerships should be available. From this list an Admin user can choose to edit/ /view
a dealership record.
An Add Dealership button will also be clickable to add new cost record.
When clicking on Add:
A popup with all user details should be displayed including logo image.
It will have a button to edit the user.
When clicking on Edit:
Dealership Name
Address (Multiple Fields)
Registration Number
VAT Number
Phone
Email
Logo (This logo will be used for the logo that displays in the header of the site, as well as any
invoices, emails, otp’s etc.)
Timstamps
Permissions:
Only SuperUser has access to this section.
List
o SuperUser sees all
Add / Edit / Delete
o SuperUser can add/edit
User Management:
An Admin user should be able to manage users for the Dealership. Admin can assign roles to the new
user, but the Admin user type will not be available.
Note: The admin user type is only available for Superuser.
List:
A paginated list of users should be available. From this list an Admin user can choose to edit/delete/view
a user record.
An Add User button will also be clickable to add new cost record.
When clicking on Add:
List
o Admin sees all for Dealership
o Sales does not see users
o Manager sees all for Dealership
o Finance does not see users
Add / Edit / Delete
o Admin can add/edit
o Sales cannot add/edit
o Manager can add/edit
o Finance cannot add/edit
CRM
The CRM section as the heading suggests is an area where clients can be managed. Users will be able to
create, update, view and delete client details as well as communicate with the client.
List:
A paginated list of clients should be available. From this list a User can choose to edit/delete/view a client
record.
An Add Client button will also be clickable to add new client record.
When clicking on Add:
Search (a search field is available to find client based on name, surname, email, phone)
Salesman (ADMIN ONLY, filters all records assigned to specific salesman user)
Stage (Filters records based on Stage set: Contact Not Made, Contact Made, Meeting Scheduled,
Visited, Deal Closed, Time Waster, Archived)
Date Created (Date Range filter to find clients added in a set period)
CRUD:
A User can Create, Update, Delete a client record.
Fields in client record:
Dealership ID
User ID (default to Admin user)
Name
Surname
Phone
Email
Source
This will be used to push leads to the system from landing pages or similar.
Permissions:
List
o Admin sees all for Dealership
o Sales sees all client records assigned to user id
o Manager sees all
o Finance sees all
Add / Edit / Delete
o Admin can edit
o Sales can edit
o Manager can edit
o Finance can edit
Notes / Communication
o Admin can add and send
o Sales can add and send
o Manager can add
o Finance can add
Stock/Vehicle Management
The Stock Management section is used for managing vehicles within a dealership. Vehicles can be
viewed, added, updated, deleted. An additional section also allows a user to add costs connected to a
vehicle. The Costs section will also be a basic crud setup where a user can view, add, update, delete costs.
The costs will form part of some reports in the Reporting section. See Costs section for more detail on
costs setup.
List:
A paginated list of vehicles should be available. From this list a User can choose to edit/delete/view a
vehicle record.
An Add Vehicle button will also be clickable to add new client record.
When clicking on Add:
Search (a search field is available to find client based on all vehicle details including source)
Stage (New, On Floor, Sale In Process, OTP, Invoice/Sold)
Date Created (Date Range filter to find vehicles added in a set period)
CRUD:
A User can Create, Update, Delete a vehicle record.
Fields in vehicle record:
List
o Admin sees all for Dealership
o Sales sees all for Dealership
o Manager sees all for Dealership
o Finance sees all for Dealership
Add / Edit / Delete
o Admin can edit
o Sales cannot edit
o Manager can edit
o Finance cannot edit
Notes / Communication
o Admin can add and send
o Sales can add and send
o Manager can add and send
o Finance can add and send
Costs
The Costs section is used for managing costs assigned to vehicles within a dealership. A cost is any
amount of money spent on the vehicle like fuel, tyres, service/repairs and forms part of the profit
calculation for the vehicle. Costs can be viewed, added, updated, deleted. A cost will always be linked to a
vehicle. When a vehicle is viewed the costs section should also be visible.
List:
A paginated list of costs should be available. From this list a User can choose to edit/delete/view a cost
record.
An Add Cost button will also be clickable to add new cost record.
When clicking on Add:
List
o Admin sees all for Dealership
o Sales does not see costs
o Manager sees all for Dealership
o Finance sees all for Dealership
Add / Edit / Delete
o Admin can add/edit
o Sales cannot edit
o Manager can add/edit
o Finance can add/edit
Notes
The Notes section is used for making notes on either a client, or a vehicle. Notes for clients and notes for
a vehicle must not be mixed. If a note is made on a vehicle, it will be displayed in the notes section when
a vehicle is viewed, and the same goes for client notes as the notes will be displayed in a notes section
when viewing the client details.
The notes section should function without a page load after adding a note, it should be added immediately
without page load using front-end.
Display:
A basic notes section will display all notes connected to the record being viewed (vehicle or client).
Format of note item:
Noted added by: User Name Surname
“This vehicle is being taken for a test drive on 01/01/2024 @ 11:00”
At the bottom of the section a textarea should be available to simply add a note and submit.
Extra note fields:
On the vehicle view, there must be additional fields to complete.
Notify User (This will contain a list of all users connected to the dealership)
If a user is selected, an email will be sent containing the note text.
On the client view, there must be additional fields to complete.
The note is saved in the database with the vehicle or client id to ensure it is connected to the
specific record.
The note will be sent via ajax or similar to update the notes section without page reload.
Fields in note record:
View
o Admin sees all
o Sales sees all
o Manager sees all
o Finance sees all
Add
o Admin can add
o Sales can add
o Manager can add
o Finance can add
Invoice / OTP
The Invoice section is used for managing invoices/otp’s within a dealership. Invoices can be viewed,
added, updated. A vehicle can have multiple OTPs added, the OTP can be converted into an invoice with
all the same details and fields. An otp and invoice can be downloaded in pdf format (basic layout example
will be supplied). An otp/invoice can be emailed to a user within the dealership as well as to the client
connected to the vehicle.
List:
A paginated list of invoices should be available. From this list a User can choose to edit/delete/view a
vehicle record.
An Add Invoice/Otp button will also be clickable to add new record.
Important: Before adding an invoice or otp the user must select a client to link it to.
When clicking on Add:
Search (a search field is available to find record based on vehicle id, client id)
Document Type (Invoice, OTP)
Date Created (Date Range filter to find vehicles added in a set period)
CRUD:
A User can Create, Update a record.
Fields in vehicle record:
On list view the user can choose to send the invoice/otp to a dealership user, or to a client, or
simply download the pdf.
Permissions:
List
o Admin sees all for Dealership
o Sales sees all for Dealership and clients assigned to user id
o Manager sees all for Dealership
o Finance sees all for Dealership
Add / Edit / Delete
o Admin can edit
o Sales cannot edit
o Manager can edit
o Finance can edit
Notes / Communication
o Admin can send
o Sales can send
o Manager can send
o Finance can send
Dealership Expenses
The Expenses section is used for managing expenses within a dealership. An expense is any amount of
money spent (but not vehicle costs) like salaries, advertising, internet, rent etc. Expenses can be viewed,
added, updated, deleted. Expenses are not connected to a vehicle or client record; it will be used for
reporting monthly to calculate profits based on vehicle sales etc.
List:
A paginated list of expenses should be available. From this list a User can choose to edit/delete/view a
record.
An Add Expense button will also be clickable to add new record.
When clicking on Add:
List
o Admin sees all for Dealership
o Sales does not see expenses
o Manager sees all for Dealership
o Finance sees all for Dealership
Add / Edit / Delete
o Admin can add/edit
o Sales cannot add/edit
o Manager can add/edit
o Finance can add/edit
Reporting:
Some basic reports are required based on available data. Tabular based layouts.
Monthly Sales Report
Date Range report for sales within the range (monthly by default).
Data:
Date Range
By Salesman
Date Range
Date Range
Report Export:
Reports should be available for csv export. An export based on filter must be exported.
Reporting Permissions:
Dealerships
o This is the base of all data a user can see
o Keys
dealership_id (pk)
Users
o Users belong to a dealership
o Keys
user_id (pk)
dealership_id (belongs to)
Clients
o Clients belong to a dealership
o A user_id can be set to link a client to a user(sales)
o Keys
client_id (pk)
dealership_id (belongs to)
user_id (allow null, assign to user(sales))
Vehicles
o Vehicles belong to a dealership
o A user_id can be set to link a client to a vehicle if the vehicle is sold(invoiced)
o A client_id can be set to link a client to a vehicle if the vehicle is sold(invoiced)
o Keys
vehicle_id (pk)
dealership_id (belongs to)
client_id (link to client if vehicle is invoiced/sold)
user_id (link to user(sales) if vehicle is invoiced/sold)
Costs
o Costs belong to a dealership
o Costs belong to a vehicle
o Keys
cost_id (pk)
dealership_id (belongs to)
user_id (link to user who added the cost)
vehicle_id (link to vehicle where cost was added)
Expenses
o Expenses belong to a dealership
o Keys
expense_id (pk)
dealership_id (belongs to)
user_id (link to user who added the expense)
Invoices (includes otp’s)
o Invoices belong to a dealership
o Invoices belong to a vehicle
o Keys
invoice_id (pk)
dealership_id (belongs to)
invoice_id (belongs to)