Add deployment verification, redeploy steps, and repository clone/push instructions to README. Co-Authored-By: Oz <oz-agent@warp.dev>
Flutter E-Commerce Portal (Dockerized)
A self-contained Flutter web e-commerce portal served through Docker + Nginx.
Features
- Flutter web e-commerce layout:
- Product grid (home)
- Product detail page
- Cart page
- Checkout skeleton page
- User profile page
- Authentication via Firebase Authentication:
- Email + password
- Google login
- GitHub login
- Dockerized build and runtime (no host Flutter SDK required)
Prerequisites
- Ubuntu with:
- Docker Engine
- Docker Compose plugin (
docker compose)
Project Structure
lib/screens/UI pages and auth flowlib/widgets/reusable UI widgetslib/models/domain modelslib/services/auth, config, catalog, and cart logicassets/config/runtime Firebase config templatesDockerfilemulti-stage Flutter web build + Nginx runtimedocker-compose.ymlapp service orchestrationinstall_portal.shone-command install/rununinstall_portal.shcleanup script
Configure Authentication Providers
- Create a Firebase project.
- In Firebase Console > Authentication > Sign-in method, enable:
- Email/Password
- GitHub
- In Firebase Console > Project settings > General, copy web app config values.
- Create local env file:
cp .env.example .env - Edit
.envand set:FIREBASE_API_KEYFIREBASE_AUTH_DOMAINFIREBASE_PROJECT_IDFIREBASE_STORAGE_BUCKETFIREBASE_MESSAGING_SENDER_IDFIREBASE_APP_IDFIREBASE_MEASUREMENT_ID(optional)
- For GitHub provider in Firebase, configure GitHub OAuth app callback URL exactly as Firebase instructs.
Install and Run
chmod +x install_portal.sh uninstall_portal.sh
./install_portal.sh
The portal will be available at:
http://localhost:8081(default)- or
http://localhost:<PORTAL_PORT>if you changedPORTAL_PORTin.env
Deployment Process
- Ensure configuration is set in
.env(especially Firebase values and optionalPORTAL_PORT). - Build and start the application:
./install_portal.sh - Verify deployment status:
docker ps --filter name=flutter_ecommerce_portal_web curl -I http://localhost:8081 - Open the portal in a browser at
http://localhost:8081.
Redeploy After Changes
./install_portal.sh
This command rebuilds the Flutter web image and recreates the container.
Repository Details
- Repository (web):
https://github.com/quantumrag/flutter_ecommerce_portal - Repository (SSH):
git@github.com:quantumrag/flutter_ecommerce_portal.git - Default branch:
master
Clone and Push
Clone:
git clone git@github.com:quantumrag/flutter_ecommerce_portal.git
Push local changes:
git add .
git commit -m "<your message>"
git push origin master
Uninstall / Cleanup
Interactive cleanup:
./uninstall_portal.sh
Non-interactive cleanup:
./uninstall_portal.sh --force
This removes containers, local images, networks, and volumes created by this portal's Compose project.
Notes on Secrets
- Keep secrets and keys in
.envonly; do not hard-code in Dart files. .envis consumed by Docker Compose and injected into the runtime config file inside the container.- For production, use a proper secret manager or CI/CD secret injection.
Description
Languages
Dart
92.1%
Shell
5.9%
Dockerfile
2%