This project was generated with Angular CLI version 17.3.7.
Before you begin, make sure you have the following installed:
- Node.js (LTS version recommended)
- Angular CLI
- Hardhat
- MetaMask extension for your browser
Follow these steps to set up and run the project:
git clone <repository-url>
cd <repository-directory>npm install-
Compile the Smart Contracts
npx hardhat compile
-
Start the Local Hardhat Node
npx hardhat node
-
Deploy the Smart Contract
npx hardhat ignition deploy ignition/modules/Tracking.js --network localhost
- Copy the contract address displayed in the console after deployment.
- Update the
src/environments/environment.tsfile with the new contract address:
export const environment = { production: false, contractAddress: '0xYourContractAddress' };
ng serveNavigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
The project follows a modular structure. Key directories and files include:
src/app: Contains the main application code.src/environments: Environment configuration files.scripts: Deployment scripts for Hardhat.artifacts: Compiled contract artifacts.
Run ng generate component component-name to generate a new component. You can also use:
ng generate directiveng generate pipeng generate serviceng generate classng generate guardng generate interfaceng generate enumng generate module
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
- Architecture : Architecture
- Setup Guide : Setup Guide
- Learning Guide : Learning Guide
- Development Flow : Development Flow
For more help on the Angular CLI, use ng help or check out the Angular CLI Overview and Command Reference page.