Skip to content

prathameshpatil24/Eventflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EventFlow

A cloud-native, event-driven platform for ingesting, processing, and storing application-level usage events.

EventFlow is designed as an engineering-first platform that demonstrates how modern software systems should be structured when long-term scalability, maintainability, and data-readiness are treated as first-class concerns. The system focuses on building the core infrastructure required to support analytics and ML use cases, rather than being a finished analytics product.


🎯 Project Overview

EventFlow addresses the common problem of event collection and management in modern applications. Many teams face difficulties with:

  • Tight coupling between product logic and analytics logic
  • Lack of standardization in event definitions
  • Poor scalability when event volume increases
  • Limited visibility into collected events
  • Difficult migration to analytics platforms later

EventFlow solves this by providing:

  • βœ… Clean and scalable event ingestion API
  • βœ… Centralized event storage with strong structure
  • βœ… Visibility into collected events
  • βœ… Extensibility for future analytics and ML use cases

πŸ—οΈ Architecture

EventFlow follows an event-first architecture with clear separation of concerns:

Frontend (Next.js) β†’ Backend API (NestJS) β†’ Event Store (PostgreSQL)
                                              ↓
                                    Consumer Groups β†’ Event Processing

Key Components

  • Frontend Dashboard - Next.js web application for managing streams, viewing events, and monitoring consumers
  • Backend API - NestJS REST API for event ingestion, querying, and management
  • Event Store - PostgreSQL database with append-only event storage
  • Consumer System - Consumer groups with offset tracking for reliable event consumption
  • Processing Pipeline - Async event processing with retry logic and dead letter queue

πŸ› οΈ Technology Stack

Frontend

  • Next.js 14+ (App Router) with TypeScript
  • React 18+ with Tailwind CSS
  • Zustand for global state management
  • React Query for server state
  • React Hook Form + Zod for form validation

Backend

  • Node.js with NestJS framework
  • PostgreSQL for event storage
  • Redis for caching and rate limiting
  • Prisma for database access and migrations
  • JWT for authentication
  • OpenTelemetry for observability

Infrastructure

  • AWS (EC2/ECS, RDS, CloudWatch)
  • Docker for containerization
  • Terraform for Infrastructure as Code
  • GitHub Actions for CI/CD

πŸ“š Documentation

This project includes comprehensive documentation covering the entire design and planning process:

Phase 0: Overview

Phase 1: Requirements

Phase 2: Architecture

Phase 3: Execution & Build Strategy


πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL 15+
  • Redis 7+
  • Docker (optional, for containerized deployment)
  • AWS Account (for cloud deployment)

Environment Variables

Copy backend/.env.example to backend/.env and frontend/.env.example to frontend/.env.local, then set your values.

Branching & development workflow

We use a simple branch model to keep main stable and integrate work in one place:

  • main β€” Stable/production branch. Only updated by merging from develop when a set of work is complete (e.g. a phase or release).
  • develop β€” Default working branch. Day-to-day development and feature integration happen here.
  • Feature branches β€” Create from develop (e.g. feature/phase-2-auth). When the feature is done, merge into develop only (not into main).

Flow: feature/* β†’ develop β†’ (when a set of code is complete) β†’ main.

This setup keeps main deployable while all new work is integrated and tested on develop.


🎯 Key Features

MVP Features

  • βœ… Event ingestion via REST API
  • βœ… Event stream management
  • βœ… Consumer groups with offset tracking
  • βœ… Dead letter queue for failed events
  • βœ… Web dashboard for event visualization
  • βœ… API key authentication
  • βœ… Role-based access control
  • βœ… Rate limiting
  • βœ… Structured logging and metrics

Future Enhancements

  • Real-time analytics dashboards
  • Stream processing (Kafka integration)
  • Machine learning pipelines
  • Advanced query capabilities
  • Multi-region replication

πŸ”’ Security

EventFlow implements comprehensive security measures:

  • Authentication: JWT tokens for users, API keys for producers
  • Authorization: Role-based access control (RBAC)
  • Encryption: Data encrypted at rest and in transit
  • Input Validation: Schema validation for all events
  • Rate Limiting: Per-API-key rate limits
  • Audit Logging: All security events logged

See Security Design for details.


πŸ§ͺ Testing

The project follows a comprehensive testing strategy:

  • Unit Tests: 80%+ coverage target
  • Integration Tests: All API endpoints tested
  • E2E Tests: Critical user journeys
  • Performance Tests: Load testing for event ingestion
  • Security Tests: Authentication and authorization testing

See Testing Strategy for details.


πŸ“Š Monitoring & Observability

EventFlow includes comprehensive observability:

  • Metrics: Business and technical metrics via CloudWatch
  • Logging: Structured JSON logs with request tracing
  • Tracing: Distributed tracing with OpenTelemetry/X-Ray
  • Alerting: Multi-level alerts (Critical, High, Medium, Low)
  • Dashboards: Custom CloudWatch dashboards

See Monitoring & Alerting Design for details.


🀝 Contributing

This is a personal project demonstrating production-ready system design. The documentation shows the complete thought process and architectural decisions.

When contributing, follow the branching workflow above: work on develop or a feature branch off develop, and merge to main only when a phase or release is complete.


πŸ™ Acknowledgments

This project demonstrates modern software engineering practices including:

  • Event-driven architecture
  • Cloud-native design
  • Production-ready planning
  • Comprehensive documentation

πŸ“ž Contact

prathamesh.patil000009@gmail.com


Built with careful planning and attention to production-ready architecture. πŸš€

About

Cloud-native, event-driven platform for collecting, storing, and exploring application usage events, designed with scalability and future analytics in mind.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors