Skip to content

AbrahamMT94/MiniLink

Repository files navigation

MiniLink

Build, test, and deploy .NET Core app to Windows WebApp MiniLink

Minilink is simple url shortener with basic reporting such as url visit count. This project follows the onion or layers architecture where the outer layers only rely on the ones one level beneath it to avoid tight coupling.

The project is currently live at the following url: https://minilink.azurewebsites.net/ (First load might take a few seconds while server warms up. Subsequent request should be fast.)

Project Structure

Minilink is broken down into 4 projects:

  1. Logic
  2. Server
  3. Client
  4. Test

Logic Project

The logic project is where our app live it contain separate folder for business logic, data access, etc.

The logic project contains 3 folders:

  • Data: Where the code for repositories and Data access layer lives
  • Core: Where the domain entitites live
  • Service: Where our services live

Server Project

This project is used interact and set up the app. It has few api controllers and also holds our dto mappers and is in charge of shortening our ids. This project is also in charge of serving our front end.

The project structure is as follows:

  • Controllers: This folder has controller for link registration as well as handling redirections
  • Mappers: A Mappers folder where our entity to dto mappers live
  • Utilities: Where any helper classes live

Client Project

The client project is a SPA written in Blazor Web Assembly. It contains components for supporting the creation and display of urls as well as search functionality and visit counter

The project structure is as follows:

  • wwwwroot: Where our content and css lives
  • Pages: Where our main components live
  • Shared: WHere our shared components live

Test Project

The test project contains a few unit and integration tests. Rather than mocking our interfaces or layers we use SQLite to generate actual contexts to simulate the database. This of course might not be always feasable and it might be desirable to perhaps use an actual test database that is closer to our production environment but for this demo it should suffice. Testing is done via XUnit.

The project structure is as follows:

  • MiniLinkTests: In this folder you'll find folder that test our data access layer and service layer.
  • ServerTests: In this folder you'll find tests pertaining the server (At the moment its missing controller tests)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published