SiteManangmentAPI is a web project built using .NET that allows administrators to manage dues and common utility bills for apartments on a site. The system supports two types of users: Admins and Users. Admins have full control over the system, while Users have limited functionality.
SiteManangmentAPI is a web application that provides the following functionalities:
- Admins can enter apartment information, resident user information, dues and billing information, view incoming payments, view messages, see the monthly debt-credit list, manage contacts, and perform CRUD operations on flat/housing information.
- Admins can send daily email reminders to users who have not paid their bills.
- Users can view invoice and dues information assigned to them, and make credit card payments.
- Users can send messages to the administrator.
The project is organized into four layers:
SiteManangmentAPI.Business
: This layer contains the business logic and service implementations.SiteManangmentAPI.Web
: This is the web layer and contains the controllers, middleware, and API endpoints.SiteManangmentAPI.Data
: This layer handles the data access and contains the database context, repositories, and migrations.SiteManangmentAPI.Base
: This layer contains shared base classes and utilities used across the application.
To set up the database, follow these steps:
- Update the database using the following command:
dotnet ef database update --project "./SiteManangmentAPI.Data" --startup-project "./SiteManangmentAPI.Web"
- Perform database migration using the following commands:
dotnet ef migrations add InitialMigrations -s ..\SiteManangmentAPI.Web\
dotnet ef migrations add SeedData -s ..\SiteManangmentAPI.Web\
- Update the connection string in
appsettings.json
with your database connection information:
{
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
//Connection String for DB
"ConnectionStrings": {
"DbType": "MsSql",
"MsSqlConnection": "Server=localhost\\SQLEXPRESS;Database=siteManangmentDb;Trusted_Connection=True;Encrypt=False;"
},
//Authentication Token
"AppSettings": {
"Token": "IfHuNfjVGfzMscG7DGmurA==" //base64 random string for key
},
}
}
To run the SiteManangmentAPI project, use the following commands:
cd ./SiteManangmentAPI.Web
dotnet run
The application will start and be accessible at http://localhost:5000
or https://localhost:5001
in your browser.
- .NET SDK
- Entity Framework Core
- Microsoft SQL Server