Skip to content

zeforgezenica/hamalba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

213 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup Guide

Cloning and Setting Up the Project

When you clone the project or download it from our GitHub repository, open it in Visual Studio. Also, install the MySQL.Data package within the project.

Test User

  • Username: user@hamalba.com
  • Password: User123!

EmailSettings.local.json

  • The project includes an EmailSettings.local.json file. This file is used to configure the SMTP settings for sending emails.
  • Make sure to update the SMTP settings in this file according to your email provider's requirements.
{
 "EmailSettings": {
   "Email": "email@mail.com",
   "AppPassword": "Your App Password"
 }
}

Dependencies

To install all required NuGet packages, run the following commands in the terminal:

  • dotnet tool install --global dotnet-ef

  • dotnet restore

  • dotnet ef migrations add InitialCreate

  • dotnet ef database update

Visual Studio Requirements

If you are using Visual Studio IDE, version 17.12 or higher is required for compatibility with .NET 9.0.

Required Software

.NET 9.0

MySQL 8.0.41.0

Download MySQL Installer: https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-8.0.41.0.msi

During installation, ensure to add MySQL Server.

MySQL Installation Guide

  • Open MySQL Installer.

alt text

  • Click on Next.

alt text

  • Add the following components to the installation:

  • Server (version 8.0.41)

  • Workbench (version 8.0.41)

  • Shell (version 8.0.41)

  • Router (version 8.0.41)

alt text

  • Click Execute and wait for the installation to complete.

alt text

  • Once installed, click Next.

alt text

  • Proceed with individual product configuration.

alt texet

  • Select the options as shown in the images and click Next.

alt text

  • Click Next.

alt text

  • Set 'root' as the password.

alt text

  • Select the options as shown in the images and click Next.

alt text

  • Grant necessary access and click Next.

alt text

  • Click Execute to apply settings.

alt text

  • Follow the on-screen steps to complete the configuration, click Next.

alt text

  • Follow the on-screen steps to complete the configuration click Finish.

alt text

  • Proceed with individual product configuration, click Next.

alt text

  • Username: root, Password: root, click Next.

alt text

  • Click Execute.

alt text

alt text

  • Finally, click Finish.

Running the Project

Once everything is set up, run your project by clicking the HTTPS option in the top section of Visual Studio.

Diagrams

Use Case

Activity

Additional Instructions for Linux and Mac

Installing .NET on Linux

  • Install the .NET SDK using the package manager for your distribution:

  • Ubuntu/Debian:

sudo apt-get update && sudo apt-get install -y dotnet-sdk-9.0

  • Fedora:

sudo dnf install dotnet-sdk-9.0

  • Arch Linux:

sudo pacman -S dotnet-sdk

  • Verify installation:

dotnet --version

  • Installing MySQL on Linux

  • Install MySQL Server:

sudo apt update && sudo apt install mysql-server

  • Start and enable MySQL service:

sudo systemctl start mysql sudo systemctl enable mysql

  • Secure your installation:

sudo mysql_secure_installation

  • Log in to MySQL:

mysql -u root -p

Installing .NET on macOS

  • Install Homebrew (if not installed):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  • Install .NET SDK:

brew install dotnet-sdk

  • Verify installation:

dotnet --version

Installing MySQL on macOS

  • Install MySQL using Homebrew:

brew install mysql

  • Start MySQL service:

brew services start mysql

  • Set up root password:

mysql_secure_installation

  • Log in to MySQL:

mysql -u root -p

Now, follow the same steps to restore dependencies and run your project!

This guide ensures smooth setup across Windows, Linux, and macOS.

Docker Support

The project now includes a Dockerfile and a docker-compose.yml for simplified containerized setup and deployment.

What's Included:

  • Automatic EF Core migration generation and execution

  • Dockerized environment for both the application and the database

  • Easy local development with isolated services

How to Run with Docker:

To build and run the entire application using Docker, run the following command in your terminal:

docker compose up --build

This command will:

  • Build the Docker image

  • Apply all EF Core migrations automatically

  • Start both the application and MySQL in Docker containers

MySQL Connection Details (Docker)

When connecting to the MySQL database running in Docker, use the following credentials:

  • Host: localhost

  • Port: 3307

  • Username: user

  • Password: userpass

Make sure that port 3307 is free on your system before starting Docker. If not, adjust the docker-compose.yml accordingly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors