How 1995parham-learning/nats-callout101 works
Main Components
• NATS Server: Represent the central message broker that handles client connections and delegates authentication via callout.
• Authentication Callout Service: The Go-based service (main.go) that subscribes to the designated NATS subject and processes authentication requests.
• Users Data/Backend: Although simple in this demo (i.e., users.json), it represents where user credentials or authentication data are retrieved.
• Deployment/Configuration: Components such as deployment/docker-compose.yml and server.conf that define how the system is deployed and configured.
• (Optional) NATS Client (as hinted in the README): A simple client component that triggers the callout process by attempting a connection.
Relationships and Data Flow
• Authentication Logic: Inside the Authentication Callout Service, place a notation that custom logic processes the request using the users.json file or other checks.
Architectural Patterns and Technologies
• Event-Driven Architecture: Highlight that the system is designed around message passing using subjects/topics, which is central to the callout authentication process.
• Microservice Style Component: Highlight that the authentication logic is decoupled from the NATS server configuration, making the system modular.
• Tools/Technologies: Note that the project is written in Go (using go.mod and go.sum for dependency management) and leverages Docker Compose for deployment.