{"id":24639387,"url":"https://github.com/alpha951/key-account-management","last_synced_at":"2026-04-11T11:03:41.429Z","repository":{"id":273100309,"uuid":"908562878","full_name":"alpha951/key-account-management","owner":"alpha951","description":"Key Account Management system for B2B enterprises written in Java","archived":false,"fork":false,"pushed_at":"2025-01-18T16:44:34.000Z","size":1133,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T19:47:56.610Z","etag":null,"topics":["account-management","java","key-account-applications","management","management-system","postgresql","springboot"],"latest_commit_sha":null,"homepage":"http://postman.com/spaceflight-candidate-61154118/workspace/kam-apis-demo/collection/40691637-00317fdc-204b-470d-a6a0-57dcd5e8d8cf?action=share\u0026creator=40691637\u0026active-environment=40691637-9f8791df-d7cf-47bc-828b-801c5882f115","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpha951.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-26T11:28:07.000Z","updated_at":"2025-02-10T16:17:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f4b89a1-370c-4653-8513-450069d9880f","html_url":"https://github.com/alpha951/key-account-management","commit_stats":null,"previous_names":["alpha951/key-account-management"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alpha951/key-account-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fkey-account-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fkey-account-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fkey-account-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fkey-account-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha951","download_url":"https://codeload.github.com/alpha951/key-account-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fkey-account-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31677819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["account-management","java","key-account-applications","management","management-system","postgresql","springboot"],"created_at":"2025-01-25T11:11:19.757Z","updated_at":"2026-04-11T11:03:41.423Z","avatar_url":"https://github.com/alpha951.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KAM System Project\n\n## Project Overview\n\nThe KAM (Key Account Management) System is a comprehensive backend solution designed to manage various aspects of customer interactions, leads, orders, restaurants, users, and analytics. It integrates multiple modules including authentication, order management, lead management, restaurant data management, and scheduling. The project includes various services, APIs, and a database structure to ensure efficient management of key accounts, their activities, and performance metrics.\n\nKey features of the system include:\n- User authentication and role-based access\n- Lead management with status tracking\n- Interaction and order management between key accounts and restaurants\n- Call scheduling for follow-up interactions\n- Setup of cron jobs to get analytics on various metrics for different time frame with persisting historical metrics in database.\n- Storing KAM related changes in audit change log table for record purpose.\n\n## System Requirements\n\n- **Java**: 17 or higher\n- **Spring Boot**: 2.5 or higher\n- **PostgresSQL**: 13 or higher\n- **Maven**: 3.8 or higher\n- **JDK**: 17 or higher\n- **IDE**: IntelliJ IDEA, Eclipse, or similar\n\n## Installation Instructions\n\nFollow these steps to set up the project locally:\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/alpha951/key-account-management.git\n   cd key-account-management\n   ```\n\n2. **Setting up the project** \n\n### Single command setup using Docker Compose (Recommended for development and testing)\nSimply run below command this will complete the whole setup including downloading dependencies, running schema.sql and data.sql for seed data\nand spinning up the server. This will expose the database on port 6432 on your local machine.\n\n```bash\n    docker compose up --build \n```\n\n   \u003e If you are using old compose command then use\n```bash\n   docker-compose up --build\n```\n   \nTo run containers in detach mode use `d` flag\n```bash\n  docker compose up -d\n```\n\nTo stop and remove the containers and delete the volume\n```bash\n  docker compose down -v\n```\n  \n### Running the application in your machine natively\nYou will need to setup the database first\n\n **Database setup**:\nFor database system you can run a docker container with below command this will expose the Postgres Container at port 6432 in your local machine. Make sure you have Docker installed else refer [official Docker docs](https://docs.docker.com/engine/install/ubuntu/)\n\n```bash\n  docker run --rm --name KAMpg-container -e POSTGRES_USER=root -e POSTGRES_PASSWORD=root -v kamsystem:/var/lib/postgresql/data -p 6432:5432 -d postgres\n```\nTo access this database in any db viewer like DBeaver use below details:\n\n```text\n    databse_name=postgres\n    user=root\n    password=root\n    connection=jdbc:postgresql://localhost:6432/postgres\n```\n\nNow you can manually run `/src/main/resorces/db/schem.sql` and `data.sql` to create schema and populate seed data into your database instance. \n    \nYou can also create database in your machine's postgres installation and update the application.properties accordingly.    \n\n- Configure the `application.properties`  file with your database credentials:\n\n```properties\nspring.datasource.url=jdbc:postgresql://localhost:5432/databas_name\nspring.datasource.username=your_username\nspring.datasource.password=your_password\n```\n\n#### Using IntelliJ Idea\nIf you have IntelliJ Idea IDE installed then simply open the project in IntelliJ and click on the play button to build the application and run the server.\n    \n#### Using maven command\nOtherwise you can use maven commands to install the dependencies for this you need to install maven in your local machine.\n\n  ```bash\n    mvn clean install\n  ```\n\n\n## Running Instructions\n\nOnce the application is set up:\n\n- The application will be available at `http://localhost:8080/`.\n- To test various functionalities, you can interact with the provided APIs via tools like **Postman** or **cURL**.\n\n## Database Schema\n![Database schema](/docs/database-schema.png)\n\n## API Documentation\n\nThe complete API docs can be found in this [postman collection](https://www.postman.com/spaceflight-candidate-61154118/workspace/kam-apis-demo/collection/40691637-00317fdc-204b-470d-a6a0-57dcd5e8d8cf?action=share\u0026creator=40691637\u0026active-environment=40691637-9f8791df-d7cf-47bc-828b-801c5882f115). I've setup two different environments for testing. Please select the `prod` env for testing the API without any additional setup.\nFor those APIs which perform some kind of Data manipulation operations use some new data in request body instead of existing one present in the postman collection. As existing data may give error responses. \n\n\u003e For Admin user login using below credentials :\n\n```json\n{\n    \"mobile\" : \"9999999991\",\n    \"password\": \"password\"\n}\n```\n\n\u003e For KAM User login using below credentials :\n```json\n{\n    \"mobile\" : \"9999999992\",\n    \"password\": \"password\"\n}\n```\n\n## Running test suit\nYou can run the test suit using IntelliJ run tests button or using below command.\n```bash\n    mvn test\n```\n\n\n## Conclusion\n\nThis project is designed to streamline the management of key accounts, interactions, and analytics, making it easier for businesses to manage their customer relationships effectively. By following the setup, running instructions, and utilizing the API endpoints, you can integrate the system into your business workflow seamlessly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha951%2Fkey-account-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha951%2Fkey-account-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha951%2Fkey-account-management/lists"}