This repository contains all necesary information to collect georeferenced project locations according to the Project Location Model for Development cooperation used by the KfW Development Bank.
You can find the documentation in a user-friendly format here.
The documentation specifies everything you need to know to collect data. It also contains a validator tool that can be used before sumbissions. You can find the validator tool here.
In case you need support or in case you would like to propose improvements to the model, the validator tool or the repository, feel free to create an issue or fork the repository and createa an upstream pull request.
GUI
cd frontend && npm install
npm run dev- SonarQube: for code quality
- CodeQL: for code security
- Dependabot: for dependency updates (maybe renovate-bot)
- Test-Coverage: through jest and is visible in pull-requests
- frontend: the React frontend
- model: json-schema-files
- the files are automatically copied from assets
- to make them visible for the end-user - you've to add a link in the FileValidator.tsx file
This project is built with Vite and React using TypeScript. Below are instructions to run and manage the project locally.
- Node.js (version 14 or higher)
- npm (version 6 or higher) or yarn
Ensure you have Node.js and npm installed:
node -v
npm -v- Clone the repository
git clone https://github.com/mapme-initiative/project_location_model/;
cd project_location_model;- Install dependencies
npm install
# or using yarn
yarn installTo start the development server and begin working on the project:
npm run devThis will:
- Launch Vite in development mode.
- Enable hot module replacement (HMR).
- Serve the app on
http://localhost:5173/by default.
You should see output similar to:
vite vX.X.X dev server running at:
> Local: http://localhost:5173/
> Network: use --host to expose
Open your browser and navigate to http://localhost:5173/ to view the app.
To ensure code quality and consistency, run:
npm run lintThis will use ESLint to analyze all .ts and .tsx files and enforce rules, reporting any unused disable directives and failing if there are any warnings or errors.
- Vite config:
vite.config.tscontains project-specific Vite configurations (e.g., path aliases, plugins). - TypeScript config:
tsconfig.jsonsets up TypeScript compilation options. - ESLint config:
.eslintrc.*contains linting rules and settings.
-
If you encounter port conflicts, you can specify a different port:
vite --port 3000 --mode development
-
Clear Vite cache:
rm -rf node_modules/.vite
-
For detailed error stacks, enable debug logging:
DEBUG=vite:* npm run dev
Feel free to open issues or submit pull requests. Please follow the existing coding conventions and ensure all lint checks pass.