Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DATABASE_URL=
JWT_ACCESS_SECRET=
NODE_ENV=development
PORT=3000
26 changes: 5 additions & 21 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier'
],
env: {
browser: true,
node: true,
es2021: true
},
settings: {
react: { version: 'detect' }
},
rules: {
'react/react-in-jsx-scope': 'off'
}
env: { node: true },
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {},
};
40 changes: 9 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,28 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'npm'
node-version: 18

- name: Install dependencies
run: npm install
run: npm ci

- name: Lint
run: npm run lint
continue-on-error: true

- name: Test
run: npm test

- name: Build
run: npm run build

- name: Upload Pages artifact
if: success()
uses: actions/upload-pages-artifact@v1
with:
path: dist

- name: Deploy to GitHub Pages
if: success()
uses: actions/deploy-pages@v1

- name: Deploy to Vercel
if: success() && env.VERCEL_TOKEN != ''
run: |
npx vercel deploy --prod --token $VERCEL_TOKEN --confirm
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "all"
"tabWidth": 2,
"trailingComma": "es5",
"semi": true
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,19 @@ npm install
npm run dev
```

Copy `.env.example` to `.env` and fill in the required values before starting the server.

Use `start-all.sh` to run both the Node.js backend and Streamlit interface together.

## Environment Variables

Create a `.env` file based on `.env.example` with the following:

- `DATABASE_URL`: Your Postgres connection string
- `JWT_ACCESS_SECRET`: JWT signing key
- `NODE_ENV`: `development`, `production`, or `test`
- `PORT`: Optional server port (defaults to 3000)

## Folder Structure Overview

- `client/` – React frontend powered by Vite
Expand Down
Loading
Loading