https://github.com/coderooz/python-flask-recipt-generator
A simple yet powerful Receipt Generator built with Python (Flask), SQLite, and ReportLab. This tool allows you to create receipts through a clean web UI, store them locally, and export professional PDF receipts.
https://github.com/coderooz/python-flask-recipt-generator
flask flask-sqlalchemy python recipt-generator reportlab-pdf sqlite
Last synced: 3 months ago
JSON representation
A simple yet powerful Receipt Generator built with Python (Flask), SQLite, and ReportLab. This tool allows you to create receipts through a clean web UI, store them locally, and export professional PDF receipts.
- Host: GitHub
- URL: https://github.com/coderooz/python-flask-recipt-generator
- Owner: coderooz
- License: mit
- Created: 2025-08-20T13:23:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T15:07:02.000Z (5 months ago)
- Last Synced: 2025-08-20T16:17:19.421Z (5 months ago)
- Topics: flask, flask-sqlalchemy, python, recipt-generator, reportlab-pdf, sqlite
- Language: Python
- Homepage:
- Size: 152 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ๐งพ Python Flask Receipt Generator
A simple yet powerful **Receipt Generator** built with **Python (Flask)**, **SQLite**, and **ReportLab**.
This tool allows you to create receipts through a clean web UI, store them locally, and export professional **PDF receipts**.
---
## ๐ Repository
_GitHub_ : [coderooz/Python-Flask-Recipt-Generator](https://github.com/coderooz/Python-Flask-Recipt-Generator)
---
## ๐ Features
- Web-based UI for creating receipts
- Local storage using **SQLite**
- Professional **A4 PDF receipts** via ReportLab
- Clean dark-themed interface
- Two versions available:
- **Version 1**: Basic form with all fields (organization details must be entered every time)
- **Version 2**: Improved UI + persistent organization setup (saved once in `config.json`)
---
## ๐ฆ Requirements
- Python 3.9+
- Virtual environment recommended
Install dependencies:
```bash
pip install -r requirements.txt
````
---
## โถ๏ธ Running the Project
```bash
python app.py
```
Visit: **[http://127.0.0.1:5000](http://127.0.0.1:5000)**
---
## ๐ Versions
### ๐น Version 1 (Basic)
* Organization details are entered **with each receipt**.
* Simple UI for quick setup.
* Good for quick demos or one-off use.
Click to view details
**Main files:**
* `app.py`
* `templates/base.html`
* `templates/index.html`
* `templates/receipt.html`
**Flow:**
1. User fills **organization + patient details** together.
2. Data is saved in **SQLite**.
3. Receipts can be **previewed** and **downloaded as PDF**.
---
### ๐น Version 2 (Improved)
* Organization details set **once at startup** via `/setup` (saved to `config.json`).
* Receipts auto-include org info from config.
* Cleaner UI with:
* Separate **Gender** and **Age** fields
* More generic labels (`Name`, `Guardian`, `Consultant`, etc.)
* Modern card/grid-based design
* Flash messages for better feedback
* Polished PDF export
Click to view details
**Main additions:**
* `setup.html` โ one-time org setup page
* `static/style.css` โ global modern styling
* `config.json` โ auto-saved org settings
**Flow:**
1. First run โ redirected to `/setup`.
2. Save org/clinic info.
3. Create receipts with **only client details**.
4. Preview receipt and **Download PDF**.
---
## ๐ท Screenshots
### Version 1
*Form + Receipt Preview*

### Version 2
*Setup + Modernized UI*
.png)
---
## ๐ ๏ธ Tech Stack
* **Backend:** Flask
* **Database:** SQLite (via SQLAlchemy ORM)
* **PDF:** ReportLab
* **Frontend:** Jinja2 templates + custom CSS (dark theme)
---
## ๐ Roadmap
* [ ] Add MongoDB option
* [ ] Add multiple line items per receipt
* [ ] Export receipts history
* [ ] Deployable via Docker
---
## ๐ License
[MIT License](/LICENSE) ยฉ [coderooz](https://github.com/coderooz)
---