A front-end developer with 12 years of experience shares how they learned NestJS, MongoDB, and Kafka by building a user analytics platform from scratch. The project uses a TypeScript monorepo managed with Turborepo, consisting of five apps: an analytics API, a core processing service, an SDK package, a tester UI, and a dashboard. The architecture decouples event ingestion (API) from processing (core) via Kafka topics, stores data in MongoDB, and implements analytics metrics like page views, dwell time, and unique sessions using downsampling algorithms like LTTB and Min-Max-Average. The author also reflects on NestJS architecture patterns, Domain-Driven Design influences, and CQRS as a future improvement.
56.1K Impressions