Skip to content

Chris-tech15/Library-Management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Library Management System

A console-based Library Management System written in C, supporting Admin and Student users with role-based functionality, user authentication, book borrowing/returning, and CSV-based storage.


👥 User Roles

👨‍🏫 Admin / Librarian

  • Full access to book and user records.
  • Can borrow and return books on behalf of any user.
  • Can change their own password.

🎓 Student

  • Can only borrow and return books for themselves.
  • Can view users and available books.
  • Can change only their own password.

🧾 Features

🔐 Authentication

  • Login with username and password.
  • Create a new user account.
  • Role-based menus based on login credentials.

🛠 Admin Functionalities

  1. ➕ Add Book
  2. 📚 List Books
  3. ✏️ Modify Book
  4. ❌ Delete Book
  5. 👥 List Users
  6. 🧑‍💼 Modify User
  7. 🗑️ Delete User
  8. 📖 Borrow Book (for any user)
  9. 📤 Return Book (for any user)
  10. 🔒 Change Own Password
  11. 🚪 Logout

🎓 Student Functionalities

  1. 📚 List Books
  2. 👥 List Users
  3. 🔒 Change Own Password
  4. 📖 Borrow Book (for self only)
  5. 📤 Return Book (for self only)
  6. 🚪 Logout

📂 Data Files

  • https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip — Book records (ID, Title, Author, Quantity, etc.)
  • https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip — User information (ID, Name, Age, Role, Faculty, Username, Password)
  • https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip — Borrow/Return logs (User ID, Book ID, Dates)

💡 Highlights

  • Input handled safely using fgets() to avoid buffer overflows.
  • All user inputs trimmed for spaces and newline characters.
  • Modular code using header file library.h.
  • Uses enums to manage menu options clearly.
  • Allows Admin to perform tasks for other users, enforcing role boundaries.

📦 Compilation

Compile using gcc:

gcc main.c books.c users.c borrow.c -o library

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages