This is a backend system for a CRM application with advanced features such as user authentication, customer and lead management, interaction tracking, and advanced analytics.
- User Management (CRUD operations for users)
- Customer Management (CRUD operations for customers)
- Interaction Tracking (Log interactions with customers)
- Analytics and Reporting (Generate reports on interactions)
- User Authentication (JWT-based authentication)
- Role-based access control (Admin and regular users)
- Go (version 1.16 or higher)
- MongoDB (running on
localhost:27017
)
-
Clone the repository:
[email protected]:vatsalcode/mycmr.git cd mycmr
-
Install dependencies:
go mod tidy
-
Start MongoDB (if not already running):
# For macOS (using Homebrew) brew services start [email protected] # For Linux (using systemctl) sudo systemctl start mongod # For Windows (using Command Prompt) net start MongoDB
-
Run the application:
go run main.go
GET /
- Welcome messagePOST /register
- Register a new userPOST /login
- Login a user and receive a JWTPOST /users
- Create a new userGET /users/:id
- Get user detailsPUT /users/:id
- Update user detailsDELETE /users/:id
- Delete a userPOST /customers
- Create a new customerGET /customers/:id
- Get customer detailsPUT /customers/:id
- Update customer detailsDELETE /customers/:id
- Delete a customerPOST /interactions
- Create a new interactionGET /customers/:id/interactions
- Get interactions for a customerGET /interactions/stats
- Get interaction statistics
To run tests, use the following command:
go test ./...