Skip to content

Commit 1a28b80

Browse files
committed
[NakamuraOS] Init project
Signed-off-by: ThinhHV <[email protected]>
0 parents  commit 1a28b80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4463
-0
lines changed

.babelrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
[
4+
"next/babel",
5+
{
6+
"styled-jsx": {
7+
"plugins": ["styled-jsx-plugin-postcss"]
8+
}
9+
}
10+
]
11+
]
12+
}

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
out

.eslintrc

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
// Configuration for JavaScript files
3+
"extends": [
4+
"airbnb-base",
5+
"next/core-web-vitals",
6+
"plugin:prettier/recommended"
7+
],
8+
"rules": {
9+
"prettier/prettier": [
10+
"error",
11+
{
12+
"singleQuote": true
13+
}
14+
]
15+
},
16+
"overrides": [
17+
// Configuration for TypeScript files
18+
{
19+
"files": ["**/*.ts", "**/*.tsx"],
20+
"plugins": ["@typescript-eslint", "unused-imports"],
21+
"extends": [
22+
"airbnb-typescript",
23+
"next/core-web-vitals",
24+
"plugin:prettier/recommended"
25+
],
26+
"parserOptions": {
27+
"project": "./tsconfig.json"
28+
},
29+
"rules": {
30+
"prettier/prettier": [
31+
"error",
32+
{
33+
"singleQuote": true
34+
}
35+
],
36+
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
37+
"jsx-a11y/anchor-is-valid": "off", // Next.js use his own internal link system
38+
"react/require-default-props": "off", // Allow non-defined react props as undefined
39+
"react/jsx-props-no-spreading": "off", // _app.tsx uses spread operator and also, react-hook-form
40+
"@next/next/no-img-element": "off", // We currently not using next/image because it isn't supported with SSG mode
41+
"import/order": [
42+
"error",
43+
{
44+
"groups": ["builtin", "external", "internal"],
45+
"pathGroups": [
46+
{
47+
"pattern": "react",
48+
"group": "external",
49+
"position": "before"
50+
}
51+
],
52+
"pathGroupsExcludedImportTypes": ["react"],
53+
"newlines-between": "always",
54+
"alphabetize": {
55+
"order": "asc",
56+
"caseInsensitive": true
57+
}
58+
}
59+
],
60+
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier
61+
"import/prefer-default-export": "off", // Named export is easier to refactor automatically
62+
"class-methods-use-this": "off", // _document.tsx use render method without `this` keyword
63+
"@typescript-eslint/no-unused-vars": "off",
64+
"unused-imports/no-unused-imports": "error",
65+
"unused-imports/no-unused-vars": [
66+
"error",
67+
{ "argsIgnorePattern": "^_" }
68+
]
69+
}
70+
}
71+
]
72+
}

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: ['https://www.buymeacoffee.com/thinhhv']

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next
13+
/out
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
Thumbs.db
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# dotenv local files
29+
.env*.local
30+
31+
# local folder
32+
local
33+
34+
# vercel
35+
.vercel

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Disable concurent to run build-types after ESLint in lint-staged
5+
npx lint-staged --concurrent false

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"arrowParens":"always"
9+
}

.vscode/extensions.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"mikestead.dotenv",
6+
"csstools.postcss",
7+
"blanu.vscode-styled-jsx",
8+
"msjsdiag.debugger-for-chrome",
9+
"bradlc.vscode-tailwindcss"
10+
]
11+
}

.vscode/launch.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Next: Chrome",
11+
"url": "http://localhost:3000",
12+
"webRoot": "${workspaceFolder}"
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Next: Node",
18+
"program": "${workspaceFolder}/node_modules/.bin/next",
19+
"args": ["dev"],
20+
"autoAttachChildProcesses": true,
21+
"skipFiles": ["<node_internals>/**"],
22+
"console": "integratedTerminal"
23+
}
24+
],
25+
"compounds": [
26+
{
27+
"name": "Next: Full",
28+
"configurations": ["Next: Node", "Next: Chrome"]
29+
}
30+
]
31+
}

.vscode/settings.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.detectIndentation": false,
4+
"jest.autoRun": {
5+
"watch": false,
6+
"onSave": "test-file"
7+
},
8+
"search.exclude": {
9+
"package-lock.json": true
10+
},
11+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
12+
"editor.formatOnSave": false,
13+
"editor.codeActionsOnSave": [
14+
"source.addMissingImports",
15+
"source.fixAll.eslint"
16+
],
17+
// Multiple language settings for json and jsonc files
18+
"[json][jsonc]": {
19+
"editor.formatOnSave": true,
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
21+
}
22+
}

