A library management system SPA built with Vue.js, featuring separate admin and user interfaces for efficient book and user management.
- Book Management: Create, read, update, and delete books
- User Management: Manage library users and their accounts
- Review Management: Moderate and manage book reviews
- Dashboard: Overview of library statistics and activities
- Book Browsing: Search and browse available books
- Book Borrowing: Borrow and return books
- Review System: Leave reviews and ratings for books
- User Profile: Manage personal library account
- Frontend Framework: Vue.js 3
- State Management: Vuex
- Routing: Vue Router
- Form Validation: Vee-Validate
- Testing: Vitest
- UI Framework: Bootstrap + AdminLTE
- API Integration: Open Library API
- Backend: JSON Server (for user data)
- Node.js (v14 or higher)
- npm
-
Clone the repository
git clone https://github.com/miryarik/v-lib.git cd v-lib
-
Install dependencies
npm install
-
Start the JSON Server (Required)
# In src/server npx json-server db.json
Note: The JSON Server must be running for user data management. Keep this terminal open.
-
Start the development server
npm run dev
This project follows Test-Driven Development (TDD) principles and uses Vitest for unit testing.
# Run all tests in watch mode
npx vitest
# Run all tests once
npx vitest run
# Build for production
npm run build
# Preview production build
npm run preview
The application implements role-based access control:
- Admin Routes: Protected by admin guards
- User Routes: Protected by user authentication guards
- Guest Routes: Accessible without authentication
- Admin users can access all features
- Regular users can only access user-specific features
- Unauthenticated users are redirected to login
The application integrates with:
- Open Library API for book data including:
- Book metadata
- Cover images
- Author information
- Publication details
- JSON Server for local user data management (users, reviews, borrowing records)
- Bootstrap: For responsive design and component styling
- AdminLTE: For admin dashboard interface
- Component-based Architecture: Reusable Vue components
- Responsive Design: Mobile-friendly interface
- Open Library API for book data
- Bootstrap for UI components
- AdminLTE for admin interface
- Vue.js community for excellent documentation and tutorials
- JSON Server for rapid API prototyping