Skip to content

StarOnceCRM create, manage, communicate, socket chats, peer video calls, slack paymets.

Notifications You must be signed in to change notification settings

DOodle25/Internship

Repository files navigation

StarOneCRM

StarOneCRM is a comprehensive Customer Relationship Management (CRM) system built using the MERN stack (MongoDB, Express.js, React, Node.js). This project was developed as part of my internship, and it includes a wide range of features designed to streamline user management, task assignment, payment processing, and communication.

Hosted on Azure live url: Frontend --> https://polite-field-09918cc00.4.azurestaticapps.net Backend --> http://internship-fta5hkg7e8eaecf7.westindia-01.azurewebsites.net my Website --> Alynor.wiki

test id : admin - cocply135@gmail.com - admin123(as placeholder on live site) test id : customer - 210305105302@paruluniversity.ac.in - admin123

Features

  • User Authentication:

    • Google Login
    • Facebook Login
    • Traditional OTP with Nodemailer
    • Three-layer registration process (Login → Fill Required Data → Admin Verification)
  • User Management:

    • Edit Profile
    • Upload Images
    • Create Tasks
    • Assign Tasks to Employees
    • View Payment History
  • Admin Features:

    • Verify User Data
    • Manage Users, Tasks, and Assigned Tasks
    • Beautiful Data Tables for Users and Tasks
    • RFM Model for User Segmentation
  • Payment Processing:

    • Stripe Integration
    • Payment History Visible to Both Employees and Customers
  • Real-time Communication:

    • Socket.io Chat
    • Video Call using Peer.js and Socket.io
  • File Management:

    • Photo Uploads using Multer and GridFS

Screenshots

Screenshot 2025-03-06 133438 Screenshot 2025-03-06 133456 Screenshot 2025-03-06 133518 Screenshot 2025-03-06 133535 Screenshot 2025-03-06 133545 Screenshot 2025-03-06 133625 Screenshot 2025-03-06 133639 Screenshot 2025-03-06 133659 Screenshot 2025-03-06 133730 Screenshot 2025-03-06 133759 Screenshot 2025-03-06 133831 Screenshot 2025-03-06 133843

Videos

2025-03-06.13-40-20.mp4

Setup

Prerequisites

  • Node.js
  • MongoDB
  • Stripe Account
  • Google and Facebook Developer Accounts for OAuth

Installation

  1. Clone the Repository

    git clone https://github.com/DOodle25/Internship
    cd StarOneCRM

    make sure to use the proper version of StarOneCRM-vX (PreviousVersion are maintained)

  2. Install Dependencies

    npm install
    cd client
    npm install
  3. Set Up Environment Variables

    Create a .env file in the root directory and add the following variables:

    MONGODB_URI =
    PORT =
    JWT_SECRET =
    GOOGLE_CLIENT_ID =
    GOOGLE_CLIENT_SECRET =
    FACEBOOK_CLIENT_ID =
    FACEBOOK_CLIENT_SECRET =
    NODE_ENV =
    STRIPE_SECRET_KEY =
    BASE_URL =
    STRIPE_WEBHOOK_SECRET =
  4. Run the Application

    npm run dev

    This will start both the server and the client concurrently.

How to Contribute

We welcome contributions from the community! Here’s how you can get started:

  1. Fork the Repository

    Click the "Fork" button on the top right corner of this repository.

  2. Clone Your Fork

    git clone https://github.com/DOodle25/Internship.git
    cd StarOneCRM
  3. Create a New Branch

    git checkout -b feature/your-feature-name
  4. Make Your Changes

    Make your changes and ensure that the code is well-tested.

  5. Commit Your Changes

    git add .
    git commit -m "Add your commit message here"
  6. Push to Your Fork

    git push origin feature/your-feature-name
  7. Create a Pull Request

    Go to the original repository and click on "New Pull Request". Select your branch and submit the PR.

Technologies Used

  • Frontend: React, Redux, Socket.io, Peer.js
  • Backend: Node.js, Express.js, MongoDB, Mongoose
  • Authentication: Google OAuth, Facebook OAuth, JWT, Nodemailer
  • Payment: Stripe
  • File Management: Multer, GridFS
  • Real-time Communication: Socket.io, Peer.js

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Special thanks to my mentors and colleagues for their guidance and support during the development of this project.
  • Thanks to the open-source community for providing the tools and libraries that made this project possible.

Contact

For any inquiries, please contact [Dipen Patel] at [emailhelper468@gmail.com].


Thank you for checking out StarOneCRM! We hope you find it useful and look forward to your contributions! 🚀

