Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create Next.js 14 app replica for Meshery UI #498

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
50887ae
feat: Create Next.js 14 app replica for Meshery UI
nebula-aac Feb 8, 2024
0a26dd5
feat: add utils
nebula-aac Feb 8, 2024
dd10524
refactor: move redux and rtk store to lib
nebula-aac Feb 8, 2024
11ce0ab
feat: Add BBChart
nebula-aac Feb 8, 2024
940d60b
feat: Add Dashboard and charts
nebula-aac Feb 8, 2024
3497334
feat: add some of the icons for notification center
nebula-aac Feb 8, 2024
c936de7
feat: add Provider and Settings
nebula-aac Feb 8, 2024
332fbb0
feat: add notification center
nebula-aac Feb 8, 2024
179cf4b
feat: add graphql
nebula-aac Feb 8, 2024
0d83768
feat: add Preferences for User
nebula-aac Feb 8, 2024
bc82a9d
feat: add relay config
nebula-aac Feb 8, 2024
407dfb4
feat: add hooks
nebula-aac Feb 8, 2024
beab749
feat: add ConnectionWizard metrics and LifeCycle environment
nebula-aac Feb 8, 2024
af80431
chore: add and remove packages
nebula-aac Feb 8, 2024
40289dd
refactor: refactor store into function
nebula-aac Feb 8, 2024
ddaa194
feat: add provider components
nebula-aac Feb 16, 2024
4b1615d
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac Feb 16, 2024
e5f6e9d
chore: update fork
nebula-aac Feb 16, 2024
b6128e7
feat: copy over rtk queries
nebula-aac Feb 16, 2024
b94d30d
feat: copy over can.js for @casl/ability
nebula-aac Feb 16, 2024
1898cde
refactor: move provider to its own directory
nebula-aac Feb 16, 2024
cb65e4c
feat: add the typeface
nebula-aac Feb 20, 2024
d827bcf
feat: provide default props to unset styles, and reimport into SvgIco…
nebula-aac Feb 20, 2024
65f54de
feat: move useDashboardRouter to its own hooks folder
nebula-aac Feb 20, 2024
52e1636
feat: refactor view and title components
nebula-aac Feb 20, 2024
da3eb19
feat: add @mui/material-nextjs package
nebula-aac Feb 20, 2024
32cc5f0
feat: add provider modal and add main container styled component
nebula-aac Feb 20, 2024
a81be50
Merge branch 'master' into 496-meshery-ui-app
nebula-aac Mar 2, 2024
d479f6f
chore: remove million, finish testing package
nebula-aac Mar 2, 2024
1141ce5
chore: fix react component spelling to Unauthenticated
nebula-aac Mar 2, 2024
257200f
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac Mar 13, 2024
795c506
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac Apr 9, 2024
fb13cb9
Merge branch 'master' into 496-meshery-ui-app
nebula-aac Apr 16, 2024
01087bc
Merge branch 'master' into 496-meshery-ui-app
nebula-aac Apr 19, 2024
21b1f66
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac Apr 24, 2024
1511bf6
chore: update sistent package
nebula-aac Apr 24, 2024
315b9e6
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac Apr 27, 2024
7730b5d
Merge branch 'master' into 496-meshery-ui-app
nebula-aac May 2, 2024
fb88132
Merge branch 'layer5io:master' into 496-meshery-ui-app
nebula-aac May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions examples/next-14/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
out
.next
static
package.json
package-lock.json
nodemon.json
lib/
cypress/
**/__generated__/**
60 changes: 60 additions & 0 deletions examples/next-14/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true, // tells the parser that we are using nodejs
},

settings: {
react: {
version: require('./package.json').dependencies.react,
},
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:cypress/recommended',
'next',
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
globalThis: 'readonly',
},
parser: '@babel/eslint-parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'cypress', 'prettier'],
rules: {
'@next/next/no-img-element': 'off',
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/alt-text': 'off',
'valid-typeof': 'warn',
'no-trailing-spaces': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs'],
'react/react-in-jsx-scope': 'off',
'no-undef': 'error',
'react/jsx-uses-vars': [2],
'react/jsx-no-undef': 'error',
'no-console': 0,
'no-unused-vars': 'error',
'react/jsx-key': 'warn',
'no-dupe-keys': 'error',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx'],
},
],
'react/prop-types': 'off',
'prettier/prettier': ['error', { endOfLine: 'lf' }],
},
};
36 changes: 36 additions & 0 deletions examples/next-14/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
15 changes: 15 additions & 0 deletions examples/next-14/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.svg
*.ico
*.css

*/.DS_Store
assets/**
.next
package.json
package-lock.json
public
node_modules
next-env.d.ts
next.config.js
.eslintrc.js
**/__generated__/**
13 changes: 13 additions & 0 deletions examples/next-14/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arrowParens: always
bracketSameLine: false
bracketSpacing: true
jsxSingleQuote: false
proseWrap: preserve
quoteProps: as-needed
semi: true
singleQuote: true
tabWidth: 2
trailingComma: all
printWidth: 100
useTabs: false
endOfLine: 'lf'
40 changes: 40 additions & 0 deletions examples/next-14/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Binary file added examples/next-14/bun.lockb
Binary file not shown.
18 changes: 18 additions & 0 deletions examples/next-14/components/BBChart/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { useEffect, useRef, memo } from 'react';
import bb from 'billboard.js';

function BBChart({ options }) {
const chartRef = useRef(null);

useEffect(() => {
const chart = bb.generate({ ...options, bindto: chartRef.current });

return () => {
chart.destroy();
};
}, [options]);

return <div ref={chartRef}></div>;
}

export default memo(BBChart);