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
2 changes: 1 addition & 1 deletion .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: npm ci

- name: Lint
run: npm run quality --workspace=${{ matrix.app }}
run: npm run lint --workspace=@worksight/${{ matrix.app }}

- name: Build Docker image
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: npm ci

- name: Build web app
run: npm run build --workspace=web
run: npm run build --workspace=@worksight/web

- name: Start application
run: |
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
run: npm ci

- name: Analyze bundle
run: npm run build:analyze --workspace=web
run: npm run build:analyze --workspace=@worksight/web

- name: Upload bundle analysis
uses: actions/upload-artifact@v4
Expand Down
19 changes: 19 additions & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@worksight/api",
"version": "0.1.0",
"private": true,
"scripts": {},
"dependencies": {
"@nestjs/common": "^11.1.6",
"@nestjs/core": "^11.1.6",
"@nestjs/platform-express": "^11.1.6",
"@supabase/supabase-js": "^2.58.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.2"
},
"devDependencies": {
"@nestjs/cli": "^11.0.10",
"@nestjs/schematics": "^11.0.7",
"@nestjs/testing": "^11.1.6"
}
}
4 changes: 2 additions & 2 deletions apps/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ COPY package.json turbo.json ./
COPY apps/docs/package.json apps/docs/

# Install dependencies for the docs workspace
RUN npm install --workspace=apps/docs --legacy-peer-deps
RUN npm install --workspace=@worksight/docs --legacy-peer-deps

# Copy the rest of the project
COPY . .

# Build VitePress site for production
RUN npm --workspace=apps/docs run build
RUN npm --workspace=@worksight/docs run build

