Skip to content

codekirei/webchat-poc

Repository files navigation

WIP.

Planning to try out a few new-to-me libraries to see how they feel in a real-ish project.

Will document as I go.

Development

Start the backend server with go run . serve.

CLI Commands

CLI commands are managed with Cobra. Useful docs:

Opportunities to Productionize

This is a proof-of-concept, so there are many features that would be present in a production application have intentionally been omitted. Many such features are more ops-focused and not in the application layer.

To take this project the extra mile and make it more production-ready, here are some things to add:

  • proper migration handling for database changes
  • proper ci/cd
  • swagger api documentation
  • data backups
  • a more robust implementation for message ordering to avoid clock drift bugs (i.e. vector clocks as used in CRDTs)
  • compliance with data retention regulation (i.e. support user data deletion and export for GDPR)
  • a more performant DB for the data model (specifically chat history -- Cassandra is a good option)
  • structured logging with external aggregation (i.e.zerolog and Loki or openobserve or highlight, with vector or fluentbit if data transformation is needed)
  • metrics, monitoring, and alerts (i.e. Grafana and Prometheus)
  • error tracking via an external service (i.e. Sentry or GlitchTip)