Skip to content

Beta 0.0.1 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
ec84bac
Add .whitesource configuration file
mend-bolt-for-github[bot] Nov 20, 2024
c53e119
Create dependabot.yml
jaybuidl Nov 20, 2024
4016c3b
Create codeql.yml
jaybuidl Nov 20, 2024
321cceb
Update .whitesource
jaybuidl Nov 20, 2024
6e16d28
Merge pull request #1 from kleros/whitesource/configure
jaybuidl Nov 20, 2024
c683c4f
Update README.md
jaybuidl Nov 20, 2024
0813134
chore: add husky checks
alcercu Nov 21, 2024
9ae87ed
chore: init repository
alcercu Nov 21, 2024
9027c7c
chore: move package into root directory
alcercu Nov 21, 2024
d9477fa
chore(deps): bump actions/checkout from 3.5.2 to 4.2.2
dependabot[bot] Nov 25, 2024
13a88fa
feat: add internationalization package
alcercu Nov 25, 2024
ba6871d
feat: modify middleware to avoid hardcoding locales
alcercu Nov 25, 2024
642a9c7
Update README.md
jaybuidl Nov 25, 2024
0df5ed1
feat: add navigate page
alcercu Nov 25, 2024
47a352a
feat: add case page
alcercu Nov 26, 2024
03c01be
chore: fix .eslint
alcercu Nov 26, 2024
b6161b6
chore: switch eslint for biome
alcercu Nov 28, 2024
a17d4c1
feat: add fetching routes
alcercu Nov 29, 2024
154c208
feat: add evidence endpoint
alcercu Dec 2, 2024
17ca8d1
fix: improve fetched data and add missing functionality
alcercu Dec 2, 2024
2ae53c8
fix: limit main width
alcercu Dec 2, 2024
2bc04a9
feat: add arabic locale
alcercu Dec 3, 2024
62d6ce4
feat: improve landing page and change font
alcercu Dec 3, 2024
213444f
feat: add basic error fallback
alcercu Dec 3, 2024
3d7b7d6
feat: change favicon
alcercu Dec 3, 2024
8e8fa39
chore: update lintstaged
alcercu Dec 3, 2024
4a38706
fix: vote is undefined if the juror didn't vote
alcercu Dec 4, 2024
1b147ad
fix: add viem peer dependency
alcercu Dec 4, 2024
99f71a2
fix: add divide-x-reverse to answers when the langDir is rtl
alcercu Dec 4, 2024
b7a17d7
feat: add loading page
alcercu Dec 4, 2024
7356709
chore: fix node and yarn versions
alcercu Dec 9, 2024
3700e6a
chore(deps): bump class-variance-authority from 0.7.0 to 0.7.1
dependabot[bot] Dec 9, 2024
f794300
chore: update kleros logo
alcercu Dec 11, 2024
2d19204
chore(deps): bump next-intl from 3.25.1 to 3.26.3
dependabot[bot] Dec 23, 2024
075ade6
chore: update kleros-sdk
alcercu Jan 14, 2025
0f3ee17
fix: force get routes to be dynamic
alcercu Jan 14, 2025
e107f49
chore(deps-dev): bump typescript from 5.6.3 to 5.7.3
dependabot[bot] Jan 14, 2025
4f84ed9
chore(deps): bump github/codeql-action from 2.22.0 to 3.28.9
dependabot[bot] Feb 10, 2025
bdd3a40
chore(deps-dev): bump @types/node from 20.17.6 to 22.13.4
dependabot[bot] Feb 17, 2025
5f9d233
chore(deps): bump @kleros/kleros-sdk from 2.1.10 to 2.2.0
dependabot[bot] Feb 17, 2025
b94ce18
chore(deps): bump viem from 2.21.53 to 2.23.2
dependabot[bot] Feb 17, 2025
dab9a7c
chore(deps): bump lucide-react from 0.460.0 to 0.475.0
dependabot[bot] Feb 17, 2025
6dad44b
chore(deps): bump step-security/harden-runner from 2.6.0 to 2.11.0
dependabot[bot] Feb 17, 2025
7fb8e50
Fix: Set urql client requestPolicy to network-only to prevent stale data
google-labs-jules[bot] May 21, 2025
0bf4604
fix: place the network-only option in the right place
alcercu May 21, 2025
dbc2826
Merge pull request #76 from kleros/fix/urql-cache-stale-data
alcercu May 21, 2025
44490db
Merge pull request #8 from kleros/dependabot/github_actions/dev/actio…
alcercu May 21, 2025
bbf7e6b
Merge pull request #16 from kleros/dependabot/npm_and_yarn/dev/class-…
alcercu May 21, 2025
b1c8a4d
Merge pull request #45 from kleros/dependabot/npm_and_yarn/dev/typesc…
alcercu May 21, 2025
5f9ae2c
Merge pull request #37 from kleros/dependabot/npm_and_yarn/dev/next-i…
alcercu May 21, 2025
3f451b4
Merge pull request #67 from kleros/dependabot/github_actions/dev/gith…
alcercu May 21, 2025
2631f4c
Merge pull request #69 from kleros/dependabot/npm_and_yarn/dev/types/…
alcercu May 21, 2025
1f4fb7c
chore: update kleros-sdk
alcercu May 21, 2025
ea765a9
fix: account for refuse to arbitrate being returned by the sdk now
alcercu May 21, 2025
d6434aa
fix: dispute 51 answers
alcercu May 21, 2025
70f19ba
Merge pull request #70 from kleros/dependabot/npm_and_yarn/dev/kleros…
alcercu May 21, 2025
b2c9422
Merge pull request #74 from kleros/dependabot/github_actions/dev/step…
alcercu May 22, 2025
b4f96ac
Merge pull request #72 from kleros/dependabot/npm_and_yarn/dev/viem-2…
alcercu May 22, 2025
c39deab
Merge pull request #73 from kleros/dependabot/npm_and_yarn/dev/lucide…
alcercu May 22, 2025
edf60d5
chore: update nextjs
alcercu May 22, 2025
fb94edb
Merge pull request #78 from kleros/chore/update-nextjs
alcercu May 22, 2025
527c970
Conditionally render Attachment link in Evidence component
google-labs-jules[bot] May 23, 2025
467e0ed
I've refactored the Evidence component for IPFS validation and line l…
google-labs-jules[bot] May 23, 2025
220a558
chore: fix tabulation
alcercu May 23, 2025
3639f73
Merge pull request #80 from kleros/feat/conditional-attachment-link
alcercu May 23, 2025
9e005a7
chore: update nextjs
alcercu Jun 4, 2025
9435500
Merge pull request #97 from kleros/chore/update-nextjs
alcercu Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*]
root = true
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80
3 changes: 3 additions & 0 deletions .env.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CORE_SUBGRAPH=
DTR_ARBITRUM_SUBGRAPH=
THEGRAPH_API_KEY=
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: npm
directory: /
target-branch: dev
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependencies
assignees:
- jaybuidl

