Skip to content

DaniilPoiarkov/Eclipse

Repository files navigation

Eclipse

Getting started

Requirements

  • Docker
  • ngrok
  • .NET 8

Go to docker directory, create here a copy of docker-compose.override.yaml file with name docker-compose.local.yaml.

Follow instructions in this file to build the solution locally.

After entering all required values for your docker-compose.local.yaml file run .\build.ps1 script.

It will take a few minutes to start web api as cosmosdb emulator takes a while to prepare itself for work.

Check eclipse-webapi container logs.

Run .\stop.ps1 script to stop container. It will also remove image.

Architecture diagram

Eclipse-Project references drawio

Modules

WebAPI

Basicly controllers and health-checks.

Pipelines

Contain logic with telegram interaction. In other words it is available for end user functionality.

This diagram shows how pipeline concept works and how user message proccedes: Eclipse-pipeline-flow drawio

Application.Contracts

Provides public API for application use cases.

Application

Contains implementations of use cases.

Domain.Shared

Contains domain constants (like enums, const values) that can be shared thoughout whole solution.

Domain

Contains domain logic of application.

Core

Provides easy API to build and retrieve pipelines.

Localization

Built on top of Microsoft.Extensions.Localization engine to work with json files as resource source with bunch of useful stuff. Additionally provides an api which allows you to use another culture in disposable scope.

Infrastructure

Basicly contains wrappers with only necessary API and cross-cutting concerns.

DataAccess

Data persistence with EF Core Cosmos Db provider.

Tests

Each Test project reference base Eclipse.Tests class library, that provides helpers which used through all tests.

Each module has own test project.

BDD tests written with SpecFlow are all in the single tests assembly.

Integration tests also isolated in separate assembly called Eclipse.IntegrationTests.

Integrations

API

  • Google API
  • Telegram API

Tech stack

  • ASP.NET 8
  • Quartz
  • Azure CosmosDb
  • Polly
  • Scrutor
  • Serilog
  • EFCore
  • Redis
  • Azure Application Insights
  • MiniExcel
  • Docker

Testing

  • NSubstitute
  • XUnit
  • FluentAssertions
  • Bogus
  • Meziantou
  • SpecFlow
  • Testcontainers

Deployment and CICD

  • GitHub actions
  • Azure AppServices