live link https://archive-arcade-mini-project.onrender.com An end-to-end Flask app that blends a curated Books catalog, a Video Games shop with cart and demo checkout, a Cafe booking system, an Admin dashboard with revenue insights, and a Community page for email-based joining and admin updates. Modern glass UI with background videos and a unified header across pages.
-
Accounts and access
- Signup, login, logout. Shared glass UI header across all pages.
- Admin detection: username
admin, first user (ID=1), or usernames in envADMIN_USERS. - Header greets logged-in users by display name if set.
-
Books catalog (
/books)- Filter by category and search by title/author/description.
- Add to cart (Buy or Rent). Background video and glass cards.
- Video games shop (
/video_games)- Tag-style categories, search, add to cart (Buy or Rent).
- Background video and glass cards UI.
-
Cart, checkout, and history
- Cart: add/remove/clear, dynamic header count.
- Checkout (
/checkout): choose Card/UPI/COD/Demo; persisted topurchase_historyininstance/games.db. - History (
/history): view past purchases.
-
Cafe system (
/cafe)- Availability rules: Sunday closed; Saturday members-only note.
- Slot listing with capacity and default durations; booking with overlap checks.
- View/cancel “My Bookings.” Frosted black glass visuals.
-
Admin dashboard (
/admin)- Totals, revenue by payment method, revenue by day (trend bars).
- Purchase list with method tags; cafe bookings; derived members ranking.
- CSV export at
/admin/revenue.csv. - Background videos play sequentially on admin:
books.mp4→videogames.mp4.
-
Community page (
/community)- Join via email from Home; no login required. Stores
community_emailin session. - Updates feed: admins can post; all members can read.
- Members panel: lists subscribers (emails masked for non-admins) with avatars.
- Profile: set display name and upload photo; mirrored to User account if logged in.
- Logged-in users can change account username.
- Join via email from Home; no login required. Stores
- Python 3.12, Flask 3.x
- Flask-SQLAlchemy for
users.db(User model) - SQLite (raw) for
books.db,games.db(purchase history),cafe.db,community.db - HTML + Jinja2 templates, CSS glass design, small vanilla JS
- Clone and enter the project
git clone https://github.com/stashlop/Archive-Arcade-mini-project.git
cd Archive-Arcade-mini-project- Create a virtual environment and install deps
python3 -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows (PowerShell)
pip install -r requirements.txt- Run the app (note: folder name contains an ampersand)
python A\&A/app.py # Linux/macOS
# python "A&A/app.py" # WindowsThe app will start on http://127.0.0.1:5000 by default.
- Default admin seeded on first run:
- Username:
admin - Password:
admin123
- Username:
- You can also set:
ADMIN_DEFAULT_PASSWORDto change the default admin password.ADMIN_USERSas a comma-separated list of additional admin usernames.
- Admin-only pages and actions require login; an “Admin” link appears in the header when admin.
-
SECRET_KEY: Flask secret (default:dev-secret-key-change-me) -
ADMIN_DEFAULT_PASSWORD: seed password for admin -
ADMIN_USERS: comma-separated usernames to grant admin -
Cafe settings:
CAFE_OPEN(default10:00)CAFE_CLOSE(default22:00)CAFE_SLOT_STEP_MIN(default60)CAFE_DEFAULT_DURATION(default60)CAFE_SLOT_CAPACITY(default10)
-
Currency & pricing:
USD_TO_INR— conversion rate used by the Jinjainrfilter (default83). Catalog base prices (stored in USD) convert at render time; cart line item unit prices and purchase totals are stored already converted to INR.
-
Persistence:
INSTANCE_PATH— override Flask instance folder path (e.g./var/data/arcade-instance) for deployments needing persistent disks.
All databases live under instance/ and are created automatically on first use:
users.db— Flask-SQLAlchemy User table (username, password_hash, display_name, photo_path)books.db— books catalog (seeded on first run)games.db— purchase_history (writes on checkout)cafe.db— cafe_bookingscommunity.db— community_subscribers, community_messages
Purchase history now includes a delivery_status column with lifecycle values:
Processing(default when order is created)Out for deliveryDelivered(admin endpoint mapsSuccess/Successfulinputs toDelivered)
Admins update status via the dashboard dropdown; users see a status badge beside each order in /history.
User-uploaded avatars are saved under static/uploads/community/.
/— About (background video)/books— Books library (filters + add to cart)/video_games— Video games (filters + add to cart)/cart— Cart/checkout— Choose payment method & complete demo purchase/history— Purchase history/cafe— Book slots; view/cancel your bookings/admin— Dashboard (admins)/community— Community updates, profile, members; admins can post
- Cart (
/api/cart/*):GET /,POST /add,POST /remove,POST /clear,POST /checkout - Cafe:
GET /api/cafe/availability?date=YYYY-MM-DDGET /api/cafe/slots?date=YYYY-MM-DDPOST /api/cafe/book{ date, time, partySize, duration, note }GET /api/cafe/bookings(mine)DELETE /api/cafe/bookings/<id>
- Community:
POST /community/join{ email }GET /api/community/messages(list)POST /api/community/messages(admin-only)GET /api/community/subscribers(masked emails for non-admins)POST /community/profile(multipart: display_name, photo)GET /api/community/mePOST /account/username{ username } (logged-in users)
- Admin:
GET /adminGET /admin/revenue.csv
To reset all local databases (they’ll recreate on next run):
rm -f instance/*.dbOptionally clear uploaded avatars:
rm -f A\&A/static/uploads/community/* # Linux/macOS
# del "A&A\static\uploads\community\*" # Windows- Background videos:
books.mp4,videogames.mp4, andabout.mp4are used across pages; admin page plays books → videogames in sequence. - The app self-heals missing DB columns (for safe upgrades) and seeds defaults on first run.
- Because the app folder has an ampersand (
A&A), prefer running with the direct Python path as shown above.
This is a complete, runnable demo showcasing catalog + commerce flow (with INR conversion and delivery status tracking), bookings, admin dashboards, and community messaging with profiles, wrapped in a cohesive glass UI.