A new Flutter project.
FlutterFlow projects are built to run on the Flutter stable release.
NEVER rebuild from source and deploy without verifying the purple theme is preserved.
The deployed app uses a #9900FF purple theme (Duniya brand). This theme was originally applied via surgical JS edits to the compiled main.dart.js. The source code has now been updated to include the purple theme (see flutter_flow_theme.dart and main.dart), but:
- The live deployed build at
medi-tracker-deploy/public/main.dart.jsis the source of truth - Any new build from source MUST be verified to include the purple theme before deployment
- The safe approach for adding features is surgical JS edits to the compiled
main.dart.js - The Flutter build output directory (
build/) has been intentionally removed to prevent accidental rebuilds
If you must rebuild:
- Verify
flutter_flow_theme.darthasColor(0xFF9900FF)as primary - Verify
main.darthasColor(0xFF9900FF)as primaryColor - Build and compare the new
main.dart.jssize (~6.5MB) with the deployed one - Obfuscate API keys before pushing to GitHub
- Test thoroughly before deploying
render.yaml deploys Duniya as a Render Static Site (runtime: static). This is the correct service type for a Flutter web app, which produces only static HTML/JS/CSS.
Why not the previous Docker web service:
- Render free web services get 750 instance-hours/month — a 24/7 service consumes ~720 of those just staying alive, leaving almost no headroom for rebuilds. Partway through the month deploys would fail with "pipeline exhausted".
- Render static sites are served from a CDN with no instance-hour limit. They have a separate 500 build-minutes/month quota, which is more than enough for ~25 Flutter web rebuilds a month.
If you still have the old Docker web service (medi-tracker):
- Create a new Static Site on Render → New → Static Site → connect the GitHub repo → Render will read
render.yamland pre-fill the config. Service name will beduniya-web. - Verify the build completes successfully. The build runs
./build.sh, which:- Downloads Flutter 3.24.5 from the pinned tarball (cached on
/opt/render-cachefor subsequent builds). - Runs
flutter pub getthenflutter build web --release --web-renderer html. - Copies
web/_redirectstobuild/web/_redirectsso deep links like/loginUniwork on the CDN.
- Downloads Flutter 3.24.5 from the pinned tarball (cached on
- Wire up the custom domain
ivm.duniyahealthcare.comon the new static site (Settings → Custom Domains). - Delete the old
medi-trackerweb service once traffic is verified on the new static site.
./build.sh # outputs to ./build/web
# Then serve locally to test:
python3 -m http.server --directory build/web 8080| File | Purpose |
|---|---|
render.yaml |
Render service definition (static site). |
build.sh |
Build pipeline script (Flutter install + flutter build web). |
web/_redirects |
SPA fallback rule copied into the build output. |
Dockerfile |
Fallback Docker runtime (kept for reference; not used by static site). |
nginx.conf |
Fallback nginx config (only used if you re-enable the Docker service). |
.dockerignore |
Excludes skills/, upload/, ios/, android/, .git/ etc. from Docker context. |
- Build OOMs at
flutter build web: switch renderer tohtml(already set inbuild.sh). Canvaskit builds of this app need 2–4 GB RAM; html needs ~1.5 GB. If you still OOM, upgrade the Render plan to a paid tier for builds only. - Deep links 404: ensure
web/_redirectsis present andbuild.shran the copy step. - Custom domain not serving: Render static sites need the domain added under Settings → Custom Domains AND the DNS CNAME pointing to Render's
onrender.comhost. - Build still "pipeline exhausted": this means you've used up the 500 free build-minutes for the month. Either wait for the next billing cycle, upgrade to a paid plan, or reduce deploy frequency.