- Navigate to the
Backend
andReact Native
folders. - Run
npm install
in both folders to install dependencies.
After installing dependencies in both folders:
- In the
Backend
folder, usenpm start
to initiate the server. - In
React Native
, usenpm start
to start the project, where Metro will provide options to choose between Android or IOS for emulating the application.
To use BookNook, ensure your system meets the following requirements:
- Node.js and npm installed
- Firebase account for database setup
- Android Studio or Xcode for emulator options in React Native
To create a Firestore database for BookNook:
- Go to the Firebase Console.
- Create a new project or select an existing one.
- Navigate to "Firestore Database" in the left sidebar in the "Compilation" section.
- Click on "Create Database" and choose a location.
- Start in test mode for simplicity or set up security rules according to your needs.
- Create a collection called "library".
- Create the first document with the structure: "name", "cover", "description" & "author" as strings and "publication_year" as number.
- (You can leave the fields empty and add the books from the application later).
- Once the database is created, go to Project Settings, then Service Account.
- Under Firebase Admin SDK, click on "Generate New Private Key."
- This will download a file. Rename it to
serviceAccountKey.json
and place it in theBackend
folder. - Your Firestore database is now set up for BookNook!
In the React Native folder, find the file generateBooks.js
. This file allows you to create 10 sample books automatically in your database.
To run the file, use the following command in your terminal:
node generateBooks.js
-
Edit and Delete Books: Each book in the interface has dedicated buttons for editing and deleting.
-
Image Zoom: Tap on a book's image to view it in detail.
-
Detailed Information: Clicking on the title of a book provides detailed information.
-
Add Books: Use the "Add" button to add new books.