Giter Site home page Giter Site logo

f-nunez / veterinaryclinic Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 6.89 MB

Veterinary Clinic in .NET 7 with clean architecture for Blazor Web Assembly ASP.NET Core hosted model and built with Radzen Components

License: MIT License

C# 87.48% HTML 8.52% CSS 2.22% Dockerfile 0.22% SCSS 0.02% JavaScript 0.05% Less 1.50%
blazor clean-architecture ddd domain-driven-design dotnet entity-framework-core identity-server masstransit repository-pattern signalr specification-pattern unit-of-work xunit

veterinaryclinic's People

Contributors

f-nunez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

veterinaryclinic's Issues

Dockerize

As a product owner, I want turn the current applications into Docker containers as an alternative for development and deployment.

SharedKernel's nuget packages should be imported as local source on each required solution to avoid developers build those nugets on their own.

An explicit folder should be created for handling Patient's photos between solutions on the repository for fast development. Consider that could be mounted into a Volume on ClinicManagement Api and Scheduling Api.

Self-Signed SSL should be implemented on each deployment.

Configure local host/machine DNS to simulate a DNS server. Naming subdomains for each public app like clinicmanagement-blazor.vc.local, scheduling-blazor.vc.local and identity-api.vc.local.

On each existing application it must perform the following tasks:
Scaffold application.
Create a Dockerfile.
Create a Docker ignore file.
Build image.
Run container.

Criteria:

  • Allocate nugets into a folder called local_nugets. Example: "\SharedKernel\local_nugets\Fnunez.VeterinaryClinic.SharedKernel.Domain.1.3.2.nupkg"
  • Import SharedKernel nugets in each required solution (ClinicManagement, ClinicManagementNotifications, Scheduling, SchedulingNotifications, SchedulingEmailSender).
  • Add Docker's ignore file in each solution.
  • Add Dockerfile for building image in each solution.
  • Add and configure a Docker compose to build the entire solution.
  • Add a file server (Samba) to improve sharing data between Backend.
  • Add at least a custom network to avoid default Docker network.
  • Expose required ports for inbound and outbound to talk to other containers.
  • Assign ports from 14330+ for databases forwarding the default port 1433 for local debugging through SQL Manager Studio.
  • Databases should be accessed from host machine through 127.0.0.1 plus its connection string properties.

Plus (Extra):

  • Each boundary context should have its own virtual network
  • RabbitMq should have its own virtual network shared through required boundary context
  • File server should have its own virtual network shared to required boundary context
  • Deploy (Frontend) with a DNS name instead of localhost
  • Add and run self-certified in each container
  • Add multiple environment stages (Local Development, Docker Development, Docker Nginx)

Skeleton

As a product owner I want an initial framework to apply Domain Driven Design and Clean architecture for the Veterinary Clinic applications.

Add empty solutions that will contains applications based on bounded contexts:

  • Scheduling
  • ClinicManagement
  • Public

Add solution to implement models on multiple bounded contexts:

  • SharedKernel

Scheduling

As a product owner I want a web application to arrange appointments in the veterinary clinic.

Criteria:

web api as back-end.
web application in Blazor as front-end.

Update Dependencies

As a product owner, I want every solution to be up to date for backend and frontend.

Soft Delete

As a product owner, all information should be saved forever. Means that delete is going to be a soft delete. The decision was taken from domain experts and described like cancel/non-active register.

Criteria:

  • Add Delete (soft delete) and Hard Delete (permanent delete) methods into repository layer.
  • Implement soft delete in each ClinicManagemenet's boundary features.
  • Implement soft delete in each Scheduling's boundary features.

Public

As a product owner I want a web application based on MVC architecture to show appointments confirmed by the users. Users can put the link for appointment confirmation.

Criteria:

  • Receive a Guid value through specified action method and show a confirmation page that let users know about confirmed appointment.
  • The confirmation view should show the following text: "The appointment has been successfully confirmed. We will glad to see you soon!"

Notes:

ClinicManagement

As a product owner I want a web application to manage the veterinary clinic.

Criteria:

  • web api as back-end.
  • web application in Blazor as front-end.

SpecificationPattern

As a product owner I want have specification pattern into Shared Kernel layer to produce better filter criterias against the data bases.

Notifications

As a product owner, I want a Notification Center on ClinicManagement and Scheduling applications to notify the Users about changes that have been made in the entire application.
A mechanism must be implemented to display these notifications to Users. For the notification UI, a component from the Radzen framework must be used.
The users must be auditable "record User's id on entities that create/change on upstream contexts".

Criteria:

  • Add ClinicManagementNotifications and SchedulingNotifications API.
  • Implement Notification Engine to process and retrieve notifications to their respective user.
  • Add SignalR Hub in each notifications API.
  • Add SignalR Client in each blazor application to subscribe to their Notification's API hub.
  • Add controller to let blazor applications get notifications.
  • Secure Notification's APIs.
  • Secure SignalR clients and SignalR hubs.
  • Each notifications API must be subscribed to MassTransit to consume incoming contracts from upstream contexts.
  • Show a Notification's bell at User's bar to show if there are new notifications.
  • Show a Notification list when User's click on the Notification's bell.
  • The Notification's list must be scrollable, ordered by descending date and show infinite notifications.
  • The Notification must show an icon, title and/or message.
  • The Notification could have actions like refresh or redirect to the module/detail page.
  • The Notification should allow users to get read it and deleted.
  • Add Notification Center module in ClinicManagement and Scheduling applications.
  • The Notification Center must have Title, Message, Status and Created On columns.
  • The Notification Center should have a default paginated list by Created On column in descending direction.
  • The Notification Center must show a group of radio buttons (read, unread or all) to filter notifications by its status.
  • The Notification Center must show a button (delete all) to let users delete all notifications shown in the current page.

Organize MassTransit Message

As a product owner, I want the whole backend organized where MassTransit is implemented. Messages and Consumers should be organized per context.

Events are multicast for multiple consumers, commands for single consumer. So consumer has their own input queue which messages are being routed via exchanges.

Each message type, MassTransit creates (by default ) a fanout exchange based on the message type, fanout exchange and queue for each consumer.

Three dependency like:
EventTypeExchange > ConsumerExchange > ConsumerQueue

Testing

As a product owner, I want the backend side being automated tests to ensure that application code does what its intended to do. Each solution should contains its own tests isolated per testing types (unit and integration).
eg. .../ClinicManagement/tests/

Enforce Integration tests to application layer.

Criteria:

  • Implement unit tests.
  • Implement integration tests.

Release 2023-05-01

As a product owner, I want the whole System being fully tested and deployed into a Virtual Private Server (VPS) to be ready for the first release. Include documentation (including README file or linked to others).

Criteria:

  • Apply e2e tests on whole system.
  • Provide use case for production deployment on a VPS.
  • Include documentation.

Identity

As a product owner, I want an application to authenticate and authorize employees (Users) that will have roles.

Creteria:

  • Add Identity boundary.
  • Implement Identity AspNet Core as base for the users info.
  • Implement IdentityServer to authenticate and authorize users.
  • Secure ClinicManagement and Scheduling apps.
  • Roles (Staff and Manager).

Notes:
Permissions is out of this story. Just integrate IdentityServer for authentication/authorization.

Appointment Confirmation

As a product owner, I want that Scheduling application send emails to Clients about their appointments statuses.
An email must be send to Client with information about the appointment and a link (Public Site link) to confirm the appointment (booked, updated or cancelled). The Publis Site should show a friendly confirmation message and care about Client's preferred language.
Users must receive an app notification about the confirmed appointment by the Client.

Add SchedulingEmailSender api to build emails.
Add EmailService api to send emails.

