ASP.NET Core MVC application for reporting job scams with role-based authentication and authorization.
- Role-based Authentication: Admin, Moderator, JobPoster, JobSeeker roles
- Scam Reporting: Users can report job scams with evidence and details
- Job Listings: Legitimate job postings with company information
- Moderation System: Moderators can review and manage content
- Ownership Controls: Users can only edit their own content (except Moderators/Admins)
- Backend: ASP.NET Core 8.0 MVC
- Authentication: ASP.NET Core Identity with Roles
- Database: SQL Server with Entity Framework Core
- Frontend: Razor Views with Bootstrap 5
- ORM: Entity Framework Core with Code-First Migrations
Role | Scam Reports | Job Listings | Moderation | User Management | Audit Logs |
---|---|---|---|---|---|
JobSeeker | ✅ Flag Jobs Only | ✅ View Only + Flag Jobs | ❌ No Access | ❌ No Access | ❌ No Access |
JobPoster | ❌ No Access | ✅ Create/Edit Own | ❌ No Access | ❌ No Access | ❌ No Access |
Moderator | ✅ View/Edit Only | ✅ Create/Edit Any | ✅ Full Access | ✅ Suspend/Warn Users | ❌ No Access |
Admin | ✅ View/Edit Only | ✅ Edit/View Any | ✅ Full Access | ✅ Edit User Roles & Suspend | ✅ View & Export |
- .NET 8.0 SDK or later
- SQL Server (LocalDB, Express, Full, or Docker)
- Git
- Docker (optional, for SQL Server container)
-
Clone Repository
git clone https://github.com/YOUR_USERNAME/JobScamApp.git cd JobScamApp
-
Open in Visual Studio
- Open
JobScamApp.sln
in Visual Studio 2022 - Wait for NuGet packages to restore automatically
- Open
-
Configure Database
- Open
appsettings.json
- The connection string configured for LocalDB:
{ "ConnectionStrings": { "JobScamAppContextConnection": "Server=(localdb)\\mssqllocaldb;Database=JobScamApp;Trusted_Connection=True;MultipleActiveResultSets=true" } }
- Open
-
Apply Database Migrations
- Open Package Manager Console (Tools → NuGet Package Manager → Package Manager Console)
- Run:
Update-Database
-
Run the Application
- Press
F5
or click the green "Start" button - The app will open at
https://localhost:7xxx
- Press
-
Clone Repository
- In Rider: File → New → Project from Version Control
- Enter:
https://github.com/YOUR_USERNAME/JobScamApp.git
- Choose directory and click Clone
-
Restore Packages
- Rider should automatically restore NuGet packages
- If not: Tools → NuGet → Restore NuGet Packages
-
Configure Database
- Open
appsettings.json
- The connection string is configured for Docker SQL Server:
{ "ConnectionStrings": { "JobScamAppContextConnection": "Server=localhost,1433;Database=JobScamApp;User Id=sa;Password=SqlServer2024Pass;TrustServerCertificate=true;" } }
- Open
-
Apply Database Migrations
- Open Terminal in Rider (View → Tool Windows → Terminal)
- Navigate to project directory:
cd JobScamApp
- Run:
dotnet ef database update
-
Run the Application
- Click the green play button or press
Ctrl+F5
- Navigate to
https://localhost:7xxx
- Click the green play button or press
JobScamApp/
├── Controllers/ # MVC Controllers with role-based authorization
│ ├── AdminController.cs
│ ├── AuditController.cs
│ ├── HomeController.cs
│ ├── JobListingsController.cs
│ ├── JobPosterController.cs
│ ├── JobSeekerController.cs
│ ├── ModeratorController.cs
│ └── ScamReportsController.cs
├── Models/ # Domain models
│ ├── AuditLog.cs # Audit trail entity
│ ├── ErrorViewModel.cs # Error handling model
│ ├── JobListing.cs # Job listing entity
│ ├── JobScamAppUser.cs # Custom Identity User
│ ├── ScamReport.cs # Scam report entity
│ └── UserManagementViewModel.cs
├── Services/ # Business logic services
│ ├── AuditService.cs # Audit logging implementation
│ └── IAuditService.cs # Audit service interface
├── Views/ # Razor views with Bootstrap UI
│ ├── Admin/ # Admin management views
│ ├── Audit/ # Audit log views
│ ├── Home/ # Public home pages
│ ├── JobListings/ # Job listing views
│ ├── JobPoster/ # Job poster dashboard
│ ├── JobSeeker/ # Job seeker dashboard
│ ├── Moderator/ # Moderation views
│ ├── ScamReports/ # Scam report views
│ └── Shared/ # Shared layouts and partials
├── Data/ # Entity Framework context
│ └── JobScamAppDbContext.cs
├── Areas/Identity/ # Scaffolded Identity UI
│ └── Pages/Account/ # Login, register, etc.
└── Migrations/ # EF Core migrations
GET /ScamReports
- List all reports (with filtering)GET /ScamReports/Details/{id}
- View report detailsGET /ScamReports/EditData/{id}
- Edit report (Own or Moderator+)POST /ScamReports/UpdateData/{id}
- Update reportPOST /ScamReports/DeleteData/{id}
- Delete reportPOST /JobListings/ReportSuspicious/{id}
- Flag job as suspicious (creates scam report)
GET /JobListings
- List all jobs (with search/filtering)GET /JobListings/Details/{id}
- View job detailsGET /JobListings/AddData
- Create job form (JobPoster+)POST /JobListings/AddData
- Submit new jobGET /JobListings/EditData/{id}
- Edit job (Own or Moderator+)POST /JobListings/UpdateData/{id}
- Update jobPOST /JobListings/DeleteData/{id}
- Delete job
GET /Admin
- Admin dashboard with system statisticsGET /Admin/Users
- Manage users (search, filter by role)GET /Admin/EditUser/{id}
- Edit user details and rolesPOST /Admin/EditUser
- Update user informationGET /Admin/SuspendUser/{id}
- Suspend user formPOST /Admin/SuspendUser
- Apply user suspensionPOST /Admin/UnsuspendUser/{id}
- Remove user suspensionPOST /Admin/DeleteUser/{id}
- Delete user account
GET /Audit
- View audit logs (with filtering and pagination)GET /Audit/EntityHistory
- View entity change historyGET /Audit/ExportLogs
- Export audit logs to CSVGET /Audit/ExportScamReports
- Export scam reports to CSVGET /Audit/ExportJobListings
- Export job listings to CSV
GET /JobSeeker
- JobSeeker dashboard (JobSeeker role)GET /JobPoster
- JobPoster dashboard (JobPoster role)GET /Moderator
- Moderator dashboard (Moderator role)GET /Admin
- Admin dashboard (Admin role)
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please open an issue in the GitHub repository.