- package-ecosystem: github-actions
directory: /
target-branch: dev
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependencies
assignees:
- jaybuidl
- alcercu
79 changes: 79 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "CodeQL Advanced"

on:
merge_group:
branches:
- master
- dev
push:
branches:
- master
- dev
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- dev
schedule:
- cron: '26 1 * * 6'

permissions:
actions: read

jobs:
codeql-advanced-analysis:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- javascript

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
category: "/language:${{matrix.language}}"
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn tsc
yarn lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"(*.ts|*.tsx)": "biome check --write"
}
23 changes: 23 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"scanSettings": {
"baseBranches": ["dev", "master"]
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "MEDIUM",
"issueType": "DEPENDENCY",
"customLabels": ["Type: Security🛡️", "dependencies"],
"assignees": ["jaybuidl"]
},
"remediateSettings": {
"workflowRules": {
"enabled": true,
"minVulnerabilityScore": 3,
"maxVulnerabilityScore": 10
}
}
}
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# library-of-justice
<p align="center">
<img alt="Kleros" src="https://cdn.kleros.link/ipfs/QmYw4ZPb5xjLDGStRMY1SqKu8tJRVquuB933oGZE3gRZd7" width="1024">
</p>

# Library of Justice
The Kleros Library of Justice, a frontend to access the historical records of arbitration.

## Getting Started

This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
129 changes: 129 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": {
"ignoreUnknown": false,
"ignore": ["src/components/ui/**/*", ".next/**/*"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"useEditorconfig": true,
"lineWidth": 80
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": {
"noAriaUnsupportedElements": "warn",
"noBlankTarget": "off",
"useAltText": "warn",
"useAriaPropsForRole": "warn",
"useValidAriaProps": "warn",
"useValidAriaValues": "warn"
},
"complexity": {
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error"
},
"correctness": {
"noChildrenProp": "error",
"noUnusedVariables": "off",
"useArrayLiterals": "off",
"useExhaustiveDependencies": "warn",
"useHookAtTopLevel": "error",
"useJsxKeyInIterable": "error"
},
"security": { "noDangerouslySetInnerHtmlWithChildren": "error" },
"style": { "noNamespace": "error", "useAsConstAssertion": "error" },
"suspicious": {
"noCommentText": "error",
"noConsole": {
"level": "error",
"options": { "allow": ["warn", "error", "info", "debug"] }
},
"noDuplicateJsxProps": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error"
}
}
},
"javascript": { "formatter": { "quoteStyle": "double" } },
"overrides": [
{ "include": ["**/*.ts?(x)"] },
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
"linter": {
"rules": {
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off",
"noInvalidConstructorSuper": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noClassAssign": "off",
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
},
{ "include": ["**/*.ts?(x)"] },
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
"linter": {
"rules": {
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off",
"noInvalidConstructorSuper": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noClassAssign": "off",
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
}
]
}
21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
Loading
Loading