# ---- Runtime stage ----
FROM nginx:mainline-alpine
Expand Down
20 changes: 10 additions & 10 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"build": "vitepress build",
"preview": "vitepress preview",
"serve": "vitepress serve",
"lint": "echo 'Linting skipped for docs, VitePress handles this during build'",
"type-check": "echo 'Type checking skipped for docs - VitePress handles this during build'",
"quality": "echo 'npm quality doesnt exist, give up.' ",
"clean": "rimraf .next dist .turbo"
},
"devDependencies": {
"@types/node": "^24.5.2",
"typescript": "^5.9.2",
"vitepress": "^1.6.4",
"vue": "^3.5.21",
"vue-tsc": "^3.0.7"
},
"dependencies": {
"@catppuccin/vitepress": "^0.1.2",
"esbuild": "^0.25.10",
"react": "18",
"react-dom": "18"
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
"devDependencies": {
"@types/node": "^24.5.2",
"vitepress": "^1.6.4",
"vue": "^3.5.22",
"vue-tsc": "^3.1.0"
}
}
}
9 changes: 5 additions & 4 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"declaration": true,
"declarationMap": true
"noEmit": true,
"incremental": true,
"resolveJsonModule": true
},
"include": [".vitepress/**/*.ts", ".vitepress/**/*.mts", ".vitepress/**/*.d.ts", "website/**/*.ts", "website/**/*.md"]
"include": ["src/**/*", ".vitepress/**/*"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY package.json turbo.json ./
COPY apps/web/package.json apps/web/

# Install all dependencies (dev + prod) for build
RUN npm install --workspace=apps/web --legacy-peer-deps
RUN npm install --workspace=@worksight/web --legacy-peer-deps

# ---- Build ----
FROM deps AS build
Expand Down
2 changes: 1 addition & 1 deletion apps/web/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('@testing-library/jest-dom');
import * as jest from '@testing-library/jest-dom';

// Mock Next.js router
jest.mock('next/router', () => ({
Expand Down
46 changes: 16 additions & 30 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { NextConfig } from 'next';
import withBundleAnalyzer from '@next/bundle-analyzer';
import { NextConfig } from 'next';

const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const isAnalyze = process.env.ANALYZE === 'true';

const nextConfig: NextConfig = {
// Performance optimizations
Expand All @@ -13,15 +12,14 @@ const nextConfig: NextConfig = {
// Development server configuration
allowedDevOrigins: [
'http://localhost:3001',
'http://192.168.1.2:3001', // full LAN origin with port
'http://192.168.1.2:3001',
...(process.env.NEXT_PUBLIC_DEV_URL
? [
process.env.NEXT_PUBLIC_DEV_URL,
// Also allow without port if DEV_URL includes a port
process.env.NEXT_PUBLIC_DEV_URL.includes(':')
? process.env.NEXT_PUBLIC_DEV_URL.replace(/:\d+$/, '')
: null,
].filter(Boolean)
process.env.NEXT_PUBLIC_DEV_URL,
process.env.NEXT_PUBLIC_DEV_URL.includes(':')
? process.env.NEXT_PUBLIC_DEV_URL.replace(/:\d+$/, '')
: null,
].filter(Boolean)
: []),
] as string[],

Expand All @@ -42,11 +40,11 @@ const nextConfig: NextConfig = {
// Image optimization
images: {
formats: ['image/avif', 'image/webp'],
minimumCacheTTL: 60 * 60 * 24 * 7, // 7 days
minimumCacheTTL: 60 * 60 * 24 * 7,
},

// Bundle analyzer in development
webpack: (config, { dev, isServer }) => {
webpack(config, { dev, isServer }) {
if (dev && !isServer) {
config.optimization.splitChunks = {
chunks: 'all',
Expand All @@ -68,26 +66,14 @@ const nextConfig: NextConfig = {
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'origin-when-cross-origin' },
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
],
},
];
},
};

export default withBundleAnalyzer(nextConfig);
export default withBundleAnalyzer({ enabled: isAnalyze })(nextConfig);
46 changes: 15 additions & 31 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"clean": "rimraf .next dist .turbo"
},
"dependencies": {
"@worksight/assets": "file:../../packages/assets",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@next/bundle-analyzer": "^15.5.4",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
Expand All @@ -43,51 +43,35 @@
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@supabase/ssr": "^0.7.0",
"@supabase/supabase-js": "^2.57.4",
"@tailwindcss/postcss": "^4.1.13",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"js-cookie": "^3.0.5",
"jsonwebtoken": "^9.0.2",
"lodash": "^4.17.21",
"lucide-react": "^0.539.0",
"next": "15.4.6",
"lucide-react": "^0.544.0",
"next": "^15.5.4",
"next-themes": "^0.4.6",
"react": "19.1.1",
"react-avatar": "^5.0.4",
"react-dom": "19.1.1",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-icons": "^5.5.0",
"recharts": "^3.2.1",
"sass": "^1.92.1",
"sass": "^1.93.2",
"sonner": "^2.0.7",
"tailwind-merge": "^3.3.1",
"tw-animate-css": "^1.4.0",
"vaul": "^1.1.2",
"web-vitals": "^5.1.0",
"zod": "^4.1.8",
"zustand": "^5.0.8"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@next/bundle-analyzer": "^15.5.3",
"@tailwindcss/postcss": "^4.1.13",
"@testing-library/user-event": "^14.6.1",
"@types/js-cookie": "^3.0.6",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^20.19.14",
"@types/react": "^19.1.13",
"@types/react": "^19.1.15",
"@types/react-dom": "^19.1.9",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"autoprefixer": "^10.4.21",
"eslint-config-next": "15.4.6",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"jest-environment-jsdom": "^30.1.2",
"npm-run-all": "^4.1.5",
"eslint-config-next": "^15.5.4",
"prettier-plugin-tailwindcss": "^0.6.14",
"rimraf": "^6.0.1",
"run-s": "^0.0.0",
"stylelint": "^16.24.0",
"stylelint-config-standard": "^39.0.0",
"stylelint-config-tailwindcss": "^1.0.0",
"tailwindcss": "^4.1.13",
"tw-animate-css": "^1.3.8",
"typescript": "^5.9.2"
"tailwindcss": "^4.1.13"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { IconType } from 'react-icons/lib';
import { SiGoogle, SiGithub, SiDiscord, SiFacebook } from 'react-icons/si';
import { SiDiscord, SiFacebook, SiGithub, SiGoogle } from 'react-icons/si';

type Provider = {
export type OAuthProvider = {
name: 'google' | 'github' | 'discord' | 'facebook';
displayName: string;
icon: IconType;
url?: string;
};

export const providers: Provider[] = [
export const OAuthProviders: OAuthProvider[] = [
{ name: 'google', displayName: 'Google', icon: SiGoogle },
{ name: 'github', displayName: 'GitHub', icon: SiGithub },
{ name: 'discord', displayName: 'Discord', icon: SiDiscord },
Expand Down
11 changes: 2 additions & 9 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"composite": true,
"noEmit": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"noEmit": true,
"incremental": true,
"resolveJsonModule": true,
"isolatedModules": true,
"plugins": [
{
"name": "next"
}
]
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "src/**/*", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
Loading