This CRM (Customer Relationship Management) application is built using Spring Boot MVC, Thymeleaf, Hibernate, MySQL, and Java 17. The application provides a comprehensive solution for managing customer interactions, tasks, appointments, and communication. It also integrates with various Google services, including Google Drive, Gmail, and Google Calendar, to enhance productivity and collaboration.
Before installing the CRM application, ensure the following:
- Java 17 is installed on your machine.
- MySQL database is set up and running.
- Obtain valid MySQL connection details (URL, username, password).
- Obtain Google API credentials for integration with Google services (Drive, Gmail, Calendar).
To install and run the CRM application, follow these steps:
- Clone the repository from GitHub.
- Configure the MySQL database connection details in the
application.properties
file:
spring.datasource.url=jdbc:mysql://localhost:3306/crm?createDatabaseIfNotExist=true
spring.datasource.username=YourUserName
spring.datasource.password=YourPassword
spring.jpa.hibernate.ddl-auto=none
spring.sql.init.mode=always
Replace YourUserName
and YourPassword
with your MySQL database credentials.
-
Set up the necessary Google API credentials for Google integration:
- Go to the Google Cloud Console.
- Create a new project or select an existing project.
- Enable the necessary APIs for your project (e.g., Google Drive, Gmail, Calendar).
- In the project dashboard, navigate to the Credentials section.
- Click on Create Credentials and select OAuth client ID.
- Configure the OAuth consent screen with the required information.
- Choose the application type as Web application.
- Add the authorized redirect URIs in the Authorized redirect URIs section. For example:
http://localhost:8080/login/oauth2/code/google
http://localhost:8080/employee/settings/handle-granted-access
Replacelocalhost:8080
with the base URL of your CRM application.
- Complete the setup and note down the Client ID and Client Secret.
-
Modify the Google API scopes for accessing Google services:
While setting up the Google API credentials, you need to add the required scopes to define the level of access the application has to your Google account. The required scopes depend on the specific features you want to use. Here are the scopes for common Google services:
-
Google Drive:
https://www.googleapis.com/auth/drive
-
Gmail:
https://www.googleapis.com/auth/gmail.readonly
-
Google Calendar:
https://www.googleapis.com/auth/calendar
During the setup of your Google credentials, find the section to add the API scopes and include the scopes relevant to the features you intend to use.
-
-
Configure the redirect URI for the Google authentication flow:
spring.security.oauth2.client.registration.google.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
- Customize the authorization and authentication URLs for the application if needed:
spring.security.oauth2.client.provider.google.authorization-uri=https://accounts.google.com/o/oauth2/auth
spring.security.oauth2.client.provider.google.token-uri=https://accounts.google.com/o/oauth2/token
- Build the application using Maven:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the CRM application in your web browser at
http://localhost:8080
.
- Users can log in using their regular credentials or choose to log in using their Google accounts.
- Google login allows users to grant access to Google Drive, Gmail, and Google Calendar.
- Users can create, delete, and share files and folders with colleagues directly from the CRM application.
- Integration with Google Drive enables seamless collaboration and document management.
- Integrated with FullCalendar JS library, users can easily manage their calendar, create, edit, and delete meetings.
- Automated email notifications are sent to attendees when meetings are scheduled or modified.
- Users can send emails, save drafts, and manage their inbox, sent items, drafts, and trash directly within the CRM application.
- Gmail integration streamlines communication and enables efficient email management.
- The application supports different roles, including Manager, Employee, Sales, and Customers.
- Each role has specific access and permissions tailored to their responsibilities.
- Managers have access to all features and functionalities in the CRM application.
- They can create new users, assign specific roles to users, define new roles, and manage access to different pages for employees.
- Managers can assign tickets and leads to employees for efficient task allocation.
- Employees have access to their assigned tickets, leads, contracts, and task history.
- They can manage their customers and create new tickets.
- Employees receive email notifications for newly assigned tasks (configurable in user settings).
- Customers have access to their tickets, leads, and contracts.
- They receive email notifications for any changes to their tickets, leads, or contracts.
- Customers can manage their notification preferences in their settings.
- Users can create, update, delete, and view leads.
- Integration with Google Drive allows automatic saving of lead attachments.
- Integration with Google Calendar enables scheduling meetings with customers.
- Users can create, update, delete, and view tickets.
- Integration with Google Drive allows automatic saving of ticket attachments.
- Integration with Google Calendar enables scheduling meetings related to tickets.
- Users can create, update, delete, and view contracts.
- Contracts can include details such as amount, start and end dates, description, and attachments.
- Integration with Google Drive allows uploading and sharing contracts with customers.
- Users can create personalized email templates using the Unlayer library's drag-and-drop functionality.
- Email campaigns can be created using the predefined templates.
- Users can configure email settings and Google service access from their settings page.
- Email settings allow employees to enable or disable the automatic sending of emails to customers using predefined email templates when tickets, leads, or other objects are updated.
- Google settings allow users to manage access to Google services, enabling or disabling integration with Google Drive, Gmail, and Google Calendar.
Contributions to the CRM Web Application are welcome! If you spot any bugs or would like to propose new features, please open an issue or submit a pull request.
This project is licensed under the MIT License.