SaintZet / DayzMapsLoader

Project is to allow users to download maps for the game DayZ from two different map providers: Ginfo and Xam. The downloaded maps are of high quality and can be used to create different stuff. Also personal library of knowledge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Select your map, and create good stuff!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contacts
  8. Acknowledgments

About The Project

This Github pet project is an application built with Domain-Driven Design (DDD) architecture and modern development patterns. It has a server component built using ASP.NET Core and a client component built using React.

The main purpose of this project is to allow users to download maps for the game DayZ from two different map providers: Ginfo and Xam. The downloaded maps are of high quality and can be used to create posters, cups, or other stuff.

This repository is also a small personal library of knowledge.

(back to top)

Built With

  • .NET 6
  • MicrosoftSQLServer
  • Swagger
  • React
  • ReactQuery
  • TypeScript

(back to top)

Architecture

The concept of a Clean Architecture pattern has been around for over a decade and was initially conceived by Robert Martin. The keyword from Uncle Bob is Interchangeable. In the image below, everything on the blue circle is interchangeable, e.g., the UI can be swapped out from React to Angular, or the database can be migrated from MSSQL to Oracle, and nothing in the underlying layers needs to change.

The concept of having all your interfaces (Infrastructure and Application) in one project, will make it easier to Unit Test and mock.

(back to top)

Solution Structure


Domain layer I used Anemic Domain Model. Is used in DDD when the main focus is on data persistence and because in this project there's not much need for complex business logic.
A Rich Domain Model is preferred when complex business logic needs to be encapsulated within the entities.

Application layer
Public components
  • Contracts - interfaces for the Infrastructure layer (pattern Repository) and Services.
  • Features - Queries and Commands for pattern CQRS.
  • Extensions - here we have a method for configuring this layer for DI container.
  • Models - data necessary for internal work.

  • Internal components
  • Builders - classes that implement pattern builder.
  • Services - CQRS Handlers use it to get results.
  • Helpers - bad practice, but these classes made code more readable by grouping related functions and providing a clear purpose for the code.

  • Infrastructure layer
    Public components
  • Contexts - database contexts (EntityFramework).
  • Migrations - database migrations (EntityFramework).
  • Repositories - implement pattern Repository.
  • Extensions - here we have a method for configuring this layer for DI container.
  • Services - infrastructure services (i/o operation, network e.g.).

  • Presentation layer

    Web Api

    Public components

  • wwwroot - have custom UI for Swagger.
  • Controllers - connection between Application and Client(web, desktop, mobile).

  • Internal components
  • Extensions - here we have the method for configuring DI container.

  • Wpf

    Built using pattern MVVM pattern with modern approaches.

    Unit/integrations test
    The tests covered the main elements of the system. Secondary elements such as migrations are not covered, there is no coverage of the project's WPF.

    (back to top)

    Getting Started

    This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

    Prerequisites

    This is an example of how to list things you need to use the software and how to install them.

    • npm
      npm install npm@latest -g
    • Dotnet ef
      dotnet tool install dotnet-ef -g

    Installation

    1. Clone the repo
      git clone https://github.com/SaintZet/DayzMapsLoader.git
    2. Install NPM packages
      npm install
    3. Add a appsettings.json with connection string to DayzMapsLoader.Presentation.WebApi
        "ConnectionStrings": {
       "DefaultConnection": "Server = YourServer; DataBase=DayzMapLoader; User id= YourUserID; password= YourPassword; Integrated Security=True; TrustServerCertificate=True;"
       }
    4. At this point you can have EF create database and create schema from the migration .NET CLI:
      dotnet ef database update --startup-project ../DayzMapsLoader.Presentation.WebApi --project ../DayzMapsLoader.Infrastructure

    (back to top)

    Usage

    At the moment you can install the latest version of the product to start the server and get all the necessary maps. You know what to do with them.

    You can create a fork and expand the repository, for example

    • create a desktop client
    • change image processing algorithms
    • add functionality that is useful to you
    • other

    Take some techniques and approaches to your projects.

    And of course - to contribute to the development of the project, help with existing issues or create a new one, improve the algorithm, or change something else!

    (back to top)

    Roadmap

    • Provide archive(web) and byte array(desktop) with
      • selected map
      • selected map in parts
      • all maps by specific provider
    • Options for select a map
      • provider (GInfo e.g.)
      • name (Chernarus e.g)
      • type
        • satellite
        • topographic
        • tourist
      • zoom level
      • version
      • image quality
      • image extension
    • Desctop client on WPF
    • Web client on React (in the process)
    • Hosting server and client
    • Improve performance - store images on the server and just download them when changed something (e.g version map).

    See the open issues for a full list of proposed features (and known issues).

    (back to top)

    Contributing

    Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

    If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

    1. Fork the Project
    2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
    3. Commit your Changes (git commit -m 'Add some AmazingFeature')
    4. Push to the Branch (git push origin feature/AmazingFeature)
    5. Open a Pull Request

    (back to top)

    License

    Distributed under the MIT License. See LICENSE.txt for more information.

    (back to top)

    Contacts

    Chepets Serhii - @LinkedIn - serhii.chepets@gmail.com

    Yaroslav Tymchenko -@LinkedIn - ytimchenko57@gmail.com

    (back to top)

    Acknowledgments

    Domain Driven Design
    Unit Of Work and Repository patterns
    Cqrs and MediatR patterns
    Swagger

    (back to top)

    About

    Project is to allow users to download maps for the game DayZ from two different map providers: Ginfo and Xam. The downloaded maps are of high quality and can be used to create different stuff. Also personal library of knowledge.

    License:The Unlicense


    Languages

    Language:C# 94.8%Language:TypeScript 4.5%Language:HTML 0.6%