LibraNet is a web-based application that emulates the functionalities of a traditional library, allowing users to manage books and authors. It provides a comprehensive platform for adding, updating, deleting, and viewing books and authors. The application is built using modern web technologies, ensuring a responsive and intuitive user experience.
You can access the deployed application here.
The application is organized into several key directories and files, each serving a specific purpose in the application's architecture:
- server.js: The main server file that initializes and runs the Express server.
- models/: Contains the data models for the application, defining the schema for books and authors.
- public/: Houses static assets like JavaScript files, fonts, and CSS stylesheets for the client-side.
- views/: EJS templates for generating dynamic HTML content based on server-side data.
- routes/: Defines the routes for the application, handling HTTP requests for different parts of the site.
- CRUD Operations: Users can create, read, update, and delete information about books and authors.
- File Uploads: Support for uploading book cover images or related documents.
- Custom Styling: Tailored CSS for a unique and engaging user interface.
- Responsive Design: The application is fully responsive, providing a seamless experience on various devices and screen sizes.
- Node.js: The runtime environment for executing JavaScript on the server.
- Express: A web application framework for Node.js, used to build web applications and APIs.
- EJS: A templating language for generating HTML markup with plain JavaScript.
- CSS: For styling the application's interface.
- MongoDB: Used as the backend database for storing application data.
(Note: Specific setup and installation instructions would depend on further details within each file, especially server.js
for starting the server and package.json
for dependencies.)
Follow these steps to get everything up and running.
- Node.js installed on your system
- Homebrew installed on your macOS system for MongoDB installation
First, ensure you are in the project's root directory. Then, install the necessary Node.js dependencies by running the following command in your terminal:
npm install
a. Add the MongoDB Repository to Homebrew
Open your terminal and execute the following command to tap the MongoDB Homebrew repository:
brew tap mongodb/brew
b. Install MongoDB
Once the repository has been tapped, install MongoDB with the following command:
brew install mongodb-community
- Download MongoDB for Windows: Visit the MongoDB Download Center, select the Community Server tab, choose "Windows" as your operating system, and download the installer.
- Install MongoDB: Run the downloaded installer and follow the setup wizard. Choose the "Complete" setup type and opt to install MongoDB as a service.
- Add MongoDB to the PATH Environment Variable: Locate the MongoDB bin directory (default is
C:\Program Files\MongoDB\Server\<version>\bin
) and add it to the system's PATH environment variable.
After successfully installing MongoDB, you can start the MongoDB service using Homebrew by running:
brew services start mongodb/brew/mongodb-community
Start MongoDB by running the MongoDB service, which was set up during the installation process.
With MongoDB running, you are now ready to start the project server. Run the following command:
npm run start
You will see in the console:
http://localhost:3000/
LibraNet represents a modern take on library management, integrating traditional library functions with the advantages of web technology for accessibility and ease of use.