Project structure · Mobile
Flutter project structure
Opens with creditsFor anyone building one Dart app for Android, iOS and the web. The tree starts from what flutter create gives you and grows into a feature-first lib/ folder, where each feature keeps its own data, domain and presentation code, then adds tests at every level, flavors, release signing, crash reporting and, for large teams, a melos workspace of local packages.
How it grows
Each stage opens the explorer there
- 1Day 1What the scaffold and your first hour give you48 files and folders
- 2GrowingWhat a real app with features and tests adds+95 files and folders
- ProductionWhat running it for real users adds+47 files and foldersOpens with credits
- ExpertWhat a team needs to keep it healthy for years+34 files and foldersOpens with credits
How it is organised
- Group lib/ by feature, not by file type: everything about orders lives in lib/features/orders/, so a change touches one folder and a feature can be deleted cleanly.
- Inside a feature, keep three layers: data (talks to the API or local storage), domain (plain Dart models and rules), presentation (screens, widgets and their controllers). Widgets never call HTTP directly.
- The official Flutter architecture guide puts UI by feature and data by type (lib/ui, lib/data). Both work. Feature-first is shown here because it is what most teams and packages document, and it scales better once you have ten or more screens.
- Pick one state management approach and use it everywhere. This tree uses Riverpod (providers you can override in tests, no BuildContext needed). Bloc is the other common choice: more ceremony, very explicit events and states, popular in larger teams. Both are fine; mixing them is not.
- Shared code goes in lib/core/ only when two or more features use it, and core never imports features. In a large codebase those rules become packages in a melos workspace, where the compiler enforces them.
- Test in layers: many unit tests for rules and repositories, widget tests for every screen state, goldens for key widgets, and a few integration tests for the journeys that make money.
- Anything compiled into the app (dart-define values, assets, Firebase ids) can be extracted from it. Real secrets stay on your server; tokens go to secure storage; obfuscation only slows attackers down.
- Only generate the platforms you ship: every extra platform folder is code you have to keep building and upgrading.
At the top of the project
Open one in the explorer for the full story
- my_app/
- .dart_tool/Dart and Flutter tool cache: resolved packages, build state, generated code.
- .idea/Android Studio and IntelliJ project settings.
- .vscode/VS Code launch configurations, settings and recommended extensions shared with the team.3 inside
- android/The native Android project that wraps your Dart code. A normal Gradle project.7 inside
- assets/Images, fonts, icons and other files bundled into the app.3 inside
- build/Build output: APKs, App Bundles, web builds, symbols and intermediates.
- config/Per-environment settings passed in with --dart-define-from-file.2 inside
- coverage/Coverage report from flutter test --coverage (lcov.info).
- ios/The native iOS project (Xcode) that wraps your Dart code.7 inside
- lib/All your Dart code. Everything outside lib/ is configuration, platforms or tests.6 inside
- test/Unit, widget and golden tests, mirroring the lib/ folders.4 inside
- tool/Dart scripts for the project: codegen, checks, release helpers.
- web/The HTML shell, favicon, icons and PWA manifest for the web build.4 inside
- .fvmrcPins the Flutter SDK version for the project with FVM.
- .gitignoreKeeps build output, tool caches and IDE files out of git.
- .metadataWhich Flutter version and platforms created this project.
- AGENTS.mdInstructions for AI coding agents: commands, folder rules, state management choice.
- CLAUDE.mdClaude Code instructions; usually just points at AGENTS.md.
- MakefileShort commands: make gen, make check, make test, make run-staging, make goldens.
- README.mdHow to set up, run, test and release the app.
- analysis_options.yamlLint rules for flutter analyze and your editor.
- build.yamlOptions for build_runner generators, like snake_case JSON field names.
- devtools_options.yamlWhich DevTools extensions are enabled for this project.
- flutter_launcher_icons.yamlSettings for generating Android, iOS and web icons from assets/icons.
- l10n.yamlSettings for flutter gen-l10n: where ARB files live and what to generate.
- lefthook.ymlGit hooks: format and analyze changed files before each commit.
- my_app.imlIntelliJ module file for the project.
- pubspec.yamlThe app's name, version, Dart SDK range, dependencies, assets and fonts.
- pubspec.lockThe exact versions of every package that pub resolved.
Learn more on Sefism
Roadmaps, cheat sheets and projects that go with Flutter.
- Roadmap· FlutterMobile development roadmapApps for Android and iOS
- RoadmapLinux, terminal and Git roadmapShell, Git, SSH and your dev setup
- RoadmapCoding with AI tools roadmapClaude Code, Cursor, Copilot, used well
- Cheat sheetMobile development cheat sheetApps for Android and iOS.
- Cheat sheetLinux, terminal and Git cheat sheetShell, Git, SSH and your dev setup.
- FYP idea· IntermediateVoice-First Udhaar Ledger App for Small ShopkeepersA final year project that builds an Android credit ledger (udhaar khata) for small shopkeepers where entries are spoken, not typed: "Aslam, 450 rupees, sugar and tea". On-device speech parsing, offline storage, customer reminders and a clear daily balance for owners who find typing slow.
- FYP idea· BeginnerElectricity Slab Tracker App That Warns Before You Lose the Protected TariffBuild a mobile app where households enter their meter reading every few days and see how many units they will use by the end of the billing cycle, the estimated bill and how close they are to the next tariff slab. In Pakistan, crossing the 200-unit protected threshold in one month can raise bills for months afterwards. The app turns occasional meter readings into a forecast and timely warnings, with the tariff rules kept as editable data.
- FYP idea· AdvancedVerifiable Committee (ROSCA) Ledger with Provably Fair Payout DrawsBuild a ledger app for informal committees (ROSCAs, also called BCs) where every payment entry is signed and hash-chained, so the organiser cannot quietly edit history, and the monthly payout order is decided by a commit-reveal draw that any member can verify. The app never holds money; it records it. The project combines applied cryptography, offline-first sync and a real social problem.
- QuestionHow do I choose between frontend, backend, mobile, cloud, cybersecurity, data and AI without trying them all for years?Do not try to pick the best field; pick the one whose daily problems you can tolerate on a bad day. Run a short, cheap experiment in two or three candidates, compare what you enjoyed doing rather than what sounded exciting, check the local job market, and commit for six to nine months.
See 8 moreShow fewer
- QuestionHow do I learn Git and GitHub properly instead of just copying commands?Learn the model first: commits are snapshots, branches are pointers, and remotes are copies. Then use Git daily on your own projects, practise a team workflow with branches and pull requests, and break things on purpose, such as merge conflicts, so you learn to recover calmly.
- QuestionHow do I build a developer portfolio as a beginner with nothing to show?Start with two or three small but complete projects that solve a real problem, each with a clear README, screenshots and a live link or easy run steps. Put them on a simple one-page site or a tidy GitHub profile. Depth and finish matter far more than the number of projects or a fancy design.
- QuestionWhich final year project will actually help me get a job?Pick an FYP that matches the role you want, solves a real problem for a real user, uses the tools that role uses, and that your group can finish and deploy. A modest idea done properly, with clean code, tests and a clear demo, helps far more in interviews than an ambitious idea that never fully works.
- Resource· GuideFlutter DocumentationThe official Flutter documentation: installation, a learning path, the widget catalogue, layout and state management guides, networking and persistence, architecture and testing, platform integration for Android, iOS, web and desktop, deployment and newer AI features. It is well organised and the best place to learn Flutter's widget model properly. Learn a little Dart first, and expect to make your own state management choice, since the docs present options rather than one answer.
- Resource· GuideDart Language TourThe official overview of the Dart language on dart.dev: variables, null safety, operators, functions, classes, mixins, enums, generics, records and patterns, and asynchronous code with futures, streams and isolates. Anyone learning Flutter should skim it first, since most early Flutter confusion is really Dart confusion. It assumes you already program in another language and is concise rather than hand-holding.
- Resource· GuideFirebase DocumentationThe official guides for Firebase, Google's app development platform and the backend many student mobile and web apps start on. It covers Authentication, Cloud Firestore and Realtime Database, Cloud Storage, Cloud Functions, Hosting, Cloud Messaging for push notifications, Crashlytics, Analytics and newer AI features, with setup for Android, iOS, web and Flutter. The docs are free; services have a free tier and pay-as-you-go usage beyond it.
- Resource· GuideOWASP Mobile Application Security (MASVS and MASTG)OWASP's mobile security project for Android and iOS. The MASVS standard defines what a secure app must do across storage, cryptography, authentication, networking, platform interaction, code, resilience and privacy, and the MASTG testing guide shows how to check each on a real device. Use it to decide where tokens and personal data may live, and as a security checklist before release.
- Resource· GuideGitHub Actions DocumentationThe official documentation for GitHub Actions, GitHub's built in CI/CD and automation system: workflow syntax, triggers, runners, caching, artifacts, environments, secrets and OpenID Connect deployments to AWS, Azure and Google Cloud. Actions is free for public repositories on standard runners, so it is the CI tool most students and open source projects learn first. It suits developers setting up tests and deployments for the first time.
Checked against 18 official sources, October 2026. If something has changed, the docs win.Show sourcesHide sources
- flutter create templates (stable branch)
- Flutter: Guide to app architecture
- Flutter: Internationalizing apps
- Flutter: Set up flavors (Android)
- Flutter: Testing overview (unit, widget, integration)
- Flutter: Integration testing
- Flutter: Profile performance with integration tests
- Flutter: Accessibility testing
- Flutter: Obfuscating Dart code
- Flutter: Continuous delivery with fastlane
- Flutter: Build and release an Android app
- Flutter: Swift Package Manager for app developers
- Dart: Pub workspaces
- Melos documentation
- Riverpod documentation
- go_router on pub.dev
- Firebase Crashlytics for Flutter
- OWASP Mobile Application Security
Best practices and checklists for this stack
Picked from the other libraries by shared topics.
Best practices
See all- React Native Best PracticesReact Native best practices for 2026: Expo and the New Architecture, fast lists, smooth animations, safe storage, deep links, accessibility and release builds.
- Flutter Best PracticesFlutter best practices for 2026: sound null safety, cheap build methods, layered architecture, smooth frames, go_router, accessibility, testing and safe releases.
- Software Testing Best PracticesTesting best practices for unit, integration and end-to-end tests: test design, test doubles, flaky tests, coverage and fast CI, with examples in TypeScript and Python.
Checklists
See all- App Store and Google Play Launch ChecklistLaunch a mobile app on the App Store and Google Play: accounts, build rules, review guidelines, privacy labels, Data safety, listing, in-app purchases, testing, crashes and staged rollout.
- Mobile App Security ChecklistCheck an Android or iOS app against OWASP MASVS: data storage, network security, authentication, platform interaction, code quality, resilience and privacy.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com