Welcome to the Customer Relationship Management (CRM) project! This system is designed to efficiently manage various aspects of customer interactions and internal tasks. It utilizes React for the frontend and an Express backend, interacting seamlessly with a MongoDB database. Explore the details of this project's objectives, demonstrations, technical design, and user interface in the sections below.
- Personal Objectives
- Project Demonstration
- Technical Design
- User Interface (screenshots)
- Project Installation Guide
Deepening MongoDB Expertise: The primary aim of this project for me is to gain hands-on experience and deepen understanding of MongoDB. This involved learning database operations, exploring advanced features, and integrating MongoDB with the backend.
Enhancing Server-Side Programming Capabilities: Another focus of mine with this project is improving my server-side programming skills using Express.js. This included developing complex server functionalities, improving API design, and optimizing server performance.
Learning UI Libraries: I tried as best I could to use Chakra-UI and Material-UI whenever possible.
I've prepared a demonstration for those interested in witnessing the CRM in action:
- Video Demo: Watch the Video Demo
- AWS Deployment: Explore the CRM Demo on AWS
- Dashboard Pages: Serve as the central hub, displaying summaries from various sections like contacts, tasks, and leads.
- Contact Management: Interfaces for managing contact information, including add, view, and edit functionalities.
- Task Management: Allows users to manage tasks, link them to contacts or leads.
- Other Features: Meeting management, call logs, email history, document management, and more.
The backend handles data processing, API endpoints, and database interactions.
- API Routes: Defined for CRUD operations on various entities like contacts, tasks, meetings.
- Controllers: Contain logic for handling requests and interacting with the MongoDB database.
- Database Interaction: Mongoose models are used for interacting with MongoDB collections.
Data Flow Example
- User Interaction: Submission of the contact form in the frontend.
- API Call:
postApi
fromapi.js
sends data to the backend. - Backend Processing: Route in
_routes.js
calls the appropriate function incontact.js
. - Database Operation: Function in
contact.js
updates the MongoDB database. - Response Handling: Server response is sent back to the frontend.
Locally, I hosted the CRM's database on MongoDB Atlas on M0 Sandbox tier
The database comprises several collections, each tailored to a specific aspect of the CRM system:
- Contacts: Stores customer contact information.
- Documents: Contains document data related to customers and transactions.
- Email Histories: Tracks the history of emails sent and received.
- Leads: Manages potential customer or client information.
- Meeting Histories: Records details of past meetings.
- Phone Calls: Logs phone call interactions.
- Properties: Details properties associated with clients or leads.
- Tasks: Manages tasks and assignments within the CRM.
- Text Messages: Stores records of text message communications.
- Users: Handles user account information and credentials.
-
User-Centric Design: The database schema is centered around the
USER
entity, with critical user attributes like username, role, and activity (e.g.,emailsent
). This design enables tracking and managing user-specific activities across various entities such as contacts, leads, and email histories. -
Activity Tracking: Entities like
CONTACT
,LEAD
, andEMAIL-HISTORY
are structured to capture detailed information pertinent to CRM activities. For example,CONTACT
includes personal information,LEAD
encompasses lead-specific details, andEMAIL-HISTORY
records comprehensive email interaction data.
Pictured below is an example of how the lead, contact, email, and user schema's relate. Many fields are not visualized to reduce space.
- Frontend: Focused on user experience, built with React.
- Backend: Manages data and business logic, developed using Express and MongoDB.
- Security: JWT tokens for authorization and secure data access.
Ensure these tools are installed:
-
Node.js and npm:
- Download Node.js: Visit Node.js and download the LTS version.
- Install Node.js: Run the downloaded installer and follow the prompts. Ensure npm is included.
- Verify Installation: Open a terminal and run
node -v
andnpm -v
to check the installation.
-
MongoDB Compass (Optional):
- Download MongoDB Compass or create an account on MongoDB Atlas.
-
Download Project:
- Download the project ZIP from GitHub or another source.
-
Extract ZIP:
- Extract the ZIP to a preferred directory.
-
Open Terminal:
- Open a terminal or command prompt.
-
Navigate to Project:
- Use
cd path/to/project-directory
.
- Use
-
Install Dependencies:
- In the project directory, run
npm install
oryarn install
.
- In the project directory, run
-
Start Development Server:
- Run
npm start
oryarn start
.
- Run
-
Change baseUrl:
- In the project directory, open
constant.js
and changebaseUrl
to your backend server URL (e.g.,http://127.0.0.1:5001/
).
- In the project directory, open
-
Access Application:
- Open a browser and navigate to
http://localhost:3000
.
- Open a browser and navigate to
-
Download Backend Project:
- Download the backend project ZIP from a source.
-
Extract and Navigate:
- Follow steps 2 and 4 as above for the backend project.
-
Install Dependencies:
- In the backend project directory, run
npm install
oryarn install
.
- In the backend project directory, run
-
Configure Database:
- Create a
.env
file in the project directory. - Add
DB_URL = [your MongoDB URL]
andDB = [your MongoDB Database Name]
.
- Create a
-
Start Server:
- Run
npm start
.
- Run
-
Open Application:
- Navigate to
http://localhost:3000
.
- Navigate to
(not functional on AWS deployment)
- Email: admin@gmail.com
- Password: admin123