A full-stack application consisting of a Flutter mobile app (client) and a Node.js backend server with Express, TypeScript, and MongoDB.
jegoli/
├── client/ # Flutter mobile app
│ ├── lib/
│ │ ├── models/ # Data models
│ │ ├── views/ # UI screens (formerly screens/)
│ │ ├── controllers/ # Business logic and state management
│ │ ├── services/ # API services and external integrations
│ │ ├── utils/ # Helper functions and utilities (formerly common/)
│ │ ├── widgets/ # Reusable UI components (formerly co_widget/)
│ │ └── main.dart # App entry point
│ ├── assets/ # Images, fonts, and other assets
│ ├── test/ # Unit and widget tests
│ ├── android/ # Android-specific files
│ ├── ios/ # iOS-specific files
│ ├── pubspec.yaml # Flutter dependencies
│ └── README.md # Client-specific documentation
├── backend/ # Node.js server
│ ├── src/
│ │ ├── models/ # MongoDB schemas
│ │ ├── views/ # Templates or views (if applicable)
│ │ ├── controllers/ # Route handlers
│ │ ├── routes/ # Route definitions
│ │ ├── middlewares/ # Express middlewares
│ │ ├── config/ # Configuration files
│ │ └── utils/ # Helper functions
│ ├── tests/ # Unit and integration tests
│ ├── docs/ # API documentation
│ ├── assets/ # Static assets
│ ├── package.json # Node.js dependencies
│ ├── tsconfig.json # TypeScript configuration
│ └── .env.example # Environment variables template
├── docs/ # Project documentation
├── scripts/ # Build and deployment scripts
├── .gitignore # Git ignore rules
└── README.md # This file
Both the client and backend follow the MVC (Model-View-Controller) pattern for better separation of concerns and scalability.
- Models: Represent data structures and business logic.
- Views: UI components and screens.
- Controllers: Manage state and handle user interactions.
- Models: Database schemas and data models.
- Views: Response templates (for API, this may be minimal).
- Controllers: Handle HTTP requests and responses.
- Routes: Define API endpoints.
- Middlewares: Authentication, validation, etc.
- Config: Database and app configuration.
- Utils: Shared utilities.
- Flutter SDK
- Node.js and npm
- MongoDB
- Clone the repository.
- For the client: Navigate to
client/and runflutter pub get. - For the backend: Navigate to
backend/, runnpm install, and set up your.envfile based on.env.example.
- Client:
flutter run - Backend:
npm run dev
Please follow the established folder structure and MVC pattern when adding new features.