Skip to content

Repository files navigation

PulseData | E-Commerce Analytics Platform

PulseData is a production-style backend analytics project built with .NET 8, PostgreSQL, and a practical ETL pipeline.

This repository was designed to feel like real engineering work: ingest data, model it well, expose useful analytics, and keep operations healthy with tests and CI.

What You Get

  • Clean architecture split: Core, Infrastructure, API, ETL
  • SQL-first analytics with Dapper (performance and clarity)
  • Liveness/readiness health endpoints for orchestration
  • Docker-based local stack
  • Automated unit and integration tests for health behavior
  • CI pipeline on push and pull request to main

5-Minute Start

git clone https://github.com/kill74/PulseData.git
cd PulseData
# Start PostgreSQL + pgAdmin
docker-compose up -d
# Run ETL (loads sample orders)cd src/PulseData.ETL
dotnet run
# Run APIcd ../PulseData.API
dotnet run

Expected services:

Full Docker Mode

docker-compose --profile with-api up -d

Expected services:

Verify It Works

# Liveness
curl http://localhost:5000/api/health/live
# Readiness
curl http://localhost:5000/api/health/ready

Readiness semantics:

  • 200 when dependencies are healthy
  • 408 when a dependency check times out
  • 503 when a required dependency is unavailable

Note: health endpoints are anonymous by design to support probes from load balancers and orchestrators.

API Surface

Health

MethodEndpointPurpose
GET/api/health/liveProcess liveness
GET/api/health/readyDependency readiness

Analytics

MethodEndpoint
GET/api/analytics/sales-summary
GET/api/analytics/top-products?limit=10
GET/api/analytics/customer-stats?limit=20
GET/api/analytics/category-performance
GET/api/analytics/sales-by-period?startDate=2026-01-01&endDate=2026-01-31

Orders

MethodEndpoint
GET/api/orders?page=1&pageSize=20&status=shipped
GET/api/orders/{id}
GET/api/orders/by-customer/{customerId}

Customers

MethodEndpoint
GET/api/customers?page=1&pageSize=20
GET/api/customers/{id}

Products

MethodEndpoint
GET/api/products?page=1&pageSize=20&activeOnly=true
GET/api/products/{id}
GET/api/products/by-category/{categoryId}

Testing

Run the API test suite:

dotnet test ./tests/PulseData.API.Tests/PulseData.API.Tests.csproj

Current coverage includes:

  • Unit behavior tests for HealthController
  • Integration HTTP tests using WebApplicationFactory:
    • /api/health/live
    • /api/health/ready timeout path (408)
    • /api/health/ready dependency failure path (503)

CI

Workflow: .github/workflows/ci.yml

CI validates on push and pull request to main:

  • API restore + build
  • Test project restore + build
  • Health endpoint test execution

Repository Layout

PulseData/
src/
PulseData.Core/
PulseData.Infrastructure/
PulseData.API/
PulseData.ETL/
sql/
tests/
PulseData.API.Tests/
.github/workflows/
docker-compose.yml
Makefile

Useful Commands

# Reliable API build
dotnet build ./src/PulseData.API/PulseData.API.csproj
# Run health-related tests
dotnet test ./tests/PulseData.API.Tests/PulseData.API.Tests.csproj
# Start infra only
docker-compose up -d
# Start full stack
docker-compose --profile with-api up -d
# API logs (container mode)
docker-compose logs -f api

Documentation

License

MIT

About

A full-stack data engineering project built with C# / .NET 8, PostgreSQL, and a clean ETL pipeline. Designed to simulate a real-world business intelligence system for an e-commerce operation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages