Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
76 changes: 76 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Deploy Documentation

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
name: Build Documentation
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup pnpm
uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c # v4
with:
version: 10.24.0

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.17.x"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm run build

- name: Build website
run: |
cd apps/website
pnpm build
env:
NODE_ENV: production
# Ensure API docs are generated before build

- name: Upload build artifacts
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: apps/website/build

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-22.04

# Only deploy on main branch
if: github.ref == 'refs/heads/main'

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
dist
build
apps/website/docs/api/**
apps/website/.docusaurus/**
2 changes: 1 addition & 1 deletion apps/backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
}
78 changes: 45 additions & 33 deletions apps/frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,85 @@
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettier from 'eslint-plugin-prettier';
import tsdoc from 'eslint-plugin-tsdoc';
import path from "node:path";
import { fileURLToPath } from "node:url";

import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import typescript from "@typescript-eslint/eslint-plugin";
import typescriptParser from "@typescript-eslint/parser";
import prettier from "eslint-plugin-prettier";
import react from "eslint-plugin-react";
import tsdoc from "eslint-plugin-tsdoc";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const compat = new FlatCompat({ baseDirectory: __dirname });

export default [
js.configs.recommended,
...compat.extends("next/core-web-vitals"),
{
files: ['**/*.{js,ts,tsx,jsx}'],
files: ["**/*.{js,ts,tsx,jsx}"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
globals: {
// React globals
React: 'readonly',
JSX: 'readonly',
React: "readonly",
JSX: "readonly",
// Web APIs
fetch: 'readonly',
URLSearchParams: 'readonly',
URL: 'readonly',
window: 'readonly',
document: 'readonly',
fetch: "readonly",
URLSearchParams: "readonly",
URL: "readonly",
window: "readonly",
document: "readonly",
// Node.js globals (for Next.js)
process: 'readonly',
console: 'readonly',
Buffer: 'readonly',
process: "readonly",
console: "readonly",
Buffer: "readonly",
},
},
plugins: {
'@typescript-eslint': typescript,
"@typescript-eslint": typescript,
prettier: prettier,
react: react,
tsdoc: tsdoc,
},
rules: {
...typescript.configs.recommended.rules,
'prettier/prettier': [
'error',
"prettier/prettier": [
"error",
{
singleQuote: false,
semi: true,
tabWidth: 2,
printWidth: 80,
trailingComma: 'es5',
trailingComma: "es5",
singleAttributePerLine: true,
},
],
'tsdoc/syntax': 'error',
'react/jsx-max-props-per-line': [1, { maximum: 1 }],
'react/jsx-first-prop-new-line': [1, 'multiline'],
"tsdoc/syntax": "warn",
"react/jsx-max-props-per-line": [1, { maximum: 1 }],
"react/jsx-first-prop-new-line": [1, "multiline"],
// Allow unused vars that start with underscore
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
},
{
ignores: [
'node_modules/**',
'.next/**',
'out/**',
'build/**',
'dist/**',
'coverage/**',
'*.min.js',
"node_modules/**",
".next/**",
"out/**",
"build/**",
"dist/**",
"coverage/**",
"*.min.js",
],
},
];

2 changes: 2 additions & 0 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"tailwind-merge": "^2.2.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@tailwindcss/typography": "^0.5.10",
"@types/node": "^20",
"@types/react": "^18",
Expand All @@ -35,6 +36,7 @@
"eslint-config-next": "^14.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.37.5",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.1",
Expand Down
23 changes: 23 additions & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

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

# TypeDoc generated docs (these should be regenerated on build)
/docs/api
Loading