Skip to main content

Folder structure

Map of the damsy_erp_core repository — where web UI, data access, business objects, shared utilities, and deployment scripts live.

Introduction

Damsy ERP is a multi-project .NET Framework 4.5.2 solution. The web project is large: MVC Areas per module, thousands of static assets, Crystal report viewers, and Razor views. Business logic is split between SQL stored procedures (primary) and C# controllers/DAL (orchestration).

Purpose

Help developers navigate the codebase, know where to add views or DAL methods, and understand what publishes to IIS vs what stays in SQL.

When to use

  • Locating a module's controllers and views
  • Adding CSS or partial views (remember .csproj Content includes)
  • Finding blank-database scripts or publish profiles
  • Onboarding after reading Solution structure

How it works


Repository root

damsy_erp_core/
├── DamsyERP.sln # Open this in Visual Studio
├── DamsyERP.UI/ # Web application (startup project)
├── DAL/ # Data access layer
├── BO/ # Business objects / DTOs
├── UTILITIES/ # Shared helpers
├── database-backup/ # Backup notes + blank DB scripts
├── docs/ # In-repo knowledge guide
└── (supporting files)

DamsyERP.UI (web application)

Primary deployable project — publish output goes to IIS.

DamsyERP.UI/
├── App_Start/ # RouteConfig, BundleConfig, FilterConfig, AreaRegistration
├── Controllers/ # Root controllers (Login, Dashboard, ManageError, …)
├── Views/ # Root views (Login, Dashboard, Shared layouts)
├── Areas/ # Module boundaries (see below)
├── app-assets/ # CSS, JS, fonts, images (shell UI)
├── AppScripts/ # Module-specific JavaScript
├── Content/ # Legacy/bootstrap content paths
├── Scripts/ # jQuery and vendor scripts
├── crystalreportviewers13/ # Crystal web viewer assets
├── DataSet/ # Typed DataSets for reports
├── Properties/
│ └── PublishProfiles/
│ └── MVC_PUBLISH.pubxml # VPS file-system publish profile
├── Web.config # Base configuration
├── Web.Release.config # Release transform
└── Global.asax.cs # Application lifecycle, ForceHttps

MVC Areas (modules)

Each Area typically contains:

Areas/<AreaName>/
├── <AreaName>AreaRegistration.cs
├── Controllers/
├── Views/
├── Models/ # Some areas
├── *Reports/ # Crystal .rpt + code-behind
└── *ReportViewerForm/ # .aspx report hosts
Area folderModule
PayrollPayroll processing, statutory reports
RegistrationEmployee registration / web enroll
BillsClient billing, GST/IRN
StockInventory, requisition, PO
SalesSales follow-up
ESSEmployee self-service
AdminisrationUsers, roles, company admin (spelling intentional)
ManagmentDashBoardManagement MIS (spelling intentional)
AttendancePunchingAttendance entry
OperationField operations
ContractedRatesContract rate masters
VerificationAndApprovalApproval workflows

Root shared partials (examples):

Views/Shared/
├── _SidebarBrand.cshtml
├── _SidebarMenuSearch.cshtml
└── Error.cshtml

Module layouts live under Areas/<Area>/Views/Shared/.


DAL project

DAL/
├── BaseHelper.cs # Connection + SP execution
├── Login_DAL.cs
├── Employee/
├── Payroll/
├── Bills/
├── Administrator/
└── … # Mirrors module boundaries

Pattern: one DAL class (or family) per feature screen; methods map 1:1 to stored procedure names in most cases.


BO project

BO/
├── User.cs # Login user + module flags
├── Payroll/
├── Employee/
├── Bills/
├── Administrator/
└── …

Plain C# properties — no ORM attributes. Populated manually from DataRow in DAL or controllers.


UTILITIES project

UTILITIES/
├── HashCryptography.cs # Password encryption
├── Constants / helpers
└── …

Referenced by DAL and UI for cross-cutting non-UI helpers.


database-backup

database-backup/
├── scripts-blank-db/
│ ├── 00-recreate-blank-database.sql
│ ├── 01-create-blank-database.sql
│ ├── 02-verify-blank-database.sql
│ ├── 03-NOTES-apply-schema.sql
│ ├── 04-seed-minimal.sql
│ ├── 04b-fix-admin-login.sql
│ ├── 05-update-connection-string-NOTES.sql
│ ├── Clean-SchemaScript.ps1
│ └── Export-SchemaOnly-FromLocal.ps1
└── (backup artifacts, guides)

Operational SQL — not loaded by the web app at runtime.


Publish output (IIS mirror)

After MVC_PUBLISH, the folder structure mirrors DamsyERP.UI content plus bin/ assemblies:

C:\inetpub\wwwroot\damsy_erp/ # Typical IIS path
├── bin/
│ ├── DamsyERP.UI.dll
│ ├── DAL.dll
│ ├── BO.dll
│ └── UTILITIES.dll
├── Areas/
├── app-assets/
├── Views/
├── Web.config # Transformed Release config
└── …

Examples

Example — Find Payroll salary screen

  1. URL suggests Area PayrollAreas/Payroll/Controllers/
  2. DAL: DAL/Payroll/ or root DAL file named for feature
  3. BO: BO/Payroll/
  4. SP: search SSMS for procedure name referenced in DAL method

Example — Add new dashboard CSS

  1. File: DamsyERP.UI/app-assets/css/my-module-dashboard.css
  2. Include in DamsyERP.UI.csproj as Content
  3. Reference in Area layout with ?v= query string
  4. Publish and verify under inetpub

Example — Login pipeline files

LayerPath
ControllerControllers/LoginController.cs
ViewViews/Login/Index.cshtml
DALDAL/Login_DAL.cs
BOBO/User.cs
CryptoUTILITIES/HashCryptography.cs

Important notes

  • .csproj size — UI project lists thousands of Content entries; use "Include in Project" for new web files.
  • Not in Git: full SQL schema — see Database operations.
  • Areas spelling matches URLs — folder rename breaks routes.
  • docs/ in repo is a knowledge guide; official Docusaurus site is separate (damsy-erp-docs).

Common mistakes

MistakeResult
Adding view only under Areas without csprojPublish omit
Searching Administration folderArea is Adminisration
Editing BO expecting EF migrationsBO is manual DTO
Looking for business rules only in C#Check SQL procedures

Next steps