Skip to content

Commit c09c56b

Browse files
committed
initial commit
0 parents  commit c09c56b

24 files changed

+2743
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests and Checks
2+
3+
on: [push]
4+
5+
jobs:
6+
typecheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: pnpm/action-setup@v3
11+
with:
12+
version: 9
13+
14+
- name: Install dependencies
15+
run: pnpm install --frozen-lockfile
16+
- name: Generate Prisma Client
17+
run: cd apps/server && pnpm prisma generate
18+
- name: Typecheck
19+
run: pnpm ts:check
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: pnpm/action-setup@v3
25+
with:
26+
version: 9
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
- name: Linting
30+
run: pnpm lint
31+
test:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: pnpm/action-setup@v3
36+
with:
37+
version: 9
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
- name: Test
41+
run: pnpm test

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
dist
2+
build
3+
output
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# Dependency directories
27+
node_modules/
28+
29+
# TypeScript v1 declaration files
30+
typings/
31+
32+
# TypeScript cache
33+
*.tsbuildinfo
34+
35+
# Optional eslint cache
36+
.eslintcache
37+
38+
# Optional REPL history
39+
.node_repl_history
40+
41+
# Yarn Integrity file
42+
.yarn-integrity
43+
44+
# dotenv environment variables file
45+
.env
46+
.env.test
47+
48+
# parcel-bundler cache (https://parceljs.org/)
49+
.cache
50+
51+
# Next.js build output
52+
.next

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Graph Framework
2+
3+
## Development
4+
5+
### Setup
6+
7+
```sh
8+
pnpm install
9+
```
10+
11+
### Development
12+
13+
```sh
14+
# in another tab
15+
cd apps/events
16+
pnpm dev
17+
```
18+
19+
## Upgrading Dependencies
20+
21+
```sh
22+
pnpm up --interactive
23+
cd apps/events
24+
pnpm up --interactive
25+
```

apps/events/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

apps/events/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13+
14+
- Configure the top-level `parserOptions` property like this:
15+
16+
```js
17+
export default tseslint.config({
18+
languageOptions: {
19+
// other options...
20+
parserOptions: {
21+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
22+
tsconfigRootDir: import.meta.dirname,
23+
},
24+
},
25+
})
26+
```
27+
28+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
30+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31+
32+
```js
33+
// eslint.config.js
34+
import react from 'eslint-plugin-react'
35+
36+
export default tseslint.config({
37+
// Set the react version
38+
settings: { react: { version: '18.3' } },
39+
plugins: {
40+
// Add the react plugin
41+
react,
42+
},
43+
rules: {
44+
// other rules...
45+
// Enable its recommended rules
46+
...react.configs.recommended.rules,
47+
...react.configs['jsx-runtime'].rules,
48+
},
49+
})
50+
```

apps/events/eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
},
28+
)

apps/events/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

apps/events/package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "events",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview",
11+
"test": "vitest run",
12+
"ts:check": "tsc --noEmit"
13+
},
14+
"dependencies": {
15+
"react": "^18.3.1",
16+
"react-dom": "^18.3.1",
17+
"graph-framework": "workspace:*"
18+
},
19+
"devDependencies": {
20+
"@eslint/js": "^9.9.0",
21+
"@types/react": "^18.3.3",
22+
"@types/react-dom": "^18.3.0",
23+
"@vitejs/plugin-react": "^4.3.1",
24+
"eslint": "^9.9.0",
25+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
26+
"eslint-plugin-react-refresh": "^0.4.9",
27+
"globals": "^15.9.0",
28+
"typescript": "^5.5.3",
29+
"typescript-eslint": "^8.0.1",
30+
"vite": "^5.4.1",
31+
"vitest": "^2.1.1"
32+
}
33+
}

apps/events/public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/events/src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { hello } from "graph-framework";
2+
3+
export function App() {
4+
return (
5+
<>
6+
<p>{hello()}</p>
7+
</>
8+
);
9+
}

0 commit comments

Comments
 (0)