Skip to content

JDM-Github/jdm-electron-flask-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jdm-electron-flask-backend

Flask backend template for jdm-electron-flask-template desktop apps.

Stack

  • Python Flask + Flask-SocketIO
  • jdm-electron-flask PyPI package
  • PyInstaller for exe packaging

Structure

backend/
├── app/
│   ├── api/           # Blueprint routes
│   ├── core/          # Services
│   └── event/         # SocketIO events
├── config/
│   └── api.json       # Route registration
├── .env               # Secrets (gitignored)
├── production_run.py  # Entry point for exe
├── requirements.txt
└── run.py             # Dev entry point

Setup

pip install -r requirements.txt
cp .env.example .env
python run.py

Adding an API

run make-api --name person

This scaffolds app/api/person.py, app/core/person_service.py, and registers it in config/api.json.

Building the Exe

run compile --backend

Builds the Flask server as a standalone exe using PyInstaller and copies it to electron/resources and electron/test.

Environment Variables

Key Description
SECRET_KEY Flask secret key

About

Flask backend template for jdm-electron-flask desktop apps. Includes blueprint routing, SocketIO events, PyInstaller build support, and jdm-electron-flask PyPI integration.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages