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

https://github.com/helmecke/minibiblio


https://github.com/helmecke/minibiblio

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# MiniBiblio

![GitHub release (latest by date)](https://img.shields.io/github/v/release/helmecke/minibiblio?label=version)
![Docker Pulls](https://img.shields.io/badge/docker-ghcr.io-blue)
![License](https://img.shields.io/github/license/helmecke/minibiblio)

A comprehensive library management system for small libraries.

## Quick Start

### Using Pre-built Images (Recommended)

1. **Download the deployment files**:
```bash
wget https://raw.githubusercontent.com/helmecke/minibiblio/main/docker-compose.prod.yml
wget https://raw.githubusercontent.com/helmecke/minibiblio/main/.env.production
```

2. **Configure environment**:
```bash
cp .env.production .env
# Edit .env with your credentials
```

3. **Start MiniBiblio**:
```bash
docker-compose -f docker-compose.prod.yml up -d
```

4. **Access the application**:
- Web Interface: http://localhost:3000
- Default credentials: admin / (see .env for ADMIN_PASSWORD)

### Building from Source

See [DEPLOYMENT.md](DEPLOYMENT.md) for detailed build instructions.

## Introduction

This is a hybrid Next.js + Python app that uses a fullstack Next.js application and FastAPI as another API backend. One great use case of this is to write Next.js apps that use Python AI libraries on the backend.

## How It Works

The Python/FastAPI server is mapped into to Next.js app under `/api/py/`(easily changeable) and the NextJS is mapped to `/api/`.

This is implemented using [`next.config.js` rewrites](https://github.com/digitros/nextjs-fastapi/blob/main/next.config.js) to map any request to `/api/py/:path*` to the FastAPI API, which is hosted in the `/api` folder.

On localhost, the rewrite will be made to the `127.0.0.1:8000` port, which is where the FastAPI server is running.

In production, the FastAPI server is hosted as [Python serverless functions](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/python) on Vercel.

## Demo

## Deploy Your Own

You can clone & deploy it to Vercel with one click:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fpsycho-baller%2Fnextjs-and-fastapi-backend%2Ftree%2Fmain)

## Developing Locally

You can clone & create this repo with the following command

```bash
npx create-next-app nextjs-fastapi --example "https://github.com/psycho-baller/nextjs-and-fastapi-backend"
```

## Getting Started

First, install the dependencies:

```bash
npm install
# or
yarn
# or
pnpm install
```

Install [uv](https://docs.astral.sh/uv/) for Python dependency management:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Then, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

The FastApi server will be running on [http://127.0.0.1:8000](http://127.0.0.1:8000) – feel free to change the port in `package.json` (you'll also need to update it in `next.config.js`).

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [FastAPI Documentation](https://fastapi.tiangolo.com/) - learn about FastAPI features and API.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!