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
32 changes: 32 additions & 0 deletions .github/workflows/frontend-bundle-size-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bundle Analysis

on:
pull_request:

jobs:
analyze:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: cd app && npm ci

- name: Run bundle analysis
run: cd app && npm run analyze-ci

- name: Check bundle size
run: cd app && npm run check-bundle-size

- name: Upload bundle analysis
if: always()
uses: actions/upload-artifact@v4
with:
name: bundle-analysis
path: app/bundle-analysis.txt
2 changes: 2 additions & 0 deletions app/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# API URL for the backend server
NEXT_PUBLIC_API_URL=http://localhost:8080
37 changes: 37 additions & 0 deletions app/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react", "react-hooks", "@next/next"],
"rules": {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
],
"no-restricted-imports": [
"error",
{
"patterns": ["@mui/*/*/*"]
}
]
},
"settings": {
"react": {
"version": "detect"
},
"next": {
"rootDir": "./"
}
},
"env": {
"browser": true,
"es2021": true,
"node": true
}
}
2 changes: 2 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

# testing
/coverage
bundle-analysis.txt

# production
/build
/.next

# misc
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions app/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
14 changes: 14 additions & 0 deletions app/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
distDir: "build",
env: {
API_URL: process.env.API_URL,
},
images: {
remotePatterns: [{ hostname: "avatars.githubusercontent.com" }],
},
};

export default nextConfig;
Loading
Loading