Merge pull request #39 from Watergirll/main#1
Open
Watergirll wants to merge 62 commits into
Open
Conversation
CRUD on Instructor Availability
handled appointments
34 code standards
Introduced ExamForm and SessionForm models, controllers, and DTOs to support standardized exam forms per teaching category and per-lesson session forms for instructors. Added related database migrations, updated ApplicationDbContext, and included tests for the new functionality. Also added docker-compose for development and updated project structure.
Add exam and session form management with migrations
SeedData.cs now seeds not only default roles and users, but also test data for all major entities including geography, autoschools, licenses, teaching categories, exam forms and items, vehicles, files, payments, instructor availabilities, and appointments. This enables a fully populated test environment for development and testing. Also removed TEST_RESULTS.md.
Feat(seed): add incremental test data for SessionForm (AutoSchool, TeachingCategory, ExamForm, ExamItems, Vehicle, File, Availability, Appointment)
Introduces endpoints to retrieve a detailed session form view and to list a student's session forms with filtering, sorting, and pagination. Adds supporting DTOs for paged results and mistake breakdowns. Includes comprehensive integration and unit tests for new endpoints and access control.
Add session form history API and detailed view endpoints
SeedData modified
Student statistics
Seed data and cleanup
feat: add optional fileId parameter to studen session form
Closed Issue #55
fix: remove temporary ResetDb code from Program.cs
fix: restrict /api/forms/seed route to SuperAdmin only
feat: add fileId to fetchInstructorAssignedFiles response
feat: refactor session forms, add studentId to instructor files
Issue #54 closed
added context for chatai
Link ExamForm to License, add LicenseId to appointments
Linked properly license to examform
- Add POST /api/ai/chat/stream endpoint for SSE streaming - Create AiStreamingService to proxy requests to OpenRouter API - Build student context server-side (keeps API key secure) - Remove old /api/ai/context/student endpoint (no longer needed) - Add ChatRequest and ChatMessage DTOs - Register services in DI container - Add OpenRouter env vars to sample.env The frontend now communicates through this proxy endpoint, sending conversation history. The backend prepends fresh student context on every request and streams AI responses back via Server-Sent Events. Security: OpenRouter API key never exposed to frontend
…roxy feat(ai): add AI chat streaming proxy endpoint
feat AI proxy route
Introduces extensive positive and negative unit tests for controllers and system API flows under DriveFlow.Tests. Enhances AuthController with account lockout handling and logging for failed logins. Updates CORS configuration to support dynamic origins and credentials. Adds rate limiting for token refresh endpoint and improves database seeding comments. Skips DB migrations in test environments for compatibility.
Feature/tests security
- Use SetIsOriginAllowed(_ => true) to allow any origin - Supports AllowCredentials() for JWT Bearer token auth - Works with Netlify preview deployments (dynamic URLs) - Expose headers needed for SSE streaming This fixes CORS issues when frontend is on Netlify and backend is on VPS with different domains. Co-authored-by: Cursor <cursoragent@cursor.com>
fix(cors): allow all origins with credentials support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Implement Appointment Management Endpoints: Availability, Creation, and Update
📌 Overview
This PR introduces three new endpoints to enhance the appointment management system for students:
1.
GET /api/student/files/{fileId}/available-slots?date=YYYY-MM-DDRetrieves available appointment slots for a specific date, considering:
Returns:
2.
POST /api/student/files/{fileId}/appointmentsCreates a new appointment. Validates:
3.
PUT /api/student/appointments/update/{appointmentId}Updates an existing appointment. Includes all validations from the POST endpoint, plus:
✅ Key Features
🔍 Additional Details
🧪 Testing
📎 Notes
Let me know if you'd like an overview of a specific part of the implementation.