This project serves as the frontend for the LogId platform, a decentralized identity-on-chain solution.
- React + TypeScript with Vite
- State management with Zustand
- Data fetching with Axios and React Query
- UI components powered by Material-UI
- Integration with Ethereum Attestation Service (EAS)
- Blockchain interaction via wagmi and viem
- TailwindCSS for styling
- Testing setup with Vitest and Testing Library
To set up environment variables:
-
Copy the Example File:
Run:cp .env.example .env.local
-
Update Variables:
Replace placeholders in.env.local
with actual values.
Note: Do not commit
.env.local
to version control; use.env.example
to document new variables.
-
Clone the repository:
git clone https://github.com/TogetherCrew/identity-on-chain-platform.git cd identity-on-chain-platform
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
pnpm dev
: Start the development server.pnpm build
: Build the production-ready app.pnpm preview
: Preview the production build.pnpm lint
: Run ESLint and Prettier.pnpm lint:fix
: Automatically fix lint errors.pnpm test
: Run the tests.pnpm coverage
: Generate test coverage reports.pnpm format
: Format the code using Prettier.
If you are developing a production application, we recommend updating the ESLint configuration to enable type-aware lint rules:
-
Configure the top-level
parserOptions
property like this:export default { parserOptions: { ecmaVersion: 'latest', sourceType: 'module', project: ['./tsconfig.json', './tsconfig.node.json'], tsconfigRootDir: __dirname, }, };
-
Replace
plugin:@typescript-eslint/recommended
withplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
. -
Optionally add
plugin:@typescript-eslint/stylistic-type-checked
. -
Install
eslint-plugin-react
and addplugin:react/recommended
andplugin:react/jsx-runtime
to theextends
list.
Key dependencies:
@mui/material
: UI components library.@tanstack/react-query
: Data fetching and state management.zustand
: Lightweight state management.ethers
: Ethereum interaction library.wagmi
: React hooks for Web3.viem
: Ethereum client.tailwindcss
: Utility-first CSS framework.vitest
: Blazing fast unit testing framework.
- Follow the installation steps to set up your local environment.
- Use
pnpm dev
to start the development server. - Write and test your code with Vitest and Testing Library.
- Run
pnpm lint
to ensure code quality. - Build for production using
pnpm build
.
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes.
- Run tests and linting to ensure everything works:
pnpm test pnpm lint
- Commit and push your changes.
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
For more details about the maintainability and test coverage, refer to the badges at the top of this README.