Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3d9fdf1
feat: add enums: BloodGroup, Gender and RhesusFactor
maeosha Oct 2, 2025
b6a1c23
feat: add contract Appointment
maeosha Oct 2, 2025
44a437e
feat: add reference book Specialisation
maeosha Oct 2, 2025
628947b
feat: add entities: Doctor and Patient
maeosha Oct 2, 2025
e96ed1c
feat: add main class Clinic
maeosha Oct 2, 2025
7cd6a44
feat: add dataseed for unit-tests
maeosha Oct 2, 2025
95cf9fe
feat: add unit-tests
maeosha Oct 2, 2025
594985e
feat: add build configuration for C# project
maeosha Oct 2, 2025
f2e2575
feat: add solution
maeosha Nov 8, 2025
ab3db8c
add summary and chage blood goup names
maeosha Nov 8, 2025
faba51e
feat: extracted identical variables and functions from the doctors an…
maeosha Nov 8, 2025
3e1eda4
feat: Now these classes inherit the basic characteristics from Person…
maeosha Nov 8, 2025
06d6b89
fix: add summary
maeosha Nov 8, 2025
2fa6ec7
fix: Rewrite the tests and datasid, bring them to an adequate form.
maeosha Nov 8, 2025
b7a94a7
fix: delete old Contracts/Appointment
maeosha Nov 10, 2025
e2c2f53
fix: delete SpecialiSation.cs
maeosha Nov 10, 2025
5027d2e
feat: implement Patient management functionality with CRUD operations…
maeosha Nov 26, 2025
9fa5d71
feat: add Specialization management functionality with CRUD operation…
maeosha Nov 26, 2025
2c79b53
feat: implement Doctor management functionality with CRUD operations …
maeosha Nov 26, 2025
8223f2f
feat: implement Appointment management functionality with CRUD operat…
maeosha Nov 26, 2025
3f5f1aa
feat: implement ClinicDataBase with CRUD operations for patients, doc…
maeosha Nov 26, 2025
4f9e9a7
feat: add DataSeed class to populate the database with test data for …
maeosha Nov 26, 2025
ad3ca39
feat: add DateConverter for JSON serialization of DateOnly type
maeosha Nov 26, 2025
62c75e7
feat: add AutoMapper profile for mapping between DTOs and entity mode…
maeosha Nov 26, 2025
beb4bcb
feat: initialize Clinic API with main program setup, including servic…
maeosha Nov 26, 2025
272ee8c
feat: add TestServices and TestControllers for enhanced patient and d…
maeosha Nov 26, 2025
a602e50
feat: update DataSeed
maeosha Nov 26, 2025
ca81d9a
fix: change DateOnly to DateTime in GetAppointmentDto for correct dat…
maeosha Nov 26, 2025
6957ee2
fix: The Clinic.APi folder has been moved
maeosha Nov 27, 2025
ee57321
fix: Now Specialization is also an entity
maeosha Nov 27, 2025
91e7fbd
refactor: remove obsolete clinic model and associated test files
maeosha Nov 27, 2025
99b29a7
fix: update solution file to include Clinic.Api project and remove Cl…
maeosha Nov 27, 2025
42861b1
fix: remove custom mapping for DateTime in GetAppointmentDto
maeosha Nov 30, 2025
3a6d5da
feat: add service interfaces for appointment, doctor, patient, and sp…
maeosha Dec 6, 2025
20bb967
refactor: implement service interfaces for Appointment, Doctor, Patie…
maeosha Dec 6, 2025
a72bf0b
feat: add base and specific controller interfaces for appointment, do…
maeosha Dec 6, 2025
4e48065
feat: add UpdateSpecialization method to ClinicDataBase and update in…
maeosha Dec 6, 2025
65a26b1
refactor: implement base controller for appointment, doctor, patient,…
maeosha Dec 6, 2025
18fe57d
refactor: update service registrations to use interfaces for Patient,…
maeosha Dec 6, 2025
e84698d
feat: implement Entity Framework data access classes for Appointment,…
maeosha Dec 21, 2025
0c1363c
feat: add interfaces for appointment, doctor, patient, and specializa…
maeosha Dec 21, 2025
0d1a0be
Add initial database setup and seed data for clinic management system
maeosha Dec 21, 2025
7d33040
feat: implement analytics controller and refactor existing controller…
maeosha Dec 21, 2025
95f8bcf
Refactor clinic database structure and services
maeosha Dec 21, 2025
f48a48b
feat: add unit tests and project configuration for Clinic.Tests
maeosha Dec 21, 2025
557ee16
feat: add CI workflow for build and test automation
maeosha Dec 21, 2025
1202cae
feat: configure Swagger UI and enable automatic launch in development…
maeosha Dec 21, 2025
257dd06
chore: remove outdated issue and discussion templates, and PR template
maeosha Dec 21, 2025
670e4fd
feat: update DTO namespaces and add service defaults for improved str…
maeosha Dec 21, 2025
33b472c
feat: refactor repository interfaces and implementations for better s…
maeosha Dec 22, 2025
28438c0
fix: changed the database from MySQL to PostgreSQL
maeosha Dec 22, 2025
c81f41c
feat: add in-memory repositories for appointments, doctors, patients,…
maeosha Dec 23, 2025
0dc0c2a
Fix project SDK declaration in csproj file
maeosha Dec 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/DISCUSSION_TEMPLATE/questions.yml

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

