https://github.com/dssalaza/bookshelf
Simple web app to keep track of books. Add new ones, check out their details and remove them if needed. Plus I've dockerize this full-stack web application
https://github.com/dssalaza/bookshelf
docker docker-compose mongoose react vitejs
Last synced: 3 months ago
JSON representation
Simple web app to keep track of books. Add new ones, check out their details and remove them if needed. Plus I've dockerize this full-stack web application
- Host: GitHub
- URL: https://github.com/dssalaza/bookshelf
- Owner: dssalaza
- Created: 2024-11-22T03:37:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-08T20:14:38.000Z (over 1 year ago)
- Last Synced: 2025-02-19T09:14:47.627Z (over 1 year ago)
- Topics: docker, docker-compose, mongoose, react, vitejs
- Language: JavaScript
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BOOKSHELF Project README
This project consists of two main components:
- **Frontend (FE):** `Book-list`
- **Backend (BE):** `Service`
Both components are designed to run locally using Docker Compose.
## Prerequisites
Ensure you have the following installed:
- [Docker](https://www.docker.com/get-started)
- [Docker Compose](https://docs.docker.com/compose/install/)
## Setup and Installation
### Clone the Repository
```bash
git clone
cd
```
### File Structure
The project is organized as follows:
```
.
├── docker-compose.yml
├── docker-compose.debug.yml
├── frontend/ # Contains the Book-list frontend code
├── backend/ # Contains the Service backend code
```
### Environment Variables
Environment variables need to be set in individial projects. Check `README.md` file of each project.
## Running the Project
### Start the Services
Make sure you are running your docker daemon (docker desktop)
Run the following command in the project root directory:
```bash
docker-compose up
```
Note: If it is the first time running the project then it will take some time as the images need to be build
### Access the Application
- **Frontend (Book-list):** [http://localhost:3000](http://localhost:3000)
- **Backend (Service):** [http://localhost:5000](http://localhost:5000)
### Stopping the Services
To stop the services, press `Ctrl+C` or run:
```bash
docker-compose down
```
## Development Notes
### Frontend Development
Navigate to the `Book-list/` directory and install dependencies:
```bash
cd Book-list
npm install
```
Run the development server:
```bash
npm start
```
### Backend Development
Navigate to the `Service/` directory and install dependencies:
```bash
cd Service
npm install
```
Run the backend server:
```bash
npm run start
```
## Troubleshooting
- **Ports in use:** If ports `3000` or `5000` are already in use, stop the conflicting services or update the ports in `docker-compose.yml`.
- **Docker issues:** Ensure Docker and Docker Compose are running and up-to-date.
## TODO:
There are a few improvements that I'd like to implement to this project:
- [x] Improve main project README
- [ ] Generate Swagger API documentation
- [x] Update README for individual projects
- [ ] Add steps to run locally without docker
- [ ] Spin Mongo database as part of docker compose
- [ ] Add linting
- [ ] Add pre commit hook
- [ ] Add Playwright tests