rentease/README.md
Ruidy 9b2510460a
Some checks are pending
CI / checks (push) Waiting to run
feat: store invoice PDFs in minio
2026-03-20 23:58:57 +01:00

159 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# RentEase
Smart property management for short and midterm rentals: ingest bookings from
multiple sources, keep owners and guests in sync, and turn payments into clean
financial reporting.
![RentEase Logo](assets/assets/icons/favicon-main.png)
<!--toc:start-->
- [Features](#features)
- [Visuals](#visuals)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [Usage](#usage)
- [Development](#development)
- [Tech Stack](#tech-stack)
- [Project Layout](#project-layout)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [Support](#support)
- [License](#license)
- [Status](#status)
## Features
- **Invoice management**: Create and track invoices for each stay.
- **Activity reports**: Export booking and payment reports for owners and accountants.
- **Multi-platform sync**: Consolidate bookings from different channels.
- **Stripe automation (optional)**: Pull card payments from Stripe, validate webhooks,
and trigger manual syncs when needed.
- **PDF generation**: Produce guest-ready invoices and summaries.
## Visuals
![RentEase Screenshot](assets/assets/img/booking_screenshot.png)
## Quick Start
### Prerequisites
- Go (go.mod targets 1.25.4; use Go 1.22+ in practice)
- Docker + Docker Compose (for the recommended dev stack)
- PostgreSQL 14+ (Docker Compose starts one automatically)
### Run with Docker Compose (recommended)
```sh
git clone https://github.com/rjNemo/rentease.git
cd rentease
make dev
```
This starts the app on `http://localhost:8000` with hot reload and a local
Postgres instance.
### Run locally without Docker
```sh
git clone https://github.com/rjNemo/rentease.git
cd rentease
go mod download
cp .env.example .env # create this file using the Configuration section below
go run .
```
Set `APP_PORT` (defaults to 4200) to change the listening port when running locally.
## Configuration
Configuration is driven by environment variables (parsed with the `APP_` prefix).
Minimum required variables:
```sh
APP_DATABASE_URL=postgres://user:pass@localhost:5432/rentease?sslmode=disable
APP_ADMIN=admin@example.com
APP_ADMIN_SECRET=choose-a-strong-password
APP_API_KEY=your-api-key
APP_SECRET_KEY=signing-secret
APP_SESSION_SECRET=session-secret
APP_ORIGINS=http://localhost:8000
# Optional
APP_PORT=8000
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_OPENAI_MODEL=gpt-5-nano
APP_STRIPE_SECRET_KEY=
APP_STRIPE_WEBHOOK_SECRET=
APP_SENTRY_DSN=
APP_MINIO_ENDPOINT=
APP_MINIO_ACCESS_KEY=
APP_MINIO_SECRET_KEY=
APP_MINIO_BUCKET=
APP_MINIO_USE_SSL=false
APP_INVOICE_SHARE_URL_TTL=168h
```
Stripe values can be left blank for manual payment entry only.
When provided, webhooks are received at `/webhooks/stripe` and a manual sync is
available at `POST /api/stripe/sync` (API key protected).
MinIO values are optional unless you want invoice generation; when configured,
invoice PDFs are uploaded to the configured bucket and a presigned share URL is
stored in the database.
## Usage
- Start the stack (`make dev`) and open `http://localhost:8000`.
- Default dev credentials (from `docker-compose.dev.yml`):
- `admin@example.com` & `supersecret`.
- Create bookings, issue invoices, and review payments from the dashboard.
## Development
- `make dev` — run the dev stack with hot reload on `:8000`.
- `make test` — run `go test ./...`.
- `make format` — generate templ files and format Go + templ sources.
- `make lint` — run `golangci-lint`.
- `make run` — build and run the production image locally.
- `make stop` — shut down the dev stack.
## Tech Stack
- Go backend with PostgreSQL
- [Templ](https://templ.guide/) for server-rendered components
- [htmx](https://htmx.org/) for dynamic interactions with minimal JavaScript
- [GORM](https://gorm.io/) for database access
- [Stripe](https://stripe.com/) integration for payment syncing
## Project Layout
- `internal/service/booking` — booking lifecycle, items, reporting, PDF generation.
- `internal/service/payment` — manual payments plus Stripe sync and webhook handling.
- `internal/view` — templ components (generate `_templ.go` files locally).
## Roadmap
Track planned work and known issues on the [project board](https://github.com/users/rjNemo/projects/2/views/1).
## Contributing
Issues and pull requests are welcome! To propose a change:
1. Fork the repository.
2. Create a feature branch (`git checkout -b feature/amazing-idea`).
3. Run the test suite and linters (`make test`, `make lint`).
4. Open a PR describing your change and any setup notes.
## Support
Need help or found a bug? Please open an issue in this repository with as much
context as possible (logs, steps, and expected behavior).
## License
Distributed under the MIT License. See `LICENSE.md` for more information.
## Status
Active development.