# Copilot Instructions ## Project Overview This is an intelligent library management system built with Next.js, TypeScript, and PostgreSQL. The system supports both admin and student interfaces with comprehensive CRUD operations. ## Database Information - Database: PostgreSQL (127.0.0.1:5432) - Username: feie9454 - Password: (empty) - Schema: library ## Code Style Guidelines - Use TypeScript for all files - Use Tailwind CSS for styling - Follow Next.js App Router conventions - Use meaningful variable and function names - Add proper error handling and validation - Use server components where appropriate - Implement proper authentication and authorization ## Key Features to Implement 1. Book Management (CRUD operations, batch import) 2. Student Account Management 3. Borrowing/Returning/Renewal System 4. Reservation System 5. Fine Management 6. Book Reviews and Recommendations 7. Admin Dashboard 8. Student Portal ## Database Schema The system uses tables: books, students, admins, borrow_records, reservations, fines, reviews, system_settings Refer to the SQL files for complete schema definition. ## Architecture Patterns - Use API routes for database operations - Implement proper data validation - Use React Query/SWR for data fetching - Separate business logic from UI components - Use environment variables for configuration