Daniel Lau mapperofallmaps
Follow tracking my own learning into the world of programming.- Sydney
Achievements

Achievements
Block or report mapperofallmaps
Report abuseContact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abuse More mapperofallmaps/README.mdAgent Interaction API
Spring Boot REST API for tracking email, phone, and in-person interactions with agents.
Storage
Agents and interactions are held in an in-memory store (ConcurrentHashMap-backed
repositories) — state resets on restart. There is no database.
Running
mvn spring-boot:run
The API listens on http://localhost:8080.
REST API
Agents
| Method | Path | Description |
|---|---|---|
| POST | /api/agents |
Create an agent |
| GET | /api/agents |
List all agents |
| GET | /api/agents/{id} |
Get an agent |
| PUT | /api/agents/{id} |
Update an agent |
| DELETE | /api/agents/{id} |
Delete an agent (and its interactions) |
Interactions
| Method | Path | Description |
|---|---|---|
| POST | /api/agents/{agentId}/interactions/email |
Log an email interaction |
| POST | /api/agents/{agentId}/interactions/phone |
Log a phone interaction |
| POST | /api/agents/{agentId}/interactions/in-person |
Log an in-person interaction |
| GET | /api/agents/{agentId}/interactions?type= |
List an agent's interactions (optional type filter: EMAIL, PHONE, IN_PERSON) |
| GET | /api/interactions/{id} |
Get a single interaction |
| DELETE | /api/interactions/{id} |
Delete an interaction |
Kafka listeners
Two consumers keep the in-memory store in sync with an upstream system of record:
| Topic | Message | Config key |
|---|---|---|
agent-updates |
com.mapperofallmaps.agentinteractions.messaging.AgentEventMessage |
app.kafka.topics.agent-updates |
interaction-updates |
com.mapperofallmaps.agentinteractions.messaging.InteractionEventMessage |
app.kafka.topics.interaction-updates |
Each message carries an eventType of CREATED, UPDATED, or DELETED plus the
full record; the listener upserts or deletes the matching entry in the in-memory
store. Broker location is set via spring.kafka.bootstrap-servers
(env var KAFKA_BOOTSTRAP_SERVERS, defaults to localhost:9092).
Example agent event payload:
{
"eventType": "UPDATED",
"id": 42,
"name": "Jane Doe",
"email": "jane.doe@example.com",
"phoneNumber": "555-0100"
}
Popular repositories Loading
-
project-based-learning
project-based-learning
Public
Forked from practical-tutorials/project-based-learning
Curated list of project-based tutorials
-
JavaLearning
JavaLearning
Public
Java
-
C-projects
C-projects
Public
C
-
PythonProjects
PythonProjects
Public
Python
-
mapperofallmaps
mapperofallmaps
Public
Config files for my GitHub profile.
Java
If the problem persists, check the GitHub status page or contact support.
Uh oh!
There was an error while loading. Please reload this page.