Your trusted partner for on-demand home services, just a click away
GrowBiz is a comprehensive platform that is designed to overcome the challenges faced by small-scale businesses, while also introducing exciting new features to boost their growth and improve consumer’s experience.
Pre-requisites • Build GrowBiz • User Scenarios • Dependency • Code Coverage • APIs • Contributors
Adin login URL: login Email: smit.patel@dal.ca Password: Test@1234 Note: In user table update the role to ADMIN if you want to create new admin users
- Frontend - VS Code
- Backend - IntelliJ IDEA
# Clone this repository
$ git clone https://git.cs.dal.ca/courses/2023-fall/csci-5308/Group02.git
- In the backend directory, run
./mvnw install
. - Create .env file in the frontend directory and put the following secrets in the file (Update the secrets as per your instance)
NEXTAUTH_SECRET="password" NEXT_PUBLIC_SERVER_ADDRESS="http://backend:9002"
- After successful compilation and build, go to the root directory of the repository and run
docker-compose build
. - After docker images are built successfully, run
docker-compose up
. - Application can be accessed at
http://localhost:3000
. Ctrl + c
to stop the containers.- Please run
docker-compose down
after stopping the containers.
While the deployment job is running in the GitLab pipeline, we essentially follow these steps:
- Copy over the whole source code repository to the deployment virtual machine.
- Run the below commands:
docker compose build
.docker compose up --detach
.
- And the application is up and can be accessed at this link.
Scenario: Admin views all categories
Given the admin is logged in
When the admin requests to view all categories
Then the admin should be able to see the list of existing categories
And the list should include the category displaying its name and associated tax
Scenario: Add a new category by admin
Given the admin is logged in
When the admin adds a new category with name "Salon" and tax "10%"
Then the category "Salon" with tax "10%" should be created successfully
And the admin should be able to view the "Salon" category in the list of categories
Scenario: Update an existing category by admin
Given the admin is logged in
And there exists a category named "Salon" with tax "10%"
When the admin updates the category "Salon" with new tax "7%"
Then the category "Salon" should be updated successfully with tax "7%"
And the admin should be able to view the updated tax for "Salon"
Scenario: Admin views subcategories under 'Salon' category
Given the admin is logged in
And there are existing subcategories under the "Salon" category
When the admin clicks on the "Salon" category
Then the admin should be able to view the list of subcategories
And each subcategory should display its name and associated parent category "Salon"
Scenario: Admin adds a new subcategory under 'Salon' category
Given the admin is logged in
And the admin is viewing the "Salon" category
When the admin adds a new subcategory with name "Hair Styling" under the "Salon" category
Then the subcategory "Hair Styling" should be created successfully under the "Salon" category
And the admin should be able to view the "Hair Styling" subcategory in the list of subcategories under "Salon"
Scenario: Admin updates a subcategory under 'Salon' category
Given the admin is logged in
And there exists a subcategory named "Hair Cut" under the "Salon" category
When the admin updates the "Hair Cut" subcategory name to "Hair Color" under the "Salon" category
Then the subcategory "Hair Cut" should be successfully updated to "Hair Color" under the "Salon" category
And the admin should be able to view the updated "Hair Color" subcategory in the list of subcategories under "Salon"
Scenario: Admin views unverified businesses for verification
Given the admin is logged in
And there are unverified businesses pending for approval
When the admin navigates to the verification section
Then the admin should see the list of unverified businesses
And each business should display its name, category, and link of documents
Scenario: Admin verifies a business
Given the admin is logged in
And there is an unverified business named "Best Beauty Salon"
When the admin selects "Best Beauty Salon" for verification
And the admin reviews the the downloaded documents uploaded by the business
And finds the information satisfactory
Then the admin approves "Best Beauty Salon" for verification
And the status of "Best Beauty Salon" should be updated to 'Verified'
Scenario: Admin rejects a business
Given the admin is logged in
And there is an unverified business named "Nail Artistry"
When the admin selects "Nail Artistry" for verification
And the admin finds issues with the downloaded documents provided by the business
And decides to reject "Nail Artistry" for verification with reason "Incomplete documents"
Then the admin updates the status of "Nail Artistry" to 'Rejected'
And provides the rejection reason as "Incomplete documents"
Scenario: Partner logs in with valid credentials
Given the partner is on the login page
When the partner enters a valid username and password
And clicks on the login button
Then the system should authenticate the partner's credentials
And the partner should be successfully logged in
Scenario: Partner signs up by providing required details
Given the partner is on the signup page
When the partner enters their firstname "John", lastname "Doe", email "johndoe@example.com", password "SecurePwd123", and confirms the password
And clicks on the signup button
Then the system should register the partner's account
And the partner should be successfully signed up
Scenario: Admin logs in with valid credentials
Given the admin is on the login page
When the admin enters a valid username and password
And clicks on the login button
Then the system should authenticate the admin's credentials
And the admin should be successfully logged in
Scenario: Partner registers a new business
Given the partner is logged in
When the partner navigates to the Business Registration section
And provides the business name as "Unique Salon"
And selects a category for the business, like "Salon"
And uploads the required verification documents
Then the business "Unique Salon" should be registered successfully
And the system should initiate the verification process for "Unique Salon"
Scenario: Partner checks business verification status as Pending
Given the partner is logged in
When the partner navigates to the Business Verification Status section
Then the partner should see the status of their business verification
And if the business verification is pending
Then the status displayed should indicate "Verification Pending"
Scenario: Partner views rejection reason and updates business details Given the partner is logged in And the partner's business was rejected by the admin with reason "Incomplete documents" When the partner has viewed the rejection reason And changes the business name to "New Name" and category to "New Category" And uploads new verification documents Then the partner should be able to submit the updated details for re-verification Given the partner has submitted updated details for re-verification Then the system should initiate the re-verification process for the partner's business with the updated information
Scenario: Partner views default operating hours
Given the partner is logged in
When the partner navigates to the Operating Hours section
Then by default, Monday to Friday should be enabled
And the default operating hours should be from 9 am to 5 pm for Monday to Friday
And by default, Saturday and Sunday should be disabled
Scenario: Partner enables Saturday and Sunday
Given the partner is logged in
And the partner is in the Operating Hours section
When the partner enables the operating hours for Saturday and Sunday
Then Saturday and Sunday should be enabled for editing
And the partner can set the operating hours for Saturday and Sunday as required
Scenario: Partner changes operating hours for specific days
Given the partner is logged in
And the partner is in the Operating Hours section
When the partner selects a specific day, like Monday
And chooses to modify the operating hours
Then the partner should be able to change the opening and closing hours for Monday
And the changes made should be saved successfully
Scenario: Partner views existing services
Given the partner is logged in
When the partner navigates to the Services section
Then the partner should see a list of existing services
And each service should display its name, image, price per hour, time required, description, and a link to reviews
Scenario: Partner adds a new service
Given the partner is logged in
And the partner is in the Services section
When the partner adds a new service named "Hair Cut" with price 30 CAD, time required 60 minutes, and adds a relevant image and description
Then the service "Hair Cut" should be added successfully
And the partner should be able to view the newly added "Hair Cut" service in the list of services
Scenario: Partner updates an existing service
Given the partner is logged in
And there exists a service named "Hair Cut" with price 30 CAD and time required 60 minutes
When the partner updates the "Hair Cut" service to have a price of 35 CAD and changes the time required to 45 minutes
Then the "Hair Cut" service should be updated successfully
And the partner should be able to view the updated details for the "Hair Cut" service in the list of services
Scenario: Partner deletes a service
Given the partner is logged in
And there exists a service named "Hair Cut"
When the partner decides to delete the "Hair Cut" service
Then the "Hair Cut" service should be deleted successfully
And the partner should not be able to view the "Hair Cut" service in the list of services
Scenario: Partner views upcoming bookings
Given the partner is logged in
When the partner navigates to the Upcoming Bookings section
Then the partner should see a list of upcoming bookings
And each booking should display service name, time required, date, start time, end time, customer email, amount, and any notes provided
Scenario: Partner sends a reminder to a customer for an upcoming booking
Given the partner is logged in
And there is an upcoming booking for a service
When the partner selects the booking
And chooses to send a reminder to the customer via email
Then the partner should be able to send a reminder email to the customer for the upcoming booking
And the email should contain relevant details about the booking
Scenario: Partner sets an upcoming booking as ongoing
Given the partner is logged in
And there is an upcoming booking for a service
When the partner selects the upcoming booking
And clicks on the "Set Ongoing" button
Then the booking status should change from 'Upcoming' to 'Ongoing'
And the booking should reflect as 'Ongoing' in the list of bookings
Scenario: Partner views ongoing bookings details
Given the partner is logged in
When the partner navigates to the Ongoing Bookings section
Then the partner should see a list of ongoing bookings
And each ongoing booking should display details including Service name, time required, date, start time, end time, customer email, amount, and note
Scenario: Partner updates ongoing booking status to completed
Given the partner is logged in
And there exists an ongoing booking for a specific service
When the partner selects the ongoing booking for the service
And updates the status from 'Ongoing' to 'Completed'
Then the status of the ongoing booking should be successfully updated to 'Completed'
And the partner should no longer see the booking in the ongoing bookings list
Scenario: Partner views past bookings
Given the partner is logged in
When the partner navigates to the Past Bookings section
Then the partner should see a list of past bookings
And each booking should display details such as Service name, time required, date, start time, end time, customer email, and any additional notes
Scenario: Successful customer login
Given the customer is not logged in
When the customer navigates to the Growbiz application
Then the customer should see a login screen
And upon entering the correct credentials and pressing login
Then the customer should be redirected to the customer dashboard
Scenario: Failed customer login
Given the customer is not logged in
When the customer navigates to the Growbiz application
Then the customer should see a login screen
And upon entering the incorrect credentials and pressing login
Then the customer should be see the login page again with invalid credentials error
Scenario: List all categories
Given the customer is logged in
When the customer navigates to the Growbiz dashboard (Root URL - host:3000)
Then the customer should see a screen greeting them
And the screen should a list of all the parent categories
Scenario: See partner services of a category
Given the customer is logged in
And the customer is on the dashbaord page
When the customer clicks on a particular category card
Then the application should should show a page listing all the subcategories of that category
And under each sub category, the application should show all availables services of that subcategory created by the partners
Scenario: Filter partner services
Given the customer is logged in
And the customer is on the service listing screen
When the customer types a string in the search bar
Then the service is filtered based on the business name
When the customer selects a unchecks a subcategory
Then that subcategory section is hidden from the screen
When the customer slides the price slider
Then only the services whose price is lower than the selected price is visible
When the customer slides the time slider
Then only the services whose time requires is lower than the selected time is visible
When the customer slides the rating slider
Then only the services whose average ratings is above the selected rating is visible
Scenario: Open booking screen
Given the customer is logged in
And the cusomter is on the service listing screen
When the customer clicks on any of the service
Then see that the booking page of that service is visible
Scenario: See available slots based on business availability
Given the customer is on the service booking screen
When the customer clicks on the available date picker
Then see that the future dates of the current weeek are enabled
When the customer selects any particular date
Then see that the availability dropdown shows all the free slots of that business based on their operating hours
Scenario: Successful service booking flow
Given the customer is on the service booking screen
When the customer clicks on the Book button
Then see that the booking modal is open
And the modal contains the selected date and time slots
Scenario: Success payment flow
Given the customer is on the booking flow modal
When the customer clicks proceed to payment button
Then see that the payment form is visible to the customer
When the customer add their valid payment details and clicks on Pay
Then see that the customer is redirected to the payment screen
And see the details of the payment
When the payment is successful
And customer goes to the booking page
Then see that a successful service booking is made
Scenario: Failed payment flow
Given the customer is on the booking flow modal
When the customer clicks proceed to payment button
Then see that the payment form is visible to the customer
When the customer add their invalid payment details and clicks on Pay
Then see that the customer is show the error message on the modal
Scenario: See all payments
Given the customer is logged in
When the customer clicks on the `Profile` icon
Then see the drodown open containing a menu with menu item "payments"
When the customer clicks on the payments menu
Then see that the customer is redirected to the page where all the payments initiated by the customer are visible
Scenario: See all bookings
Given the customer is logged in
When the customer clicks on the `Bookings` icon
Then see that the customer is redirected to the booking screen
And the customer is able to see all the upcoming, ongoing and past bookings
Scenario: See updated booking status
Given the customer is logged in
When the business updates booking status
And the customer refreshes the booking page
Then see that the customer is show the updated booking status
Scenario: See all service reviews
Given the customer is logged in
When the customer is on the service booking page
Then see that the customer is shown all the reviews of that service
If the customer has not not added their review of the service
Then see that a + icon is visible to the customer
If the customer has added their review of the service
Then see that the review is visible to the customer
Scenario: Add review succesfully
Given the customer is on the service booking screen
When the customer haven't a service review
Then see that a + icon is visible to the customer
When the customer clicks on the + icon
Then the customer is show the add review form modal
When the customer fills the review details
And clicks on the "Save" button
Then see that the added review is visible in the reviews section
Scenario: Update review sucessfully
Given the customer is on the service booking screen
When the customer has already added the service review
Then see that their review is visible to the customer
When the customer clicks on the pencil icon
Then the customer is show the edit review form modal
When the customer fills the review details
And clicks on the "Save" button
Then see that the updated review is visible in the reviews section
Scenario: Delete review sucessfully
Given the customer is on the service booking screen
When the customer has already added the service review
Then see that their review is visible to the customer
When the customer clicks on the Trash icon
Then the customer is show a confirmation dialog
When the customer clicks confirm
Then see that the customer review is deleted
Dependency | Version | Usage | Link |
---|---|---|---|
SpringBoot | 3.1.4 | Java Framework for REST APIs | Link |
Spring Security | 3.1.4 | Authentication and access-control framework | Link |
Lombok | 1.18.30 | Autogenerate getter setters in POJO classes. | Link |
MySQL Connector | 8.1.0 | Connects application to the MySQL | Link |
JSON WebToken | 0.11.2 | Generates JWTs in the application for authorization. | Link |
Stripe | 24.2.0 | Payment integration in the application. | Link |
JUnit5 | 5.9.2 | Unit testing of the modules. | Link |
Thymeleaf | 3.1.4 | Templating engine for HTML emails. | Link |
Jackson Datatype: JSR310 | 2.15.3 | Add-on module to support JSR-310 (Java 8 Date & Time API) data types. | Link |
Dependency | Version | Usage |
---|---|---|
@hookform/resolvers | ^3.3.2 | Form handling |
@radix-ui/react-alert-dialog | ^1.0.5 | UI component - alert dialog |
@radix-ui/react-aspect-ratio | ^1.0.3 | UI component - aspect ratio |
@radix-ui/react-avatar | ^1.0.4 | UI component - avatar |
@radix-ui/react-checkbox | ^1.0.4 | UI component - checkbox |
@radix-ui/react-dialog | ^1.0.5 | UI component - dialog |
@radix-ui/react-dropdown-menu | ^2.0.6 | UI component - dropdown menu |
@radix-ui/react-icons | ^1.3.0 | UI component - icons |
@radix-ui/react-label | ^2.0.2 | UI component - label |
@radix-ui/react-popover | ^1.0.7 | UI component - popover |
@radix-ui/react-progress | ^1.0.3 | UI component - progress bar |
@radix-ui/react-scroll-area | ^1.0.5 | UI component - scroll area |
@radix-ui/react-select | ^2.0.0 | UI component - select |
@radix-ui/react-slider | ^1.1.2 | UI component - slider |
@radix-ui/react-slot | ^1.0.2 | UI component - slot |
@radix-ui/react-switch | ^1.0.3 | UI component - switch |
@radix-ui/react-toast | ^1.1.5 | UI component - toast |
@radix-ui/react-tooltip | ^1.0.7 | UI component - tooltip |
@stripe/react-stripe-js | ^2.3.2 | Stripe integration |
@stripe/stripe-js | ^2.1.11 | Stripe integration |
add | ^2.0.6 | Utility |
card | ^2.5.4 | UI |
class-variance-authority | ^0.7.0 | Class utility |
clsx | ^2.0.0 | Utility |
date-fns | ^2.30.0 | Date manipulation |
firebase | ^10.6.0 | Backend service integration (Firebase) |
lucide-react | ^0.284.0 | Icon library |
moment | ^2.29.4 | Date manipulation |
next | 13.5.4 | React framework |
next-auth | ^4.23.2 | Authentication |
react | ^18 | React framework |
react-day-picker | ^8.9.1 | Date picker |
react-dom | ^18 | React framework |
react-hook-form | ^7.47.0 | Form handling |
react-modal | ^3.16.1 | Modal component |
shadcn-ui | ^0.4.1 | UI library |
tailwind-merge | ^1.14.0 | Tailwind CSS utility |
tailwindcss-animate | ^1.0.7 | Tailwind CSS utility |
zod | ^3.22.4 | Data validation |
Go to the backend readme to see the API details