Project Structure
A repository (aka Solution) for an insights+ module should contain the following projects:
- Front End project
- Front End tests
- Back End project
- Back End tests
- Db Up project (if it has a module-specific database)
Backend Project Folder Structure
We prefer keeping a project self-contained, rather than extracting layers into different projects. This is only a guideline, and may be ignored if necessary.
General folder structure. Sub-folders are allowed:
- BusinessLogic – Logic classes
- Configuration – Configuration Contract
- Data – Data access classes
- EntityFramework – Database Context
- Entities – The entities for the context
- EntityFramework – Database Context
- Endpoints – API endpoints if the project is a Web App.
- Exceptions – Custom exceptions
- Extensions – Extension classes
- Functions – The Azure Function classes if the project is an Azure Function app. Separate API versions.
- API
- V1, V2, etc.
- ServiceBus, Queue, Timer, etc. Based on trigger type.
- API
- Helpers – Static helper classes.
- Middleware – Middleware for project startup
- Models – Other types of objects like DTOs, enums, etc. Feel free to subfolder these items.
Frontend Project Folder Structure
InsightsPlus/
WebApp/ # Main WebApp and integration host repo.
src/
App/
Layout/
Header/
Nav/
AuthProvider/
Guards/
RemoteLoader/ # Primary MFE loading and mounting.
Shared/
main/
Home/
FileManagement/
Admin/
Login/
Logout/
Messaging/
Accessors/
DataContracts/
Hooks/
Shared/
Utilities/
vitest.config.ts
src/setupTests.ts
playwright/
e2e/
fixtures/
support/
playwright.config.ts
mfes/ # Each MFE is its own repo.
mfe-analyze/ # Reference structure (all MFEs follow this same structure).
src/
Analyze/
Accessors/
DataContracts/
Hooks/
Shared/
Utilities/
vitest.config.ts
src/setupTests.ts
playwright/
e2e/
fixtures/
support/
playwright.config.ts
mfe-products/ # Same project structure as mfe-analyze.
mfe-data-requests/ # Same project structure as mfe-analyze.
mfe-uploads/ # Same project structure as mfe-analyze.
mfe-user-profile/ # Same project structure as mfe-analyze.
mfe-certification/ # Same project structure as mfe-analyze.
Leave a Reply