Skip to content

Repository files navigation

SoftServe IT Academy

Victory Center####

Subtitle or Short Description Goes Here

Ideally one sentence

include terms/tags that can be searched

Build Status Coverage Status Github Issues Pending Pull-Requests

Quality Gate Status Coverage Bugs Code Smells Security Rating

  • For more on these wonderful badges, refer to shields.io.

Table of Contents (Optional)

If your README has a lot of info, section headers might be nice.


Folder structure

VictoryCenter-Back/
├── .github/
│   ├── ISSUE_TEMPLATE/
│   ├── PULL_REQUEST_TEMPLATE/
│   └── workflows/
├── docs
├── VictoryCenter
│   ├── VictoryCenter.BLL
│   │   ├── Commands
│   │   │   ├── Admin
│   │   │   │   ├── Auth
│   │   │   │   │   ├── Login
│   │   │   │   │   ├── Logout
│   │   │   │   │   └── RefreshToken
│   │   │   │   ├── Donate
│   │   │   │   │   ├── CorrespondentBankDetails
│   │   │   │   │   │   ├── Create
│   │   │   │   │   │   ├── Delete
│   │   │   │   │   │   └── Update
│   │   │   │   │   ├── ForeignBankDetails
│   │   │   │   │   │   ├── Create
│   │   │   │   │   │   ├── Delete
│   │   │   │   │   │   └── Update
│   │   │   │   │   ├── SupportOptions
│   │   │   │   │   │   ├── Create
│   │   │   │   │   │   ├── Delete
│   │   │   │   │   │   └── Update
│   │   │   │   │   └── UahBankDetails
│   │   │   │   │       ├── Create
│   │   │   │   │       ├── Delete
│   │   │   │   │       └── Update
│   │   │   │   ├── FaqQuestions
│   │   │   │   │   ├── Create
│   │   │   │   │   ├── Delete
│   │   │   │   │   ├── Reorder
│   │   │   │   │   └── Update
│   │   │   │   ├── HippotherapyProgramCategories
│   │   │   │   │   ├── Create
│   │   │   │   │   ├── Delete
│   │   │   │   │   └── Update
│   │   │   │   ├── HippotherapyPrograms
│   │   │   │   │   ├── Create
│   │   │   │   │   ├── Delete
│   │   │   │   │   └── Update
│   │   │   │   ├── Images
│   │   │   │   │   ├── Create
│   │   │   │   │   ├── Delete
│   │   │   │   │   └── Update
│   │   │   │   ├── TeamCategories
│   │   │   │   │   ├── Create
│   │   │   │   │   ├── Delete
│   │   │   │   │   └── Update
│   │   │   │   └── TeamMembers
│   │   │   │       ├── Create
│   │   │   │       ├── Delete
│   │   │   │       ├── Reorder
│   │   │   │       └── Update
│   │   │   └── Public
│   │   │       └── Payment
│   │   │           ├── Common
│   │   │           └── WayForPay
│   │   ├── Constants
│   │   ├── DTOs
│   │   │   ├── Admin
│   │   │   │   ├── Auth
│   │   │   │   ├── Common
│   │   │   │   ├── Donate
│   │   │   │   │   ├── CorrespondentBankDetails
│   │   │   │   │   ├── ForeignBankDetails
│   │   │   │   │   ├── SupportOptions
│   │   │   │   │   └── UahBankDetails
│   │   │   │   ├── FaqQuestions
│   │   │   │   ├── HippotherapyProgramCategories
│   │   │   │   ├── HippotherapyPrograms
│   │   │   │   ├── Images
│   │   │   │   ├── TeamCategories
│   │   │   │   ├── TeamMembers
│   │   │   │   └── VisitorPages
│   │   │   ├── Common
│   │   │   └── Public
│   │   │       ├── FaqQuestions
│   │   │       ├── HippotherapyPrograms
│   │   │       ├── Payment
│   │   │       │   ├── Common
│   │   │       │   └── WayForPay
│   │   │       └── TeamPage
│   │   ├── Exceptions
│   │   │   ├── BlobStorageExceptions
│   │   │   └── ReorderExceptions
│   │   ├── Helpers
│   │   ├── Interfaces
│   │   │   ├── BlobStorage
│   │   │   ├── PaymentService
│   │   │   ├── ReorderService
│   │   │   ├── Search
│   │   │   └── TokenService
│   │   ├── Mapping
│   │   │   ├── Donate
│   │   │   ├── FaqQuestions
│   │   │   ├── HippotherapyProgramCategories
│   │   │   ├── HippotherapyPrograms
│   │   │   ├── Images
│   │   │   ├── TeamCategories
│   │   │   ├── TeamMembers
│   │   │   └── VisitorPages
│   │   ├── Options
│   │   │   └── Payment
│   │   ├── Queries
│   │   │   ├── Admin
│   │   │   │   ├── Donate
│   │   │   │   │   ├── ForeignBankDetails
│   │   │   │   │   │   └── GetAll
│   │   │   │   │   ├── SupportOptions
│   │   │   │   │   │   └── GetAll
│   │   │   │   │   └── UahBankDetails
│   │   │   │   │       └── GetAll
│   │   │   │   ├── FaqQuestions
│   │   │   │   │   ├── GetByFilters
│   │   │   │   │   └── GetById
│   │   │   │   ├── HippotherapyProgramCategories
│   │   │   │   ├── HippotherapyPrograms
│   │   │   │   │   ├── GetByFilters
│   │   │   │   │   └── GetById
│   │   │   │   ├── Images
│   │   │   │   │   ├── GetById
│   │   │   │   │   └── GetByName
│   │   │   │   ├── TeamCategories
│   │   │   │   │   └── GetAll
│   │   │   │   ├── TeamMembers
│   │   │   │   │   ├── GetByFilters
│   │   │   │   │   ├── GetById
│   │   │   │   │   └── Search
│   │   │   │   └── VisitorPages
│   │   │   │       └── GetAll
│   │   │   └── Public
│   │   │       ├── FaqQuestions
│   │   │       │   └── GetPublished
│   │   │       ├── HippotherapyPrograms
│   │   │       │   └── GetPublished
│   │   │       └── TeamPage
│   │   │           └── GetPublished
│   │   ├── Services
│   │   │   ├── BlobStorage
│   │   │   ├── PaymentService
│   │   │   ├── ReorderService
│   │   │   ├── Search
│   │   │   │   └── Helpers
│   │   │   └── TokenService
│   │   └── Validators
│   │       ├── Auth
│   │       ├── Donate
│   │       │   ├── CorrespondentBankDetails
│   │       │   ├── ForeignBankDetails
│   │       │   ├── SupportOptions
│   │       │   └── UahBankDetails
│   │       ├── FaqQuestions
│   │       ├── HippotherapyProgramCategories
│   │       ├── HippotherapyPrograms
│   │       ├── Images
│   │       ├── Payment
│   │       ├── TeamCategories
│   │       └── TeamMembers
│   ├── VictoryCenter.DAL
│   │   ├── Data
│   │   │   ├── BaseEntity
│   │   │   └── EntityTypeConfigurations
│   │   ├── Entities
│   │   │   └── Interfaces
│   │   ├── Enums
│   │   ├── Migrations
│   │   └── Repositories
│   │       ├── Interfaces
│   │       │   ├── Base
│   │       │   ├── Donate
│   │       │   ├── FaqPlacements
│   │       │   ├── FaqQuestions
│   │       │   ├── HippotherapyProgramCategories
│   │       │   ├── HippotherapyPrograms
│   │       │   ├── Media
│   │       │   ├── TeamCategories
│   │       │   ├── TeamMembers
│   │       │   └── VisitorPages
│   │       ├── Options
│   │       └── Realizations
│   │           ├── Base
│   │           ├── Donate
│   │           ├── FaqPlacements
│   │           ├── FaqQuestions
│   │           ├── HippotherapyProgramCategories
│   │           ├── HippotherapyPrograms
│   │           ├── Media
│   │           ├── TeamCategories
│   │           ├── TeamMembers
│   │           └── VisitorPages
│   ├── VictoryCenter.DbUpdate
│   │   └── Helpers
│   ├── VictoryCenter.IntegrationTests
│   │   ├── ControllerTests
│   │   │   ├── Auth
│   │   │   ├── CorrespondentBankDetails
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   └── Update
│   │   │   ├── FaqQuestions
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetById
│   │   │   │   ├── GetFiltered
│   │   │   │   ├── GetPublished
│   │   │   │   ├── Reorder
│   │   │   │   └── Update
│   │   │   ├── ForeignBankDetails
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetAll
│   │   │   │   └── Update
│   │   │   ├── HippotherapyProgramCategories
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetAll
│   │   │   │   └── Update
│   │   │   ├── HippotherapyPrograms
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetById
│   │   │   │   ├── GetFiltered
│   │   │   │   ├── GetPublished
│   │   │   │   └── Update
│   │   │   ├── Images
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetById
│   │   │   │   ├── GetByName
│   │   │   │   └── Update
│   │   │   ├── Payments
│   │   │   ├── SupportOptions
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetAll
│   │   │   │   └── Update
│   │   │   ├── TeamCategories
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetAll
│   │   │   │   └── Update
│   │   │   ├── TeamMembers
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetById
│   │   │   │   ├── GetFiltered
│   │   │   │   ├── GetPublished
│   │   │   │   ├── Reorder
│   │   │   │   ├── Search
│   │   │   │   └── Update
│   │   │   ├── UahBankDetails
│   │   │   │   ├── Create
│   │   │   │   ├── Delete
│   │   │   │   ├── GetAll
│   │   │   │   └── Update
│   │   │   └── VisitorPages
│   │   │       └── GetAll
│   │   ├── MiddlewareTests
│   │   └── Utils
│   │       ├── DbFixture
│   │       └── Seeders
│   │           ├── CorrespondentBankDetails
│   │           ├── FaqQuestions
│   │           ├── ForeignBankDetails
│   │           ├── HippotherapyProgramCategoriesSeeder
│   │           ├── HippotherapyProgramSeeder
│   │           ├── Images
│   │           ├── SupportOptions
│   │           ├── TeamCategories
│   │           ├── TeamMembers
│   │           └── UahBankDetails
│   ├── VictoryCenter.UnitTests
│   │   ├── MediatRHandlersTests
│   │   │   ├── Auth
│   │   │   ├── Donate
│   │   │   │   ├── CorrespondentBankDetails
│   │   │   │   ├── ForeignBankDetails
│   │   │   │   ├── SupportOptions
│   │   │   │   └── UahBankDetails
│   │   │   ├── FaqQuestions
│   │   │   ├── HippotherapyProgramCategories
│   │   │   ├── HippotherapyPrograms
│   │   │   ├── Images
│   │   │   ├── Payment
│   │   │   ├── TeamCategories
│   │   │   ├── TeamMembers
│   │   │   └── VisitorPages
│   │   ├── MiddlewareTests
│   │   ├── ServiceTests
│   │   │   └── Payment
│   │   └── ValidatorsTests
│   │       ├── Auth
│   │       ├── Donate
│   │       ├── FaqQuestions
│   │       ├── HippotherapyProgramCategories
│   │       ├── HippotherapyPrograms
│   │       ├── Payment
│   │       ├── TeamCategories
│   │       └── TeamMembers
│   └── VictoryCenter.WebAPI
│       ├── Controllers
│       │   ├── Admin
│       │   ├── Common
│       │   └── Public
│       ├── Extensions
│       ├── Factories
│       ├── Middleware
│       ├── Properties
│       ├── Utils
│       │   └── Settings
│       └── wwwroot
│           └── Images
├── .gitignore
├── docker-compose.yml
└── README.md

