A fitness center management and appointment system developed with ASP.NET Core MVC.
📅 Commit 1 (Day 1-3): ✅ Completed
- ASP.NET Core MVC project created
- Entity Framework Core models defined (Gym, Service, Trainer, Availability, MemberProfile, Appointment)
- DbContext relationships configured
- SQL Server LocalDB database set up and migration applied
📅 Commit 2 (Day 4-6): ✅ Completed
- Identity roles configured (Admin, Member)
- Seed data hosted service created
- Default admin user seeded (g231210375@sakarya.edu.tr / sau)
- Role-based authorization setup ready
📅 Commit 3-5: ✅ Completed
- Admin Panel with modern sidebar navigation
- Gym CRUD operations
- Service CRUD operations
- Trainer CRUD operations
- User Management with role assignment
- Dashboard with statistics
📅 Commit 6: ✅ Completed
- AI Recommendation System (OpenAI integration)
- Member Area for AI recommendations
- UI/UX improvements
- Navigation fixes
📅 Commit 7 (Current): ✅ Completed
- REST API endpoints with LINQ filtering (TrainersApiController, AppointmentsApiController)
- Admin Panel appointment management (approve/reject/delete)
- Swagger/OpenAPI integration
- Complete appointment booking system with conflict detection
- ✅ Database models and relationships
- ✅ Identity and role-based authorization (Admin, Member)
- ✅ Gym and service management (fitness, yoga, pilates, etc.)
- ✅ Trainer management, expertise areas, and availability schedules
- ✅ Admin Panel with full CRUD operations
- ✅ AI-powered exercise and diet recommendations (OpenAI integration)
- ✅ Appointment booking, conflict detection, and approval mechanism
- ✅ REST API and LINQ filtering (available trainers, member appointments, etc.)
- .NET 9, ASP.NET Core MVC
- Entity Framework Core, SQL Server LocalDB
- Bootstrap 5, jQuery, Validation
- OpenAI API (for AI recommendations)
- Swagger/OpenAPI (for API documentation)
- Kağan Aydoğan — g231210375 — Sakarya University, Computer Engineering, 3rd Year
- Course: Web Programming (Evening Education Group A)
- Email: kagan.aydogan@ogr.sakarya.edu.tr
- .NET 9 SDK
- SQL Server LocalDB
- Visual Studio 2022 or VS Code (recommended)
- Clone the repository:
git clone https://github.com/kaganay/Wbprojectg231210375.git
cd Wbprojectg231210375- Restore packages and build:
dotnet restore
dotnet build- Update database (if needed):
dotnet ef database update -p ./FitnessCenter.Web -s ./FitnessCenter.Web- Run the application:
cd FitnessCenter.Web
dotnet runThe application will be available at:
- HTTP:
http://localhost:5157 - HTTPS:
https://localhost:7206 - Swagger UI:
https://localhost:7206/api-docs(Development only)
FitnessCenter.Web/
├── Controllers/ # MVC Controllers
│ └── Api/ # REST API Controllers (TrainersApiController, AppointmentsApiController)
├── Models/ # Domain models (Gym, Service, Trainer, etc.)
├── Views/ # Razor views
├── Data/ # DbContext and migrations
├── Areas/ # Admin and Member areas
│ ├── Admin/ # Admin panel (Dashboard, Gyms, Services, Trainers, Users, Appointments)
│ └── Member/ # Member area (AI Recommendations, Appointments)
└── wwwroot/ # Static files (CSS, JS, images)
- Email: g231210375@sakarya.edu.tr
- Password: sau
The admin user is automatically created on first application startup via SeedDataHostedService.
The system includes an AI-powered recommendation feature that provides personalized exercise and diet plans based on user metrics (height, weight, body type, goals).
To use AI recommendations:
- Register as a Member user
- Navigate to "AI Öneri" in the menu
- Fill in your body metrics and goals
- Get personalized recommendations powered by OpenAI
Note: OpenAI API key must be configured in appsettings.Development.json:
{
"OpenAI": {
"ApiKey": "your-api-key-here"
}
}The application provides REST API endpoints for trainers and appointments management:
GET /api/trainers- List all trainers (with optional filters:gymId,expertise)GET /api/trainers/available?date=YYYY-MM-DD&startTime=HH:mm&endTime=HH:mm- Get available trainers for a specific date/timeGET /api/trainers/{id}- Get trainer details
GET /api/appointments- Get user's appointments (with optional filters:status,startDate,endDate)GET /api/appointments/{id}- Get appointment detailsGET /api/appointments/all- Get all appointments (Admin only, with filters:status,trainerId,startDate,endDate)
Example API calls:
# Get all trainers
GET /api/trainers
# Get available trainers on 2024-12-01 between 10:00-11:00
GET /api/trainers/available?date=2024-12-01&startTime=10:00&endTime=11:00
# Get pending appointments
GET /api/appointments?status=PendingAll API endpoints use LINQ queries for filtering and are documented in Swagger UI.
Admins can manage appointments through the Admin Panel:
- View all appointments with filtering (status, trainer, date range)
- Approve or reject pending appointments
- View appointment details
- Delete appointments
Access the appointment management at: /Admin/Appointments
This project is developed incrementally with commits every 3 days over a 1-month period.
See PROJECT_PLAN.md for detailed development schedule.
Educational project - Sakarya University