An open API service indexing awesome lists of open source software.

https://github.com/naingaunglwin-dev/openbook

Openbook is a simple online library application built with Laravel (API backend) and React (frontend)
https://github.com/naingaunglwin-dev/openbook

Last synced: 6 months ago
JSON representation

Openbook is a simple online library application built with Laravel (API backend) and React (frontend)

Awesome Lists containing this project

README

          

# Openbook

**Openbook** is a simple online library application built with **Laravel (API backend)** and **React (frontend)**.
The project is designed as a real-world style application with a clean separation between backend and frontend, using Docker for local development.

## Tech Stack
| Layer | Technology |
|------------|--------------|
| Backend | Laravel (API) |
| Frontend | React (Vite) |
| Database | PostgreSQL |
| Container | Docker & Docker Compose |
| Web Server | Nginx |

---

## Project Structure

```text
openbook/
├── backend/ # Laravel API backend
├── frontend/ # React frontend
├── docker-compose.yml
└── README.md
```

---

## Installation & Setup (Using Docker)

### Prerequisites
- Docker
- Docker Compose

### Steps
1. Clone the repository:
```bash
git clone https://github.com/naingaunglwin-dev/openbook.git
```

2. Navigate to the project root:
```bash
cd openbook
```

3. Build the containers:

```bash
docker-compose build --no-cache
```

4. Start the containers:

```bash
docker-compose up
```

### Access the Application
- **Backend (Laravel API)**: http://localhost:8080
- **Frontend (React)**: http://localhost:5173

---

## Installation & Setup (Without Docker)

### Backend (Laravel)

1. Navigate to the backend directory:
```bash
cd openbook/backend
```

2. Copy environment file:
```bash
cp .env.example .env
```

3. Install dependencies:
```bash
composer install
```

4. Generate application key:
```bash
php artisan key:generate
```

5. Configure database credentials in `.env`

6. Run the server:
```bash
php artisan serve
```

### Frontend (React)

1. Navigate to the frontend directory:
```bash
cd openbook/frontend
```

2. Install dependencies:
```bash
npm install
```

3. Start development server:
```bash
npm run dev
```