Installation

  • All the code required to get started
  • Images of what it should look like

Required to install

Environment

environmental variables

DB_CONNECTION_STRING="<DB_CONNECTION_STRING>"
INITIAL_ADMIN_EMAIL="<INITIAL_ADMIN_EMAIL>"
INITIAL_ADMIN_PASSWORD="<INITIAL_ADMIN_PASSWORD>"
JWTOPTIONS_SECRETKEY="<JWT_ACCESS_SECRET>"
JWTOPTIONS_REFRESH_TOKEN_SECRETKEY="<JWT_REFRESH_SECRET>"
BLOB_LOCAL_STORE_KEY="<BLOB_LOCAL_STORE_KEY>"
WAY4PAY_MERCHANT_LOGIN="<WAY4PAY_MERCHANT_LOGIN>"
WAY4PAY_MERCHANT_SECRET_KEY="<WAY4PAY_MERCHANT_SECRET_KEY>"
WAY4PAY_MERCHANT_DOMAIN_NAME="<WAY4PAY_MERCHANT_DOMAIN_NAME>"
WAY4PAY_API_URL="<WAY4PAY_API_URL>"

Clone

  • Clone this repo to your local machine using https://github.com/ita-social-projects/VictoryCenter-Back.git

Setup

How to run local

  • Create .env in the WebAPI layer and insert all fields that are in .env.example.

