Brothers Studio — Flask Photography Website
A responsive event photography website with a Flask + SQLite CMS/admin dashboard.
Included
- Premium Brothers Studio black / cream / gold visual system.
- Responsive public pages for home, categories, packages, About and Contact.
- Admin login and protected CMS at
/admin/login. - Editable homepage content and statistics. Homepage stats are 200+ Events Captured, 10+ Event Categories, and 4.9/5 Customer Rating.
- Editable phone, WhatsApp, email, address, Instagram, Facebook, YouTube and business hours from Contact & Website settings.
- WhatsApp links use the admin-configured WhatsApp number.
- Compact circular camera logo with
BROTHERSandSTUDIOon one line at the same size. - Category and package images can be selected directly from a phone/computer with upload, preview and 8 MB validation. No image URL entry is required for those fields.
- Mobile admin sidebar slides over the page with a backdrop and closes when tapping outside, selecting a menu item, pressing Escape, or tapping the menu button again.
- SQLite database is created automatically on first run. Existing databases are migrated so the homepage event statistic becomes 200+.
Run in Termux / Linux
pkg update
pkg install python
cd brothers_studio_website
pip install -r requirements.txt
python app.py
Then open http://127.0.0.1:5000/.
Admin
- URL:
http://127.0.0.1:5000/admin/login - Default email:
admin@brothersstudio.local - Default password:
admin123
Change the password implementation/credentials before production use.
Image uploads
From Admin → Categories or Packages → Add/Edit, choose an image in the file picker. The browser uploads it to static/uploads/, previews it immediately, and saves the resulting path in SQLite. Supported formats: PNG, JPG, JPEG, WEBP, GIF. Maximum upload size: 8 MB.
Main files
app.py— Flask routes, SQLite schema, seed data and REST APItemplates/— public and admin pagesstatic/css/style.css— responsive stylingstatic/js/admin.js— admin navigation, CRUD forms and image uploadsdatabase.db— generated automatically at runtime
SEO features
- Dynamic page titles and meta descriptions for homepage, categories, packages, About and Contact.
- Canonical URLs and Open Graph/Twitter metadata.
- LocalBusiness JSON-LD on public pages, plus Service schema on category pages and Product/Offer schema on package pages.
- Dynamic
/sitemap.xmlcontaining published categories and packages. /robots.txtallows public pages and disallows/admin.- Admin > Contact & Website now includes Website URL for production canonical/sitemap URLs.
- Recommended: set the real production URL in Admin > Contact & Website, then submit
/sitemap.xmlin Google Search Console.
Wasmer Edge deployment
This build is prepared for Wasmer Edge.
What changed for Wasmer
- Flask remains the application framework.
- SQLite is kept for local Termux development.
- When Wasmer provides
DB_HOST,DB_PORT,DB_NAME,DB_USERNAMEandDB_PASSWORD, the app automatically uses PostgreSQL instead. - Wasmer's managed PostgreSQL database is requested through
app.yaml. - Uploaded category/package/media images are stored under the persistent
/datavolume and served at/uploads/.... SECRET_KEY,ADMIN_EMAIL, andADMIN_PASSWORDcan be supplied as Wasmer secrets/environment variables.- The existing SEO routes, admin CMS, WhatsApp settings, category/package CRUD, reviews, FAQs and media upload remain available.
Deploy from a computer or Termux/Linux environment
- Install Wasmer and create/sign in to your account.
- Extract this project and enter the project directory.
- Run:
wasmer login
wasmer deploy
Wasmer will prompt for the app owner/name when needed. The project contains app.yaml and wasmer.toml so the deployment is configured for Flask, PostgreSQL and persistent uploads.
First deployment secrets
In the Wasmer app dashboard, open Settings → Environment Vars and set:
SECRET_KEY=<long-random-secret>
ADMIN_EMAIL=<your-admin-email>
ADMIN_PASSWORD=<strong-admin-password>
Then use Save and Redeploy.
If you do not set the admin variables, the local development defaults remain:
admin@brothersstudio.local
admin123
Change them before making the public site live.
Image uploads
From the admin dashboard you can still select images directly from your phone/computer. On Wasmer, new uploads are written to the persistent /data/uploads volume, so they are not tied to the temporary application filesystem.
Custom domain
After deployment, Wasmer provides a *.wasmer.app URL. A custom domain can be connected later from the Wasmer app settings.
Local Termux development
The normal local workflow still works:
pip install -r requirements.txt
python app.py
The local version uses database.db and static/uploads/ unless the PostgreSQL/upload environment variables are explicitly configured.
Wasmer fix v1.0.1
This build follows Wasmer's current Flask packaging pattern: create .env, install Flask there, and map .env/lib/python3.12/site-packages into the Wasmer Python runtime. Run bash setup_wasmer.sh in Termux before wasmer deploy. SQLite and uploaded media are stored under the persistent /data volume.