Skip to content

miryarik/v-lib

Repository files navigation

V-Lib 📚

A library management system SPA built with Vue.js, featuring separate admin and user interfaces for efficient book and user management.

🚀 Features

Admin Features

  • 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

User Features

  • 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

🛠️ Tech Stack

  • 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)

📋 Prerequisites

  • Node.js (v14 or higher)
  • npm

🔧 Set-Up

  1. Clone the repository

    git clone https://github.com/miryarik/v-lib.git
    cd v-lib
  2. Install dependencies

    npm install
  3. 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.

  4. Start the development server

    npm run dev

🧪 Testing

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

# Build for production
npm run build

# Preview production build
npm run preview

🔐 Authentication & Authorization

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

Route Guards

  • Admin users can access all features
  • Regular users can only access user-specific features
  • Unauthenticated users are redirected to login

📚 API Integration

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)

🎨 UI/UX Design

  • Bootstrap: For responsive design and component styling
  • AdminLTE: For admin dashboard interface
  • Component-based Architecture: Reusable Vue components
  • Responsive Design: Mobile-friendly interface

🙏 Acknowledgments

About

Library Management System made with vue.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published