How to connect to db locally

  1. launch SQL Server management Studio
  2. In the pop-up window:
    • enter "localhost" as the server name;
    • select "windows authentication" as authentication mechanism;
  3. After the connection has been established, right-click on the server (the first line with the icon), on the left-hand side of the UI
  4. In the the appeared window find and click on "properties"
  5. In the properties section, select "security" page
  6. Make sure that "Server authentication" radio-button is set to "SQL Server and Windows Authentication mode"
  7. Click "Ok"
  8. Then again, on the left-hand side of the UI find folder entitled "Security", and expand it
  9. In unrolled list of options find folder "Logins", and expand it
  10. At this point, you should have "sa" as the last option. If for some reason you do not see it, please refer to https://stackoverflow.com/questions/35753254/why-login-without-rights-can-see-sa-login
  11. Right-click on the "sa" item, select "properties"
  12. Change password to the default system one - "Admin@1234". Don't forget to confirm it afterwards
  13. On the left-hand side select "Status" page, and set "Login" radio-button to "Enabled"
  14. Click "Ok"
  15. Right click on "localhost" server on the left-hand side of the UI and click "Restart"

Now you can connect to your localhost instance with login (sa) and password (Admin@1234)!

Apply database migrations

Run the following command to apply migrations and create the database schema:

