A lightweight, self-hosted billing and order management site built for JexPanel hosting services.
Designed as a personal project to make affordable, community‑focused servers accessible without the complexity of big hosting platforms.
M12hosting is a Flask-based web app that handles:
- Browsing and ordering hosting plans (Minecraft Vanilla, CurseForge modpacks, and Discord bots)
- Manual order review and approval via admin panel
- Customer order tracking
- Contact page for pre‑sales/support inquiries
The app uses:
- Flask 3.x
- Flask‑SQLAlchemy
- Flask‑WTF (CSRF‑protected forms)
- Flask‑Limiter (rate limiting)
- SQLite by default (PostgreSQL supported via
DATABASE_URL) - Redis (for rate‑limit storage)
- Docker Compose (optional containerized setup)
| Feature | Description |
|---|---|
| Billing System | Displays categorized plans from a billables.json source file. |
| Manual Approval Workflow | Orders are created and manually approved in the admin panel before payment. |
| Public Pages | Home, Billing, Checkout, Order Status, Contact. |
| Admin Tools | View recent orders, update order status, sync billables.json into the database. |
| CSRF + Rate Limiting | All forms and sensitive routes are protected. |
| Dark Theme UI | Clean, responsive, card‑based layout with purple/black neon styling. |
- Language: Python 3.11+
- Framework: Flask 3.x
- Database: SQLite (default) or PostgreSQL (via
DATABASE_URL) - Cache / Rate Storage: Redis
- Frontend: HTML5, CSS3, Jinja2 templates
- Runtime (optional): Docker + Gunicorn
M12hosting/
├── app.py
├── billables.json
├── requirements.txt
├── example.env
├── .env
├── docker-compose.yml
├── Dockerfile
├── static/
│ ├── styles.css
│ └── icon.png
└── templates/
├── base.html
├── index.html
├── billing.html
├── checkout.html
├── order.html
├── admin.html
└── contact.html
- Install dependencies
pip install -r requirements.txt- Create
.env
cp example.env .envEdit values as needed. If DATABASE_URL is empty, the app uses a Windows‑safe SQLite path ./data/app.db.
- Run
python app.pyVisit: http://localhost:${PORT:-5000}
Tip: The app auto‑creates tables on start.
/billingwill syncbillables.jsoninto the DB when you trigger the admin sync or run the CLI/route you’ve wired for syncing.
Build & run:
docker compose up --buildIf you’re using PostgreSQL in Compose, ensure DATABASE_URL matches your driver (e.g., postgresql+psycopg2://user:pass@db:5432/m12hosting).
billables.jsonis the source of truth for plans, Exported From Jexpanel- A sync step imports/updates plans into the database (idempotent).
- Orders and statuses are stored in SQLite/PostgreSQL.
- Admin manages approvals in
/billables(Basic Auth).
- Theme: Dark (purple/black base, neon blue accents)
- Cards: Equal‑height grid, price centered, CTA pinned to bottom
- Mobile: Fully responsive, sticky category chips on billing
- Smooth scroll: Anchor links like
/billing#curseforge-modded