131 changes: 131 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# GitHub Actions Workflows

Данный репозиторий содержит набор GitHub Actions workflows для автоматизации CI/CD процессов для ASP.NET Core проекта клиники.

## Доступные Workflows

### 1. CI Pipeline (`ci.yml`)
**Триггеры:** Push в `main`/`develop`, Pull Request в `main`/`develop`

**Функции:**
- Сборка .NET 9.0 проектов
- Восстановление NuGet зависимостей
- Запуск тестов (если есть)
- Кэширование NuGet пакетов для ускорения сборки

**Использование:**
```bash
# Локальная сборка
dotnet restore Clinic/Clinic.sln
dotnet build Clinic/Clinic.sln --configuration Release
dotnet test Clinic/Clinic.sln --configuration Release
```

### 2. Docker Build and Deploy (`docker.yml`)
**Триггеры:** Push в `main`, теги `v*`, Pull Request в `main`

**Функции:**
- Создание Docker образа для API
- Публикация образа в GitHub Container Registry
- Поддержка версионирования образов

**Использование:**
```bash
# Сборка Docker образа
docker build -f Clinic/Clinic.Api/Dockerfile -t clinic-api:latest .

# Запуск контейнера
docker run -p 8080:8080 clinic-api:latest
```

### 3. Azure Deploy (`azure-deploy.yml`)
**Триггеры:** Push в `main`, ручной запуск

**Функции:**
- Публикация .NET проекта
- Деплой в Azure App Service

**Необходимые Secrets:**
- `AZURE_WEBAPP_NAME` - имя Azure App Service
- `AZURE_WEBAPP_PUBLISH_PROFILE` - профиль публикации

**Настройка Azure:**
1. Создайте Azure App Service
2. Скачайте профиль публикации
3. Добавьте Secrets в GitHub репозиторий

## Структура файлов

```
.github/
├── workflows/
│ ├── ci.yml # Основной CI pipeline
│ ├── docker.yml # Docker сборка и деплой
│ ├── azure-deploy.yml # Azure App Service деплой
│ └── setup_pr.yml # Автоматическая настройка PR
├── ISSUE_TEMPLATE/
│ └── вопрос-по-лабораторной.md
├── PULL_REQUEST_TEMPLATE.md
└── DISCUSSION_TEMPLATE/
└── questions.yml

Clinic/
├── Clinic.Api/
│ ├── Dockerfile # Docker образ для API
│ └── .dockerignore # Исключения для Docker сборки
└── ...
```

## Настройка проекта

### Для локальной разработки:
```bash
# Восстановление зависимостей
dotnet restore Clinic/Clinic.sln

# Сборка проекта
dotnet build Clinic/Clinic.sln

# Запуск API
dotnet run --project Clinic/Clinic.Api

# Запуск с настройками разработки
cd Clinic/Clinic.Api
dotnet run
```

### Для Docker:
```bash
# Сборка образа
docker build -f Clinic/Clinic.Api/Dockerfile -t clinic-api .

# Запуск с базой данных (пример)
docker run -p 8080:8080 -e ConnectionStrings__DefaultConnection="Server=host.docker.internal;Database=ClinicDb;User=sa;Password=YourPassword;" clinic-api
```

## Переменные окружения

Для работы проекта необходимо настроить следующие переменные окружения:

### Development:
- `ASPNETCORE_ENVIRONMENT=Development`
- `ConnectionStrings__DefaultConnection` - строка подключения к БД

### Production:
- `ASPNETCORE_ENVIRONMENT=Production`
- `ConnectionStrings__DefaultConnection` - строка подключения к продакшн БД

## Дополнительные возможности

### Добавление тестов:
1. Создайте тестовый проект: `dotnet new xunit -n Clinic.Tests`
2. Добавьте ссылку на основной проект
3. CI pipeline автоматически запустит тесты

### Мониторинг:
- Логи Azure App Service доступны через Azure Portal
- Docker контейнеры можно мониторить через Docker Desktop или Azure Container Instances

### Безопасность:
- Используйте GitHub Secrets для хранения чувствительных данных
- Не коммитьте ключи подключения к БД в репозиторий
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Check

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore Clinic/Clinic.sln

- name: Build solution
run: dotnet build Clinic/Clinic.sln --configuration Release --no-restore

- name: Test solution
run: dotnet test ./Clinic/Clinic.Tests/Clinic.Tests.csproj --configuration Release --no-build --verbosity normal

77 changes: 0 additions & 77 deletions .github/workflows/setup_pr.yml

This file was deleted.

21 changes: 21 additions & 0 deletions Clinic/Clinic.Api/Clinic.Api.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Comment on lines +4 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Потому что ее никто не билдит

</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.0.0" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Clinic.Models\Clinic.Models.csproj" />
<ProjectReference Include="..\Clinic.Application\Clinic.Application.csproj" />
<ProjectReference Include="..\Clinic.DataBase\Clinic.DataBase.csproj" />
<ProjectReference Include="..\Clinic.ServiceDefaults\Clinic.ServiceDefaults.csproj" />
</ItemGroup>

</Project>
Loading