The Virtual Library is a small web application built using Laravel for the backend and ReactJS for the frontend. It allows users to manage a list of books and authors.
- View a list of books
- View details of a specific book, including the author's information
- View a list of authors
- View details of a specific author, including the books they have written
- Add a new book
- Add a new author
- Backend (Laravel): The backend code is located in the
virtual-backend
directory. It includes controllers, models, routes, and migrations for books and authors. - Frontend (ReactJS): The frontend code is located in the
Virtual-lib dashboard
directory. It includes React components, styles, and API service functions.
- Clone the repository:
git clone https://github.com/mwihoti/virtual-library.git
- Navigate to the backend directory:
Copy code
cd virtual-library/virtual-backend
- Install dependencies:
Copy code
composer install
Copy the .env.example file to create a .env file:
Copy code
cp .env.example .env
Configure the .env file with your database connection details.
- Generate the application key:
Copy code
php artisan key:generate
- Run migrations to create the database tables:
Copy code
php artisan migrate
- Start the Laravel development server:
Copy code
php artisan serve
- Frontend (ReactJS): Open a new terminal window and navigate to the frontend directory:
Copy code
cd virtual-library/virtual-lib_dashboard
- Install dependencies:
Copy code
npm install
- Start the React development server:
Copy code
npm start
Open your browser and go to http://localhost:3000 to access the React app.
Usage Visit http://localhost:8000 to access the Laravel backend. Use the React app at http://localhost:3000 to interact with the frontend.