Internship Log

December 2024
Day 1 (23-12-24) Met the employees and got to know the team leads and their respective tasks. There wasn’t much work for me on the first day. I familiarized myself with the projects they were working on and discussed my strengths with the team. They assessed which team or project I might be suitable for. I was assigned a task to implement API CRUD operations for a CRM.
Day 2 (24-12-24) Worked on the CRM CRUD task. Added API calls to `/crud/` for creating a user, deleting a user, updating user data, and reading a list of users with all their details.
Day 3 (25-12-24) **Holiday**
Day 4 (26-12-24) Hosted the frontend and backend separately on Azure using Azure Function App and Azure Static Web App. Configured the API calls with CORS settings. Faced issues with the backend not allowing PATCH requests, which caused problems with update calls.
Day 5 (27-12-24) Integrated the user list data into a `react-data-table-component`. Added functionality for searching and sorting the data by name, role, age, and email. Updated the UI for the user data table using the selected color palette.
Day 6 (28-12-24) **Holiday**
Day 7 (29-12-24) **Holiday**
Day 8 (30-12-24) Hosted the application with the new UI and populated it with 4,400 dummy user records generated through API calls using a JavaScript script executed with Node.js. Tested the sorting and searching functionalities.
Day 9 (31-12-24) Presented the project to the team lead. Received feedback to add backend validation for the data and a frontend UI to display errors and success messages. Started working on these tasks.
January 2025
Day 10 (01-01-25) **Holiday**
Day 11 (02-01-25) Implemented backend validation for the following: - Age must be a number. - Name must be a string. - Role must be a string. - Email must match a specific format using regular expressions.
Day 12 (03-01-25) Enhanced the frontend UI using `react-toastify` to display success and error messages. Added error handling for scenarios such as duplicate email, invalid age (non-numeric), invalid name (non-string), and incorrectly formatted email.
Day 13 (04-01-25) **Holiday**
Day 14 (05-01-25) **Holiday**
Day 15 (06-01-25) Deployed the application again using GitHub YML files to Azure. Tested the `react-toastify` notifications and backend validation. Demonstrated the project to the team lead and asked for feedback.
Day 16 (07-01-25) Created a backend for user login functionality and tested it by hosting on Azure. Presented it to the team lead for feedback.
Day 17 (08-01-25) Tested login functionality without a password and with credentials for users. Created separate roles for admin and user access.
Day 18 (09-01-25) Created a data flow diagram for authentication and show it to team lead. ![Data Flow Diagram](content/DFD.jpeg)
Day 19 (10-01-25) Added variables `isFormFilled`, `isFormValidated`, and `Token` to validate user accounts. Implemented functionality to ensure only admins can validate and allow users to update their accounts. Tested on Azure and demonstrated to the team lead.
Day 20 (11-01-25) **Holiday**
Day 21 (12-01-25) **Holiday**
Day 22 (13-01-25) Developed a routing system where routes are accessible based on active variables (`isFormFilled`, `isFormValidated`, etc.). Tested by hosting on Azure and presenting to the team lead.
Day 23 (14-01-25) **Holiday**
Day 24 (15-01-25) **Holiday**
Day 25 (16-01-25) Added password-protected login functionality using NodeMailer for OTP verification. Separated routes and improved security measures. Hosted and tested on Azure. Showed the results to the team lead.
Day 26 (17-01-25) Integrated NodeMailer functionality to send OTP for secure login. Tested various use cases, including expired OTPs and incorrect emails, by hosting on Azure and demonstrating to the team lead
Day 27 (18-01-25) **Holiday**
Day 28 (19-01-25) **Holiday**
Day 29 (20-01-25) Enhanced login security by separating admin and user routes and ensuring restricted access to sensitive functionalities. Tested by hosting on Azure.
Day 30 (21-01-25) Optimized and refactored the backend code for the login and validation system. Added tests for edge cases. Hosted on Azure and demonstrated improvements to the team lead.
Day 31 (22-01-25) Debugged and resolved minor issues in the OTP-based login functionality. Improved error handling for failed API calls and incorrect user inputs.
Day 32 (23-01-25) Added frontend UI feedback for invalid OTPs and incorrect email formats using react-toastify. Tested integration thoroughly on Azure.
Day 33 (24-01-25) mproved admin routes to allow bulk validation of user accounts. Tested by simulating high-traffic scenarios on Azure.
Day 34 (25-01-25) **Holiday**
Day 35 (26-01-25) **Holiday**
Day 36 (27-01-25) Fixed issues with the user update functionality. Verified changes and tested compatibility with backend validation logic.
Day 37 (28-01-25) Implemented additional backend security checks for OTP validity duration and enhanced error logging.
Day 38 (29-01-25) Improved UI responsiveness for mobile devices, especially for login and validation pages. Tested cross-browser compatibility.
Day 39 (30-01-25) Streamlined the deployment process by automating Azure deployments through GitHub Actions. Tested the pipeline end-to-end.
Day 40 (31-01-25) Fixed edge cases in the routing logic to handle scenarios where variables like `isFormFilled` and `isFormValidated` are undefined or null.
February 2025
Day 41 (01-02-25) **Holiday**
Day 42 (02-02-25) **Holiday**
Day 43 (03-02-25) Conducted a final round of testing and documentation for the login, validation, and routing functionalities. Prepared for a project review.
Day 44 (04-02-25) Created three types of users: **Admin, Customer, and Employee**. Implemented role-based access control to ensure users could only access specific functionalities based on their roles.
Day 45 (05-02-25) Developed a task creation system where a **Customer** can create a task request. Integrated the feature with the backend API and ensured data validation.
Day 46 (06-02-25) Implemented task verification functionality. An **Admin** can review and verify a task created by a **Customer** before assigning it further.
Day 47 (07-02-25) Added the ability for an **Admin** to assign a **Customer** to an **Employee** after verification. Implemented role-based API calls to restrict actions based on user type.
Day 48 (08-02-25) **Holiday**
Day 49 (09-02-25) **Holiday**
Day 50 (10-02-25) Restricted **Customers** and **Employees** to view only their own profiles. Introduced an access control mechanism ensuring they cannot access or modify others’ profiles.
Day 51 (11-02-25) Developed a **chat functionality** for assigned tasks. Customers and Employees can communicate only with their assigned individual to discuss tasks.
Day 52 (12-02-25) Implemented real-time chat functionality for assigned tasks. Messages are stored in the backend, and users receive real-time updates.
Day 53 (13-02-25) Created an **Admin Panel UI** for task assignment and chat monitoring. Developed a backend system to enable admins to assign and track tasks efficiently.
Day 54 (14-02-25) Tested the full system, including user roles, task creation, verification, assignment, and chat. Fixed bugs related to user access restrictions and task assignment.
Day 55 (15-02-25) **Holiday**
Day 56 (16-02-25) **Holiday**
Day 57 (17-02-25)
Day 58 (18-02-25)
Day 59 (19-02-25)
Day 60 (20-02-25)
Day 61 (21-02-25)
Day 62 (22-02-25)
Day 63 (23-02-25)
Day 64 (24-02-25)
Day 65 (25-02-25)
Day 66 (26-02-25)
Day 67 (27-02-25)
Day 68 (28-02-25)
March 2025
Day 69 (01-03-25)
Day 70 (02-03-25)
Day 71 (03-03-25)
Day 72 (04-03-25)
Day 73 (05-03-25)
Day 74 (06-03-25)
Day 75 (07-03-25)
Day 76 (08-03-25)
Day 77 (09-03-25)
Day 78 (10-03-25)
Day 79 (11-03-25)
Day 80 (12-03-25)
Day 81 (13-03-25)
Day 82 (14-03-25)
Day 83 (15-03-25)
Day 84 (16-03-25)
Day 85 (17-03-25)
Day 86 (18-03-25)
Day 87 (19-03-25)
Day 88 (20-03-25)
Day 89 (21-03-25)
Day 90 (22-03-25)
Day 91 (23-03-25)
Day 92 (24-03-25)
Day 93 (25-03-25)
Day 94 (26-03-25)
Day 95 (27-03-25)
Day 96 (28-03-25)
Day 97 (29-03-25)
Day 98 (30-03-25)
Day 99 (31-03-25)
April 2025
Day 100 (01-04-25)
Day 101 (02-04-25)
Day 102 (03-04-25)
Day 103 (04-04-25)
Day 104 (05-04-25)
Day 105 (06-04-25)
Day 106 (07-04-25)
Day 107 (08-04-25)
Day 108 (09-04-25)
Day 109 (10-04-25)
Day 110 (11-04-25)
Day 111 (12-04-25)
Day 112 (13-04-25)
Day 113 (14-04-25)
Day 114 (15-04-25)
Day 115 (16-04-25)
Day 116 (17-04-25)
Day 117 (18-04-25)
Day 118 (19-04-25)
Day 119 (20-04-25)
Day 120 (21-04-25)