dotnet run --project VictoryCenter.DbUpdate

If migrations are missing or need to be created, here is an example:

dotnet ef migrations add InitialCreate --project VictoryCenter.DAL --startup-project VictoryCenter.WebAPI
dotnet run --project VictoryCenter.DbUpdate

Run the application

Start the ASP.NET Core application:

dotnet run --project VictoryCenter.WebAPI

Alternatively, if using Visual Studio:

  1. Open the VictoryCenter.sln solution.
  2. Set VictoryCenter.WebAPI as the startup project.
  3. Press F5 to run in debug mode.

Once started, the app will be accessible at:

If any dependencies are missing, install them with:

dotnet restore

How to run Docker

how to connect to db via docker

  1. Install and set up Docker if you haven't already
  2. Open Docker Desktop
  3. Open a terminal (either inside or outside your IDE)
  4. Navigate to the project directory: .../VictoryCenter-Back/VictoryCenter
  5. Start the Docker containers:
docker compose up
  1. Wait for Docker to pull and set up the necessary images and containers.
  2. then open the appsettings.Development.json file and change Server to:
  Server=localhost,1434;

The Docker-based database should now be running and ready for use!

Additioanal information

1.The database container must be running whenever you're working on the backend. To start it:

  docker compose up

2.To stop the database:

  docker compose down

Alternatively, you can use Docker Desktop:

  1. Open Docker Desktop.
  2. Go to the Containers tab
  3. Find victorycenter-back
  4. Start or stop it as needed

Troubleshooting

If you encounter issues or want to reset the database:

  docker compose down -v

Then recreate it using:

  docker compose up

Usage

How to work with swagger UI

How to run tests


Static Code Analysis

To keep the codebase clean and maintainable, we use:

  • .editorconfig for unified code formatting
  • StyleCop analyzers across all projects
  • SonarCloud for static code analysis
  • SonarLint for IDE integration

Supported editors: Visual Studio 2022 / VS Code / Rider

Quick Setup

  1. .editorconfig
    Already included — most IDEs pick it up automatically.

  2. SonarLint
    Set up SonarLint and bind it to the VictoryCenter-Back project of the ita-social-projects org using your personal SonarCloud token.

  3. Fix issues locally
    Your IDE will highlight style/code issues in real time. Please, fix them before committing anything to avoid CI fails.

Detailed setup guide: docs/104-Static-Code-Analysis.md


Documentation


Contributing

  1. All Pull Requests should start from prefix #xxx-yyy where xxx - task number and and yyy - short description e.g. #020-CreateAdminPanel
  2. Pull request should not contain any files that is not required by task.

In case of any violations, pull request will be rejected.

Git flow

To get started...

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine using https://github.com/ita-social-projects/SOMEREPO.git

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3

Issue flow


Our Team

@IrynaZavushchak @Halyna Melnyk @LanchevychMaxym @Roman Serhiichuk



FAQ


Support

Reach out to us at one of the following places!


License

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages