Top

Installation

This page has all the information you will need to setup your project. Here you will get to know what are the things that you will need to install before you start working on your project. Make sure you don't miss a single step.

Prerequisites & Tools Installation

Step 1: Visual Studio 2022 (Latest)
  1. Download from: Visual Stuio 2022 Community
  2. During installation, select the following Workloads:
    1. ASP.NET and web development
    2. .NET desktop development
  3. Under Individual Components, make sure to check:
    1. .NET 9 SDK
    2. .NET Runtime
    3. .NET Core cross-platform development
Step 2: .NET 9 SDK
  1. If you have Visual Studio but do not have the .NET 9 SDK, follow this link:
    https://dotnet.microsoft.com/en-us/download/dotnet/9.0

Step 3: SQL Server
  1. Use SQL Server 2022 or newer
  2. SQL Server Management Studio (SSMS) is recommended for managing the database.
  3. Download:
    1. SQL Server 2022 Developer
    2. SQL Server Management Studio V21

Setting Up TimeSync

Now that you have installed ASP.NET 9.0 and SQL Server in your system its time to setup the TimeSync application.

Step 1: Unzip the Project Folder

Extract the contents of the zipped TimeSync folder to your desired directory.

Step 2: Open the Solution in Visual Studio
  1. Open Visual Studio 2022 or later.
  2. Go to File > Open > Project/Solution.
  3. Navigate to the extracted folder and open the TimeSync.sln file.
Step 3: Configure appsettings.json

Open the appsettings.json file and update the following sections according to your environment:

  1. Connection Strings

    Update the database connection strings:

    
    "ConnectionStrings": {
    "DefaultConnection": "trustServerCertificate=true;Initial Catalog=TimeSyncDB;Data Source=.;User ID=sa;password=Your_Password",
    "HangfireConnection": "trustServerCertificate=true;Initial Catalog=HangfireCoreDB;Data Source=.;User ID=sa;password=Your_Password"
    }
    
  2. Path Settings

    You can change these paths to any valid directory on your system. If the specified folders do not exist, the application will automatically create them at runtime.

    
    "PathSettings": {
    "Folder": "C:/WaiziStack/TimeSync",
    "ImagePath": "ApplicationData/Images",
    "LogPath": "Logs/logfile.txt"
    }
    
  3. General Settings

    BaseURL: The base address of your application. In development, this is usually https://localhost:[port]. In production, update this to match your live domain (e.g., https://yourdomain.com/).

    Environment: Set this to "Development" for local development.When deploying to production, change this value to "Production". This helps the application differentiate between dev and prod behavior.

    DevEnvEmail: While in development, all outgoing emails (e.g., approvals, notifications) will be sent to this email address instead of real recipients. This ensures that test emails don't reach actual users.

    
    "GeneralSettings": {
    "BaseURL": "https://localhost:7170",
    "NumberOrItemsInAutoComplete": "10",
    "ReceptionEmail": "reception@timesync.com",
    "Environment": "Development",
    "DevEnvEmail": "info@timesync.com"
    }
    
  4. Paylocity Settings

    Used for importing accruals such as sick/vacation hours. Customize the list of leave types based on your organization’s HR policy / Payroll system.

    
    "PaylocitySettings": {
    "LeaveTypes": "FLEX,SICK,VAC,EEADM,EEFLX,EESIC,EEVAC"
    }
    
  5. Email Settings

    Configure the SMTP settings to send emails, Make sure the SMTP credentials are valid and have permission to send emails.

    
    "EmailSettings": {
    "Server": "smtp.gmail.com",
    "Port": 587,
    "Username": "test@gmail.com",
    "Password": "YourPassword"
    }
    
Step 4: Apply Database Migrations

After configuring your appsettings.json, you need to apply the initial database schema using Entity Framework Core.

  1. Open the Package Manager Console in Visual Studio:
    Go to Tools > NuGet Package Manager > Package Manager Console.
  2. Run the following command:
    update-database
Step 5: Run the project

Now that all the dependencies are installed we are ready to run our project in the development server. Run the project by press F5 or click on bellow image logo.

run

open the link https://localhost:7170 in your browser to view the project.