The Nufacturing App employs a comprehensive multi-environment setup to facilitate streamlined development, rigorous testing, and seamless deployment. The environments include Local, Development, Testing, Staging, and Production. This structured setup, combined with a well-defined branching strategy and continuous integration processes, ensures robust and efficient development cycles.
- Nufacturing App
- Nufacturing App
- Purpose: Provides an isolated space for developers to work on new features and fixes.
- Setup:
- Local MongoDB
- Local Node.js API
- Local Angular App
- Branching Strategy: Developers create branches from each epic with the epic key ID in the branch name, ensuring organized and traceable changes.
- Advantages:
- Development Isolation: Prevents local changes from affecting the shared development environment.
- Fast Iteration: Quick testing and debugging on local machines speed up development cycles.
- Purpose: Integrates all individual feature branches to test their interaction.
- Setup:
- Development MongoDB
- Development API
- Branching Strategy: Development branches in API and frontend repositories.
- Advantages:
- Integration Testing: Ensures new code interacts correctly with the existing codebase.
- Continuous Integration: Utilizes GitHub Actions for automatic deployment, ensuring prompt testing of new changes.
- Collaborative Development: Shared environment helps detect integration issues early.
- Purpose: Runs a full suite of manual User Acceptance Tests to catch bugs before code reaches staging or production.
- Setup:
- Testing MongoDB
- Testing API
- Branching Strategy: Testing branches in API and frontend repositories.
- Advantages:
- Automated Testing: Ensures comprehensive testing to catch bugs and issues early.
- Quality Assurance: QA teams perform extensive manual and exploratory testing.
- Stability Verification: Tests application behavior with real-world data scenarios.
- Purpose: Simulates the production environment for final validation before deployment.
- Setup:
- Staging MongoDB
- Staging API
- Branching Strategy: Staging branches in API and frontend repositories.
- Advantages:
- Pre-Production Validation: Ensures the application is ready for production.
- User Acceptance Testing (UAT): Stakeholders and end-users validate the application.
- Deployment Rehearsal: Tests the deployment process to ensure a smooth transition to production.
- Purpose: The live environment where the application is available to end-users.
- Setup:
- Production MongoDB
- Production API
- Branching Strategy: Production branches in API and frontend repositories.
- Advantages:
- Live Environment: The final environment for end-user access.
- Performance Monitoring: Real-time monitoring of application performance and user activity.
- High Availability and Scalability: Ensures the application can handle the required load and provides uninterrupted service.
To start a development server, run the following command:
ng serve
Navigate to http://localhost:4200/
in your browser. The application will automatically reload if you change any of the source files.
To generate a new component, directive, pipe, service, class, guard, interface, enum, or module, use the following Angular CLI command:
ng generate component component-name
# or
ng generate directive|pipe|service|class|guard|interface|enum|module name
To build the project, run:
ng build
The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
To execute the unit tests via Karma, run:
ng test
To execute the end-to-end tests via a platform of your choice, first, you need to add a package that implements end-to-end testing capabilities. For example, you can use Protractor.
To add Protractor, run:
ng add @angular/pwa
Then, to execute the end-to-end tests, run:
ng e2e
To analyze and fix code style issues, run:
ng lint
This will use TSLint to lint your project's code according to the defined configuration.
To get more help on the Angular CLI, use:
ng help
For detailed documentation and further assistance, check out the Angular CLI Overview and Command Reference page.
To install the necessary dependencies, run:
npm install
To start the server, run:
npm start
The server will start on the port defined in your environment configuration.
Ensure your MongoDB instance is running and accessible. Configure your MongoDB connection string in the .env
file for different environments (development, testing, staging, production).
Swagger documentation is available for the API. To view the documentation, start the server and navigate to http://localhost:3000/api-docs
.
- Feature Branches: For new features or enhancements. Named as
feature/NFG-<issue-number>-<short-description>
. - Hotfix Branches: For urgent fixes in the production environment. Named as
hotfix/NFG-<issue-number>-<short-description>
. - Staging Branch: For pre-production testing. Named as
staging
. - Production Branch: For production deployment. Named as
main
.
Use tags for marking significant releases or milestones. For example, v1.0.0
.
- Enforce Branch Naming Policies: Using Git hooks and GitHub Actions, enforce the naming conventions for branches.
- Commit Message Pattern: Ensure commit messages follow conventional commit standards.
- Pull Requests: Require pull requests for merging into development, staging, and main branches.
By maintaining these five environments, Gallimore Software ensures a robust, reliable, and efficient development and deployment process for the Nufacturing app. This approach leads to higher quality software and improved user satisfaction, aligning with our goals of delivering innovative and customer-centric solutions.