63 lines
1.2 KiB
Markdown
63 lines
1.2 KiB
Markdown
# Publite Frontend
|
|
|
|
<p align="center">
|
|
<img src="https://github.com/publite/frontend/raw/main/logo.svg" alt="Publite logo" width="150px">
|
|
</p>
|
|
|
|
## Overview
|
|
|
|
Frontend for Publite service — E-Books reader
|
|
|
|
<table style="margin: auto">
|
|
<tr>
|
|
<td>
|
|
<img style="max-height: 50vh" src="public/images/screenshot3.webp"/>
|
|
</td>
|
|
<td>
|
|
<img style="max-height: 50vh" src="public/images/screenshot2.webp"/>
|
|
</td>
|
|
<td>
|
|
<img style="max-height: 50vh" src="public/images/screenshot1.webp"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
## Deploy
|
|
|
|
Dev environment setup:
|
|
|
|
```bash
|
|
npm i
|
|
|
|
# Run with watch
|
|
npm run dev
|
|
|
|
# Build to test prod
|
|
npm run build
|
|
npm exec serve -s build
|
|
```
|
|
|
|
Simple docker deployment
|
|
|
|
```bash
|
|
# build docker image
|
|
docker build . --build-arg PUBLIC_API_URL=<https://...> --build-arg PUBLIC_BASE_URL=<https://...> -t publite_frontend
|
|
|
|
# run it with docker
|
|
docker run -p <port>:8080 publite_frontend
|
|
```
|
|
|
|
Dokku deployment with image from Docker Hub
|
|
|
|
```bash
|
|
dokku apps:create publitefrontend
|
|
|
|
dokku git:from-image publitefrontend publite/frontend:latest
|
|
```
|
|
|
|
## TODO
|
|
|
|
- Migrate pagination cache and book state from LocalStorage to IndexedDB
|
|
- Add menu with book view setting
|
|
- Optimize page spliting algorythm (rewrite it)
|