Expected flow for a created appointment up to being confirmed:

  1. An User book an appointment.
  2. Other Users receive an app notification about the created appointment.
  3. The Client (owner) receive an email about its appointment status with a link to confirm the appointment.
  4. The Client click/use the link provided in the email message and gets redirected to the Public Site.
  5. The Public Site gets communication to Scheduling Api and confirm the appointment.
  6. Users receive an app notification about the confirmed appointment from Public Site.

Expected flow for an updated appointment (only if the start date is changed) up to being confirmed:

  1. An User update an appointment where its start date is changed.
  2. Other Users receive an app notification about the updated appointment.
  3. The Client (owner) receive an email about its appointment status with a link to confirm the appointment.
  4. The Client click/use the link provided in the email message and gets redirected to the Public Site.
  5. The Public Site gets communication to Scheduling Api and confirm the appointment.
  6. Users receive an app notification about the confirmed appointment from Public Site.

Expected flow for a deleted appointment:

  1. An User delete an appointment.
  2. Other Users receive an app notification about the deleted appointment.
  3. The Client (owner) receive an email about its appointment status.

Criteria:

  • Add preferred language to Client model in ClinicManagement and Scheduling apps.
  • Add preferred language field into Client's add/edit/detail component pages in ClinicManagement app.
  • Add preferred language field into Client's detail component page in Scheduling app.
  • Request email if appointment is created in Scheduling App.
  • Request email if appointment is deleted in Scheduling App.
  • Request email if Appointment's StartOn field is changed in Scheduling App.
  • Users must receive app notification when a created appointment is confirmed.
  • Users must receive app notification when an updated (StartOn date is changed) appointment is confirmed.
  • Add SchedulingEmailSender Api empty solution.
  • SchedulingEmailSender Api must be subscribed to MassTransit to consume incoming message contracts from upstream contexts (Scheduling Api).
  • Implement Email Engine into SchedulingEmailSender Api to build emails and send to EmailService Api.
  • The Email Engine should build email body from Razor/Html templates.
  • The Email Engine should build email body with respective Client's preferred language.
  • The Email Engine must encrypt parameteres on confirmation link to obfuscate information on Public Site's.
  • Add functionallity to provide the Appointment's confirmation link on email messages.
  • Add EmailService Api to consume and send emails requested by the SchedulingEmailSender Api.
  • Handle incoming links in Public Site.
  • Decrypt parameteres on confirmation link in Public Site.
  • Public Site must send Appointment's Id to Scheduling Api through a contract on ServiceBus.

Dockerize Improvements

As a product owner, I want improve the current Docker files and composes involved on each project. Should be applying best practices to care about security and performance. Inpsect and find standard conventions used on Docker Compose files that could had been missed into existing.

Criteria:

  • Apply docker best practices into existing files/configurations.
  • Apply standard conventions from offical docker guides.
  • Build smaller and secure images. (Improving performance minimizing images with trusted official sources like alpine/slim versions).

Plus (Extra):

  • Reduce image size copying only needed files or Ignoring not needed files to build images from Dockerfiles.
  • Implement free open sourced Scanners for vulnerabilities (if possible).

Clinic Management UI

As a product owner, I want the Clinic Management app have a decent user interface for better experience of managing staff.

Criteria:

  • Implement Radzen.Blazor as well was applied in the Scheduling app.

Event Driven

As a product owner, I want a functionality to synchronize data between downstream boundary contexts (distributed applications).

Criteria:

  • Implement Event Driven Architecture to convey needed data between different service boundaries.
  • Implement Message Broker (RabbitMQ) to keep consistency input and output operative messages.
  • Implement Service Bus (MassTransit) to control the workflow in each boundary contexts and the Message Broker.
  • The user should see all needed data replicated from ClinicManagement to Scheduling application.

Notes:

  • Nominal, Retry and Dead Letter Queue are out of this user story.
  • Domain Events should be handled internally within the boundary of the domain.
  • Integration Events propagate data/messages to other boundaries. Are part of the public contracts that other systems can subscribe to.

Release 2023-06-01

As a product owner, I want the whole System being fully tested and deployed into a Virtual Private Server (VPS) to be ready for the second release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.