Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
164 changes: 111 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,141 @@
# Project #1 - Library Project using Dart

Congratulations on reaching the project phase! This project will assess your ability to develop a "Library Project using Dart" with a Command Line Interface (CLI) to manage a library's book inventory and user interactions. Below are the key requirements and evaluation criteria:
# Library project using Dart

A simple book store that allow both customr or library staff to do different actions.

## Description:
**In my progrme the customr can do the following:**
- Search for a Book
- Buy a Book
- Display details about each book
- Display available books categories
- Exite the program

The "Library Project using Dart" is an exciting software application designed to efficiently manage a library's book inventory and streamline user interactions through a Command Line Interface (CLI). This capstone project provides you, as a student, with an excellent opportunity to apply your knowledge and skills in Flutter Development, showcasing your proficiency in Dart programming.
**Library staff/admin can do the following actions:**
- Add new Book to the store
- Modifiy on existing Book 'Delete or Update'
- Display the number of books in the library
- Check the number of Purches

The primary goal of the project is to develop a user-friendly and efficient CLI that caters to both library staff and patrons. With this CLI, users can effortlessly query books, view the number of available copies, add new books to the library, delete books from the inventory, make book purchases, and receive detailed invoices after each purchase. Additionally, the project demands an essential feature - updating the number of book copies after a purchase is made to maintain accurate inventory records.
"**Both kind of user can switch to the other one**"

To begin, you will create a new Dart project, ensuring that the project structure is appropriately organized for a clean and manageable codebase. As you progress, it is crucial to write code that is clear, well-organized, and scalable, adhering to standard coding conventions to enhance code readability. Demonstrating your comprehensive understanding of programming concepts and techniques is essential for a successful outcome.
## Project workflow
At first the program will ask the user if he is Admin/Staff or Customer by entering a specific choice. Also the user can end the program by typing 'E or e'.

Your CLI should allow users to search for books by title, author, or category, providing a straightforward and accessible way to retrieve information about the library's collection. Implementing a method to add new books to the library with the appropriate updates to the book count will further enhance the system's usability.
- **Following image show the beginning of the program**

Managing the library's inventory also involves implementing a method to delete books, ensuring smooth handling of cases where a book to be deleted does not exist. Facilitating book purchases through the CLI is another critical aspect, requiring you to decrease the number of book copies according to the books purchased and generate an informative invoice for the user.
<img width="537" alt="The beginning of the program" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/78054085-2096-43c9-986d-e639434b2dea">

As an extra credit opportunity, you can implement features such as displaying all book categories in the library, returning a list of books belonging to a selected category. Additionally, providing a method to count the number of purchased books will further showcase your skills.
### Admin/Staff side: ###

The project must be written entirely in the Dart language and fully submitted through GitHub using version control (Git). Remember to create descriptive commits to showcase your progress and follow the provided guidelines for academic integrity.
- **When the user enter the program as an Admin/Staff the following menu will displayed:**
<br> <img width="522" alt="Admin choices" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/031ea0c8-1b5c-4d8b-a945-f51796f19ccb">



- **If the Admin/Staff need to add a new book, the following instructions will appear, which ask the user to enter the new book specifications**
<br> <img width="601" alt="Screenshot 2023-07-30 180220" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/34d98d54-9b46-4638-a413-7f91da2f3881">

## Minimum Requirements:

1. **Project Structure**: Create a new Dart project and organize its structure appropriately. Set up the necessary folders, files, and ensure a clean and organized project layout.
- **Then the new book will appear among the list of stored books, as the following:**
<br> ![After adding a new book](https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/2dfe03dd-f44d-497e-9de7-4d07ddd7c198)

2. **Clean Code**: Write clear, well-organized, and scalable code. Use meaningful variable and function names, following standard coding conventions to improve code readability. Well-structured and easily maintainable code is essential.

3. **Applying Concepts**: Demonstrate a comprehensive understanding of programming concepts and techniques. Implement the CLI features with efficiency and correctness.
- **If the Admin need to modify on the books, admin can do either deleting a book or updating an existing book information**
<br> <img width="461" alt="Modification choices" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/20243b01-6cc6-4fe8-9e7d-17fc8fa3c158">

4. **Query Books**: Develop a simple CLI user interface that allows users to query books and view the number of available copies. Users should be able to search for books by title, author, or category.

5. **Add New Book**: Provide a method to add a new book to the library and update the number of book copies accordingly. Ensure proper error handling for invalid inputs.
- **For deleting option, admine need to enter the title of the need to be deleted book as the following:**
<br> <img width="579" alt="delete a book process" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/b1f8b1f2-948e-41df-9e73-49c51bd0f762">

6. **Delete Book**: Implement a method to delete a book from the library and update the book count. Handle cases where the book to be deleted does not exist.

7. **Purchase**: Implement the purchase process, allowing users to buy books from the library. Ensure that the number of book copies is decreased according to the books purchased.
- **For updating book information the following fields are required to be entered by the admin:**
<br> <img width="490" alt="update book info" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/f61bc81e-d024-4035-a8d9-b83028af3b32">

8. **Invoice**: Display a detailed invoice after the purchase, showing the books purchased, their prices, and the total cost.

9. **Editing Capability**: Add the ability to modify book data, such as title, author, and price. Users should be able to update book information easily.
- **Then Admin need to choose the book section to be updated from the menu**<br>
- **Edit the title**
<br> <img width="549" alt="Edit title" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/f95f8aef-4132-49a7-b99a-5485458fa27b">

- **Authors**
<br> <img width="604" alt="Edit authors" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/4c8f6604-9002-4d23-9502-d7492b2a36c7">

- **Categories**
<br> <img width="661" alt="Edit category" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/3bc26d31-2de2-443c-8992-66145b82de21">

- **Description**
<br> <img width="708" alt="Edit description" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/8fb602e8-ac4d-42fa-a8af-7eda479c5e68">

- **Price**
<br> <img width="663" alt="edit price" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/10703153-5c0c-4255-b41d-2209e31d1cda">

- **Number of copies**
<br> <img width="746" alt="edit number of copies" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/436a9805-d712-4346-9eef-8ce460d086c3">

## Ideas for Extra Credit:
- ***The Book named 'Collective Intelligence in Action' after updating each part:***
<br> <img width="637" alt="book after update" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/d1180c13-2a10-407b-8711-64801f180633">

- **Display all Book Categories**: Provide a method to display a list of all book categories in the library. When a category is selected, return a list of all books belonging to that category.
- **Reporting:** Provide a method to present a report that contains the number of all purchased books from the library, and calculate their amount.
-
- **Admin can view the number of all books in the store**
<br> <img width="445" alt="Number of the books in the store" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/3c1daa98-9e73-455d-9f5b-2eeeb283d01b">

## Delivery Requirements:
- **Admin can check the number of purches from the library**
<br> <img width="535" alt="Number of purches" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/9fa38c4b-d37e-44e7-b449-022a0099f9e0">

- **Language**: The project should be written in Dart language.

- **GitHub Submission**:
- Create a Fork from the exam’s GitHub repository.
- Create a new branch with your name, i.e., Nawaf-Alshawan.
- Commit frequently with descriptive messages to show your progress.
- Finally, create a Pull Request to the exam’s original repository containing your solution.
### Customer side: ###
- **When the user enter the program as a Customer the following menu will displayed:**
<br> <img width="493" alt="Customer menu" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/b3c3a270-4f11-4c1e-a264-6f2fe07a40c4">

- **README.md File**: Include a README.md file with instructions on how to run and test the project. This file should provide a clear guide for users to understand how to interact with the CLI.
- **If the customer need to search for a book, customer need to determine the search way from the following:**
<br> <img width="209" alt="search way" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/5c90132d-cac5-40af-95d7-29ea1f1726dc">

- **Search by the Title**
<br> <img width="500" alt="search by title" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/69f5e306-d54a-4141-b29c-2501632f7aac">

- **Search by the Author**
<br> <img width="510" alt="search by author" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/27b68216-a3b4-4a58-8603-1fe6fd2fcc6e">

- **Search by the Category**
<br> <img width="610" alt="search by category" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/bd8916c5-9a0b-435e-85d2-c75f5ccc9af8">

- **If there are no matched books the following messages will appear:**
<br> <img width="519" alt="No match title" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/c0b31d43-526f-4281-8c15-a1b942e0f86b">
<br> <img width="463" alt="No match author" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/8f621b7a-56d6-4975-a08d-c5cd0594dc08">
<br> <img width="550" alt="No match category" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/6e41f58f-1a7c-43c8-9fe9-6c008abe41cd">

- **When the customer need to buy a book the program will display the available books and ask the user 'How many books you want to buy?**
<br> <img width="565" alt="how many books user want" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/365b390b-ef11-4f6d-bd66-c3ac27ffd8f4">

- **Then the user have to enter books names**
<br> <img width="529" alt="needed books names" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/3b63cee9-939e-4599-bbdb-e200fb5df406">
- **After that, a confirmation message will appear to the user to confirm the purchase**
<br> <img width="514" alt="user confirmation" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/cbc952ad-ef8b-4ae8-a8eb-355b9fcb4fc8">

- **Then the program will display an invoice with all purchases information and total cost**
<br> <img width="365" alt="invoice info" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/e97e1eb2-ab3a-4f7f-87bb-ef9c5f01d1c4">

- **Screenshots**: Include relevant screenshots of the app to showcase its appearance and functionalities. Visuals can help users understand the app's design and layout.
- **Customer can view all books in the store**
<br> <img width="670" alt="Display all books in the store" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/36dc63c4-ee44-4e6a-bcb7-f737e2114395">

## Schedule & Deadlines:

- Exam Start Date: 27/7/2023 - 3:00 PM
- Exam Submission Deadline: 30/7/2023 – 11:59 AM

## Evaluation Criteria:

The project will be evaluated based on the following criteria:

- **Completion**: The extent to which the project meets all the minimum requirements, including the extra credit ideas if implemented.

- **Quality**: The overall quality of the project, including the coding style, organization, and ease of maintenance. Well-structured and readable code will be favorably evaluated.

- **Use of Programming Concepts**: How well you utilize programming concepts such as classes, abstracts, functions, and other relevant techniques.

## Resources

- [Dart Tutorials](https://dart.dev/tutorials)

Good luck with the project, and feel free to ask any additional questions if needed!
- **Customer can check all available categories**
<br> <img width="455" alt="all categories" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/6145beb6-c865-4dc5-9734-86c22eed1113">

### Common functions ##
- **Switch to othrt user type**
- Admin can enter customer side and vice versa
<br> <img width="466" alt="switch user" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/e81f5f03-64bd-4f9b-a650-62cf25ea7fcd">

- **Exit from the program**
<br><img width="344" alt="Exit choice" src="https://github.com/Mjd-Gh/Project-dart-1/assets/101333803/87d20b7f-6b7c-4b34-a77c-7df63b3fbe39">


### Parts to be noticed ###
- **The number of books and copies will changed after the following processes:**
- Adding new books with a specific number of copies "Done by Admin"
- Deleting a books with its whole copies "Done by Admin"
- Buying a books from the library "Done by Customer"

- **If there is no existing book or the user enter a wrong option alerting message will appear**
- For example:
- No found book with a specific searched title, author, or category
- No enough copies to sale
- Wrong chosen option
30 changes: 30 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Loading