Welcome to the Library Project, a web application designed to provide users with access to a diverse collection of books. This application allows users to explore various books, view detailed information about each book, and download or read them online. The project is built using Ruby on Rails and leverages an external API to fetch the latest book data.
- Browse Books: View a collection of the latest 15 books, including details such as title, author, section, download count, and more.
- Search by Sections: Explore books categorized into different sections to find specific genres or topics of interest.
- Book Details: Access detailed information about each book, including its title, author, section, download links, and book cover.
- About Us: Learn more about the mission and story behind the Library Project.
- Contact Us: Get in touch with the team for any questions or feedback.
- HomeController: Manages the home, index, books, sections, about, and contact pages. It includes a
before_action
to load data before rendering the index, books, and sections pages.
- The project primarily interacts with data fetched from an external API, so there are no traditional Rails models in use.
- home.html.erb: The landing page of the application.
- index.html.erb: Displays the latest 15 books.
- books.html.erb: Similar to the index, lists all available books.
- sections.html.erb: Lists books categorized into different sections.
- about.html.erb: Provides information about the project and its mission.
- contact.html.erb: A form for users to contact the project team.
The project fetches book data from an external API using the HTTParty
gem. The data includes details about the latest books and different sections. The load_data
method in the HomeController
handles this API call and processes the response.
-
Clone the Repository:
git clone https://github.com/Abo5/library.git cd library
-
Install Dependencies:
bundle install
-
Setup Database: The project uses an external API for data, so no local database setup is required.
-
Run the Server:
rails server
-
Visit the Application: Open your web browser and go to
http://localhost:3000
.
We welcome contributions from the community. If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
git checkout -b feature-name
- Commit your changes.
git commit -m "Description of your changes"
- Push to the branch.
git push origin feature-name
- Create a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, please contact us at [email protected].
Thank you for using the Library Project! We hope you enjoy exploring our collection of books.