Skip to content
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

Beta 0.0.1 #17

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 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
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
f794300
chore: update kleros logo
alcercu Dec 11, 2024
075ade6
chore: update kleros-sdk
alcercu Jan 14, 2025
0f3ee17
fix: force get routes to be dynamic
alcercu Jan 14, 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@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
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@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0

# ℹ️ 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@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
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