Last updated: May 27, 2024
Giga is a UNICEF-ITU initiative to connect every school to the Internet and every young person to information, opportunity and choice. Giga maps schools’ Internet access in real time, creates models for innovative financing, and supports governments contracting for connectivity.
In order to run the project, you need to install the following:
- Clone the repository:
git clone https://github.com/unicef/project-connect-nagarro-fe
- Install dependencies:
yarn install
- Start the development server:
yarn start
- Open http://localhost:9500 to view the app in the browser.
- API_MAPBOX_ACCESS_TOKEN: (required) Token for map interaction.
- API_BASE_URL: (required) API backend URL.
- B2C_CLIENT_ID: (required) Client ID for login.
- ENV: (optional, default: development) Current environment variable.
- MATOMO_SITE_ID: (optional) Analytics site ID.
GigaMaps is built using the following technologies:
-
TypeScript: a statically typed superset of JavaScript that adds optional types and other useful features.
-
Effector: a library for managing application state in React applications.
-
Carbon UI library: a UI component library that provides a set of reusable UI components for building web applications.
-
React: a JavaScript library for building user interfaces.
-
Babel: a tool for compiling modern JavaScript code to ensure compatibility with older browsers.
-
Webpack: a module bundler that packages the code into a single file that can be run in the browser.
-
SCSS: a preprocessor scripting language that adds special features to CSS.
-
Styled Components: a library for styling components using JavaScript.
-
ESLint: a tool for identifying and reporting on patterns found in JavaScript code.
-
Stylelint: a tool for identifying and reporting on patterns found in CSS code.
-
Prettier: a tool for formatting code to ensure consistent style.
-
Jest: a testing framework for JavaScript.
-
React Testing Library: a library for testing React components using user-centric test patterns.
src/
: contains the source codeassets/
: static assets such as images, icons, etc.@/
: directory with application custom components;api/
directory with all application endpoints and request functions, also contains a file with all responces types;lib/
directory contains custom libraries implementations, helpers and utils;core/
directory with application main elements;utils/
: utility functionsApp.tsx
: main app componentindex.tsx
: entry point
In the root directory of the application, you will find the configuration files for the development and build process. These include configuration files for code linting, the Jest configuration for the UI testing tool, and files for deployment with Docker. The source code is located in the src/
directory. The webpack/
directory contains the environment configuration and webpack configuration files.
Additionally, the jest.config.js
file is used to configure Jest for UI testing. It specifies the test environment, the test files to be run, and the module name mapping.
yarn start
: starts the development serveryarn build
: Builds the app for productionyarn build-info
: Opens bundle analyzer in browseryarn qa
: Runs code quality toolsyarn fix
: Fix linting errorsyarn lint
: Runs lintersyarn eslint
: Runs ESLintyarn stylelint
: Runs Stylelintyarn ts
: Runs TypeScript checksyarn ts-files
: Lists TypeScript filesyarn ts-coverage
: Shows TypeScript coverageyarn codestyle
: Checks code style with prettieryarn format
: Formats files with prettieryarn test
: Launches the test runneryarn test-silent
: Launches the test runner and shows errors onlyyarn test-coverage
: Shows test coverage
@azure/msal-browser
: Azure AD authentication library@azure/msal-react
: Azure AD authentication library for React@carbon/charts
: charting library@carbon/icons-react
: icon libraryclsx
: utility for constructing class nameseffector
: state management librarymapbox-gl
: map libraryreact
: React libraryreact-dom
: React DOM libraryreact-perfect-scrollbar
: perfect scrollbar librarystyled-components
: styling librarywebfontloader
: web font loader library- ...etc
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the UNICEF's license.