Blog / Engineering · 7 min read ·
Capstone folder structure for Laravel, Next.js and Flutter
Sample folder trees for Laravel, Next.js and Flutter capstones, a /docs folder for chapters and diagrams, and naming conventions your team can share.
A messy project folder costs time every day: files that cannot be found, three copies of the same chapter, and a teammate who cannot run the system because nobody knows which folder is current. A clear structure, agreed on in the first week, prevents most of that.
This guide shows practical folder trees for three common capstone stacks, a documentation folder for your manuscript and diagrams, and naming conventions your team can adopt as written.
Principles before folders
- Follow the framework's defaults. Laravel, Next.js and Flutter each generate a standard structure. Keep it. Other developers, tutorials and your panel will expect it.
- One repository, one source of truth. Code and capstone documents live in the same repository, so the version you defend is the version on record.
- Group by feature when the project grows. Inside the framework's folders, keep files for one module (billing, enrolment, queue) close together.
- Name consistently. Pick a convention per file type and never mix them.
- Never store generated or secret files. Dependencies, build output, and
.envfiles stay out of the repository.
Structure is also something the panel notices. When a panelist asks to see where the billing rules or the enrolment validation live, a team that can open the right file in a few seconds shows ownership of the code. A team that searches through folders named new, backup, and final shows the opposite.
Laravel (PHP) web system
Laravel is a common choice for web-based capstones such as enrolment or water billing systems. The tree below is the default Laravel structure with a few capstone-specific additions. Only the folders you will touch often are expanded.
water-billing/
├── app/
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── ConsumerController.php
│ │ │ ├── MeterReadingController.php
│ │ │ └── BillController.php
│ │ ├── Middleware/
│ │ └── Requests/
│ │ └── StoreMeterReadingRequest.php
│ ├── Models/
│ │ ├── Consumer.php
│ │ ├── MeterReading.php
│ │ └── Bill.php
│ ├── Policies/
│ │ └── BillPolicy.php
│ └── Services/
│ └── BillCalculator.php
├── config/
├── database/
│ ├── factories/
│ ├── migrations/
│ │ └── 2026_08_01_000000_create_consumers_table.php
│ └── seeders/
│ └── DemoDataSeeder.php
├── public/
├── resources/
│ ├── css/
│ ├── js/
│ └── views/
│ ├── layouts/
│ ├── consumers/
│ └── bills/
├── routes/
│ └── web.php
├── storage/
├── tests/
│ ├── Feature/
│ │ └── BillComputationTest.php
│ └── Unit/
├── docs/
├── .env.example
├── composer.json
└── README.mdKeep controllers thin. Business rules such as tiered water rates or minimum charges belong in a service class like BillCalculator.php, where they are easier to test and easier to explain during the defense. Put validation in Form Request classes under app/Http/Requests and authorisation in Policies, so each rule has one obvious home.
Next.js (React) web system
Next.js with the App Router uses folders inside app/ as URL routes. Keep route folders for pages, and put shared components and logic outside app/ so route folders stay small. The tree below shows a school enrolment system.
enrolment-system/
├── app/
│ ├── layout.tsx
│ ├── page.tsx
│ ├── login/
│ │ └── page.tsx
│ ├── students/
│ │ ├── page.tsx
│ │ └── [id]/
│ │ └── page.tsx
│ ├── enrolment/
│ │ └── page.tsx
│ └── api/
│ └── students/
│ └── route.ts
├── components/
│ ├── ui/
│ │ ├── Button.tsx
│ │ └── TextField.tsx
│ └── enrolment/
│ ├── SubjectPicker.tsx
│ └── AssessmentSummary.tsx
├── lib/
│ ├── db.ts
│ ├── auth.ts
│ └── fees.ts
├── public/
│ └── school-logo.png
├── tests/
│ └── fees.test.ts
├── docs/
├── .env.example
├── package.json
├── tsconfig.json
└── README.mdGeneric, reusable pieces go in components/ui. Components used by one feature go in a folder named after that feature. Logic that is not about display, such as computing tuition and miscellaneous fees, goes in lib/ as plain functions that you can test without a browser.
Flutter mobile app
Flutter generates platform folders (android/, ios/, and others) that you rarely edit. Your work happens in lib/. For a capstone-sized app, a feature-first layout keeps each module's screens, widgets, and data code together.
clinic_queue/
├── android/
├── ios/
├── assets/
│ ├── images/
│ └── fonts/
├── lib/
│ ├── main.dart
│ ├── app.dart
│ ├── core/
│ │ ├── theme.dart
│ │ ├── constants.dart
│ │ └── api_client.dart
│ ├── features/
│ │ ├── auth/
│ │ │ ├── login_screen.dart
│ │ │ └── auth_service.dart
│ │ ├── queue/
│ │ │ ├── queue_screen.dart
│ │ │ ├── queue_ticket_card.dart
│ │ │ ├── queue_model.dart
│ │ │ └── queue_repository.dart
│ │ └── appointments/
│ └── shared/
│ └── widgets/
│ └── primary_button.dart
├── test/
│ └── queue_model_test.dart
├── docs/
├── pubspec.yaml
└── README.mdDart file names use snake_case, while class names inside them use PascalCase, so queue_ticket_card.dart contains QueueTicketCard. Declare every image and font under assets/ in pubspec.yaml, or the app will not find them at runtime.
Web plus mobile in one repository
If your system has both a web admin panel and a mobile app, for example a barangay records system with an admin site for the secretary and an app for residents, put each in its own top-level folder such as web/ and mobile/, with one shared docs/ folder at the root. Each folder keeps its own framework structure and README.
The /docs folder for capstone documents
Your manuscript, diagrams, and meeting records deserve the same care as your code. Keeping them in docs/ inside the repository means they are versioned, backed up, and linked to the code they describe. Check your school's rules on where the official manuscript must be submitted; the repository copy is for the team's working versions.
docs/
├── manuscript/
│ ├── chapter-1-introduction.docx
│ ├── chapter-2-review-of-related-literature.docx
│ ├── chapter-3-methodology.docx
│ ├── chapter-4-results-and-discussion.docx
│ ├── chapter-5-conclusions-and-recommendations.docx
│ └── references.md
├── diagrams/
│ ├── erd.drawio
│ ├── erd.png
│ ├── dfd-context.drawio
│ ├── dfd-level-0.drawio
│ ├── use-case.drawio
│ └── system-architecture.drawio
├── wireframes/
│ └── 2026-08-20-enrolment-flow.pdf
├── research/
│ ├── interview-guide.md
│ ├── survey-questionnaire.pdf
│ └── consent-form-template.docx
├── minutes/
│ ├── 2026-08-05-adviser-meeting.md
│ └── 2026-08-19-client-meeting.md
├── testing/
│ ├── test-cases.xlsx
│ └── uat-results-summary.md
└── defense/
├── proposal-defense-slides.pptx
└── panel-revisions.mdSave diagrams in their editable source format (such as .drawio) next to the exported image. When the panel asks for a revision, you edit the source rather than redrawing from a screenshot. Keep a panel-revisions.md file listing every comment from each defense and how you addressed it; it makes the revision summary easy to prepare.
Naming conventions
Agree on these in your first meeting and write them in the README. Consistency matters more than which convention you choose, but following each language's standard style avoids arguments and matches what tutorials show.
| Item | Convention | Example |
|---|---|---|
| Laravel models and controllers | PascalCase, singular model | Consumer.php, BillController.php |
| Database tables | snake_case, plural | consumers, meter_readings |
| Database columns | snake_case | account_number, reading_date |
| Laravel Blade views | kebab-case | bills/show-statement.blade.php |
| React components | PascalCase | SubjectPicker.tsx |
| JavaScript and TypeScript utilities | kebab-case or camelCase, pick one | fees.ts, date-utils.ts |
| Dart files | snake_case | queue_ticket_card.dart |
| Manuscript files | kebab-case with chapter number | chapter-3-methodology.docx |
| Meeting minutes and dated files | Date first, ISO format | 2026-08-19-client-meeting.md |
| Branches | type/short-description | feature/meter-reading-form |
Avoid spaces, special characters, and version words in file names. Chapter 3 FINAL (2) revised.docx tells nobody which file is current. Git tracks versions for you; the current file in main is the latest.
Week-one checklist
- 01
Generate the project with the official tool
Use the framework's own installer so you start from the standard structure.
- 02
Add .gitignore and .env.example
Before the first commit, so secrets and dependencies never enter the repository.
- 03
Create the docs folder
Add the subfolders above, even if they are empty for now, with a short README in each explaining what goes there.
- 04
Write conventions into the README
Copy the naming table into your README and adjust it to your stack.
- 05
Review the structure with your adviser
Agree early, before dozens of files make reorganising painful.
Next step
Work through the week-one checklist above before anyone writes a feature. Create the folders, add the /docs folder and push the empty structure as your first commit. The Git and GitHub guide shows how to set up the repository for your team.