1.5 KiB
1.5 KiB
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
- Book Management (CRUD operations, batch import)
- Student Account Management
- Borrowing/Returning/Renewal System
- Reservation System
- Fine Management
- Book Reviews and Recommendations
- Admin Dashboard
- 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