Skip to content

Commit 31fd9fb

Browse files
chore: add existing maia web codebase
0 parents  commit 31fd9fb

File tree

302 files changed

+57132
-0
lines changed

Some content is hidden

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

302 files changed

+57132
-0
lines changed

.dockerignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Dockerfile
2+
.dockerignore
3+
node_modules
4+
npm-debug.log
5+
README.md
6+
.next
7+
.git

.eslintrc.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"plugins": ["@typescript-eslint", "prettier", "react", "react-hooks"],
3+
"extends": [
4+
"next/core-web-vitals",
5+
"plugin:storybook/recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:import/errors",
8+
"plugin:import/warnings",
9+
"plugin:jsx-a11y/recommended",
10+
"prettier"
11+
],
12+
"settings": {
13+
"react": {
14+
"version": "detect"
15+
}
16+
},
17+
"rules": {
18+
"react/prop-types": "off",
19+
"prettier/prettier": "error",
20+
"react/react-in-jsx-scope": "off",
21+
"react-hooks/exhaustive-deps": "off",
22+
"@typescript-eslint/no-unused-vars": "off",
23+
"import/no-named-as-default": "off"
24+
},
25+
"overrides": [
26+
{
27+
"files": ["*.js"],
28+
"rules": {
29+
"typescript/no-var-requires": "off"
30+
}
31+
}
32+
]
33+
}

.github/workflows/ci.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: ['**']
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
- run: yarn
15+
- run: yarn lint
16+
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
node: ['18', '20']
22+
name: Node ${{ matrix.node }} Build
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node }}
28+
- run: yarn
29+
- run: yarn build

.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
# typescript
37+
*.tsbuildinfo

.prettierrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"plugins": ["prettier-plugin-tailwindcss"]
6+
}

.storybook/main.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// .storybook/main.js
2+
const path = require('path')
3+
4+
module.exports = {
5+
stories: [
6+
'../stories/**/*.stories.mdx',
7+
'../stories/**/*.stories.@(js|jsx|ts|tsx)',
8+
],
9+
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
10+
typescript: { reactDocgen: false },
11+
framework: '@storybook/react',
12+
core: {
13+
builder: 'webpack5',
14+
},
15+
webpackFinal: async (config, { configType }) => {
16+
config.module.rules.push({
17+
test: /\.scss$/,
18+
use: ['style-loader', 'css-loader', 'sass-loader'],
19+
include: path.resolve(__dirname, '../'),
20+
})
21+
return config
22+
},
23+
}

.storybook/preview.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: '^on[A-Z].*' },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
}

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"silvenon.mdx"
6+
]
7+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": "explicit"
4+
},
5+
"editor.formatOnSave": true,
6+
"editor.defaultFormatter": "esbenp.prettier-vscode",
7+
"[dockerfile]": {
8+
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
9+
}
10+
}

Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM node:16-alpine AS deps
2+
RUN apk add --no-cache libc6-compat
3+
WORKDIR /app
4+
COPY package.json yarn.lock ./
5+
RUN yarn install --frozen-lockfile
6+
7+
FROM node:16-alpine AS builder
8+
WORKDIR /app
9+
COPY --from=deps /app/node_modules ./node_modules
10+
COPY . .
11+
12+
ENV NEXT_TELEMETRY_DISABLED 1
13+
14+
RUN yarn build
15+
16+
FROM node:16-alpine AS runner
17+
WORKDIR /app
18+
19+
ENV NODE_ENV production
20+
ENV NEXT_TELEMETRY_DISABLED 1
21+
22+
RUN addgroup --system --gid 1001 nodejs
23+
RUN adduser --system --uid 1001 nextjs
24+
25+
COPY --from=builder /app/public ./public
26+
COPY --from=builder /app/package.json ./package.json
27+
28+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
29+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
30+
31+
USER nextjs
32+
33+
EXPOSE 3000
34+
35+
ENV PORT 3000
36+
37+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)