.vscode/tasks.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Project wide type checking with TypeScript",
8+
"type": "npm",
9+
"script": "build-types",
10+
"problemMatcher": ["$tsc"],
11+
"group": {
12+
"kind": "build",
13+
"isDefault": true
14+
},
15+
"presentation": {
16+
"clear": true,
17+
"reveal": "never"
18+
}
19+
}
20+
]
21+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Cloudmana.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<p align="center">
2+
<a href="http://thinhhv.com/cloudmana" target="blank">
3+
<img style="width: 120px;" src="public/assets/images/logo.png?raw=true" alt="Cloudmana landing page" />
4+
</a>
5+
</p>
6+
<p align="center">The landing page for manage multi-cloud resources.</p>
7+
<p align="center">
8+
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
9+
<a href="https://github.com/cloudmana/cloudmana/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/badge/price-FREE-0098f7.svg" alt="Price" /></a>
10+
<a href="https://github.com/cloudmana/cloudmana/" target="_blank"><img src="https://img.shields.io/github/package-json/v/cloudmana/cloudmana" alt="GitHub package version" /></a>
11+
</p>
12+
13+
## Installation
14+
15+
```bash
16+
yarn install
17+
```
18+
19+
## Running the app
20+
21+
```bash
22+
# development
23+
yarn dev
24+
25+
# build
26+
yarn build
27+
28+
# production mode
29+
yarn start
30+
```
31+
32+
## Support
33+
34+
Cloudmana is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers.
35+
36+
## Stay in touch
37+
38+
- Author - [ThinhHV](https://thinhhv.com)
39+
- Website - [https://cloudmana.github.io](https://cloudmana.github.io)
40+
- Twitter - [@cloudmanaplatform](https://twitter.com/cloudmanaplatform)
41+
42+
## License
43+
44+
Cloudmana is [MIT licensed](LICENSE).

lint-staged.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'eslint'],
3+
'**/*.ts?(x)': () => 'npm run build-types',
4+
'*.json': ['prettier --write'],
5+
};

netlify.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
publish = "out"
3+
command = "npm run build-prod"
4+
5+
[build.environment]
6+
NETLIFY_NEXT_PLUGIN_SKIP = "true"

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
2+
const withBundleAnalyzer = require('@next/bundle-analyzer')({
3+
enabled: process.env.ANALYZE === 'true',
4+
});
5+
6+
module.exports = withBundleAnalyzer({
7+
poweredByHeader: false,
8+
trailingSlash: true,
9+
basePath: '',
10+
// The starter code load resources from `public` folder with `router.basePath` in React components.
11+
// So, the source code is "basePath-ready".
12+
// You can remove `basePath` if you don't need it.
13+
reactStrictMode: true,
14+
});

package.json

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "cloudmana-landing-page",
3+
"version": "1.0.0",
4+
"license": "MIT",
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"build-stats": "cross-env ANALYZE=true npm run build",
10+
"build-prod": "run-s clean build export",
11+
"export": "next export",
12+
"clean": "rimraf .next out",
13+
"lint": "eslint \"src/**/*.ts\" \"src/**/*.tsx\" --fix",
14+
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"",
15+
"build-types": "tsc --noEmit --pretty",
16+
"prepare": "husky install"
17+
},
18+
"dependencies": {
19+
"classnames": "^2.3.1",
20+
"next": "^12.0.9",
21+
"next-seo": "^4.29.0",
22+
"react": "^17.0.2",
23+
"react-dom": "^17.0.2",
24+
"styled-jsx-plugin-postcss": "^4.0.1"
25+
},
26+
"devDependencies": {
27+
"@next/bundle-analyzer": "^12.0.9",
28+
"@types/node": "^17.0.13",
29+
"@types/react": "^17.0.38",
30+
"@typescript-eslint/eslint-plugin": "^5.10.1",
31+
"@typescript-eslint/parser": "^5.10.1",
32+
"autoprefixer": "^10.4.2",
33+
"cross-env": "^7.0.3",
34+
"cssnano": "^5.0.16",
35+
"eslint": "^8.7.0",
36+
"eslint-config-airbnb-base": "^15.0.0",
37+
"eslint-config-airbnb-typescript": "^16.1.0",
38+
"eslint-config-next": "^12.0.9",
39+
"eslint-config-prettier": "^8.3.0",
40+
"eslint-plugin-import": "^2.25.4",
41+
"eslint-plugin-jsx-a11y": "^6.5.1",
42+
"eslint-plugin-prettier": "^4.0.0",
43+
"eslint-plugin-react": "^7.28.0",
44+
"eslint-plugin-react-hooks": "^4.3.0",
45+
"eslint-plugin-unused-imports": "^2.0.0",
46+
"husky": "^7.0.4",
47+
"lint-staged": "^12.3.2",
48+
"npm-run-all": "^4.1.5",
49+
"postcss": "^8.4.5",
50+
"prettier": "^2.5.1",
51+
"rimraf": "^3.0.2",
52+
"tailwindcss": "^3.0.17",
53+
"typescript": "^4.5.5"
54+
}
55+
}

postcss.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Please do not use the array form (like ['tailwindcss', 'postcss-preset-env'])
2+
// it will create an unexpected error: Invalid PostCSS Plugin found: [0]
3+
4+
module.exports = {
5+
plugins: {
6+
tailwindcss: {},
7+
autoprefixer: {},
8+
...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {}),
9+
},
10+
};

public/apple-touch-icon.png

8.26 KB
Loading

0 commit comments

Comments
 (0)