Skip to content

Commit 050196b

Browse files
author
ceepu8
committed
first commit
0 parents  commit 050196b

Some content is hidden

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

67 files changed

+5976
-0
lines changed

.env.examples

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# .env.examples
2+
3+
NEXT_PUBLIC_HOST= # your domain
4+
NEXT_PUBLIC_SERVER_URL= # your server url
5+
NEXT_PUBLIC_WEB_URL=http://localhost:3000
6+
7+
NEXTAUTH_SECRET=jHMoKw8weYsyevCSLyTr51lJrxahGt0yhixj2YPQlMbT # openssl rand -base64 33
8+
NEXTAUTH_URL_INTERNAL=http://127.0.0.1:3000
9+
NEXTAUTH_URL=http://localhost:3000

.eslintignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
**/node_modules/*
2+
**/.next/*
3+
**/out/*
4+
5+
coverage
6+
7+
dist
8+
9+
.github/*
10+
11+
package.json
12+
package-lock.json
13+
14+
next.config.mjs
15+
postcss.config.mjs
16+
17+
src/styles/*

.eslintrc.js

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
module.exports = {
2+
$schema: 'https://json.schemastore.org/eslintrc',
3+
4+
root: true,
5+
6+
extends: [
7+
'next/core-web-vitals',
8+
'prettier',
9+
'eslint:recommended',
10+
'plugin:tailwindcss/recommended',
11+
'plugin:jsx-a11y/recommended',
12+
'plugin:prettier/recommended',
13+
],
14+
15+
plugins: ['react', 'react-hooks', 'simple-import-sort', 'tailwindcss', '@tanstack/query'],
16+
17+
parserOptions: {
18+
ecmaFeatures: {
19+
jsx: true,
20+
},
21+
ecmaVersion: 11,
22+
sourceType: 'module',
23+
},
24+
25+
settings: {
26+
next: {
27+
rootDir: ['apps/*/'],
28+
},
29+
tailwindcss: {
30+
callees: ['cn', 'cva'],
31+
config: 'tailwind.config.js',
32+
},
33+
'import/resolver': {
34+
alias: {
35+
map: [['@', './src']],
36+
},
37+
},
38+
},
39+
40+
env: {
41+
es6: true,
42+
browser: true,
43+
jest: true,
44+
node: true,
45+
},
46+
47+
rules: {
48+
'@next/next/no-html-link-for-pages': 'off',
49+
'react-hooks/rules-of-hooks': 'error',
50+
'react-hooks/exhaustive-deps': 'off',
51+
'react/prop-types': 'off',
52+
'react/react-in-jsx-scope': 'off',
53+
'react/forbid-prop-types': 'off',
54+
'react/require-default-props': 'off',
55+
'react/jsx-filename-extension': [
56+
1,
57+
{
58+
extensions: ['.js', '.jsx'],
59+
},
60+
],
61+
'react/jsx-props-no-spreading': 'off',
62+
'import/prefer-default-export': 'off',
63+
'import/extensions': 'off',
64+
'jsx-a11y/click-events-have-key-events': 'warn',
65+
'jsx-a11y/anchor-is-valid': [
66+
'error',
67+
{
68+
components: ['Link'],
69+
specialLink: ['hrefLeft', 'hrefRight'],
70+
aspects: ['invalidHref', 'preferButton'],
71+
},
72+
],
73+
'react/jsx-no-useless-fragment': [
74+
'warn',
75+
{
76+
allowExpressions: true,
77+
},
78+
],
79+
'import/no-dynamic-require': 'off',
80+
'global-require': 'off',
81+
'@next/next/no-img-element': 'off',
82+
'react/function-component-definition': 'off',
83+
'react/no-danger': 'warn',
84+
'no-underscore-dangle': 'off',
85+
'no-unused-vars': 'warn',
86+
'react/display-name': 'off',
87+
'no-param-reassign': [
88+
'warn',
89+
{
90+
props: false,
91+
},
92+
],
93+
'jsx-a11y/label-has-associated-control': 'off',
94+
'import/no-anonymous-default-export': 'off',
95+
'@tanstack/query/exhaustive-deps': 'error',
96+
'tailwindcss/no-custom-classname': 'off',
97+
'tailwindcss/classnames-order': 'error',
98+
'tailwindcss/migration-from-tailwind-2': 'off',
99+
},
100+
}

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# .github/workflows/ci.yml
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '20.18.0'
17+
18+
- name: Install Dependencies
19+
run: yarn
20+
- name: Build Project
21+
run: yarn build

.gitignore

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
lerna-debug.log*
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# next-pwa
109+
/public/precache.*.*.js
110+
/public/sw.js
111+
/public/workbox-*.js
112+
/public/worker-*.js
113+
/public/fallback-*.js
114+
/public/precache.*.*.js.map
115+
/public/sw.js.map
116+
/public/workbox-*.js.map
117+
/public/worker-*.js.map
118+
/public/fallback-*.js
119+
120+
en_mobile.json
121+
ja_mobile.json
122+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
123+
124+
# dependencies
125+
node_modules
126+
.pnp
127+
.pnp.js
128+
129+
# testing
130+
coverage
131+
132+
# next.js
133+
.next/
134+
out/
135+
build
136+
out
137+
138+
# misc
139+
.DS_Store
140+
*.pem
141+
142+
# debug
143+
npm-debug.log*
144+
yarn-debug.log*
145+
yarn-error.log*
146+
.pnpm-debug.log*
147+
148+
# local env files
149+
.env.local
150+
.env.development.local
151+
.env.test.local
152+
.env.production.local
153+
154+
# turbo
155+
.turbo
156+
157+
.contentlayer
158+
tsconfig.tsbuildinfo
159+
160+
# vercel
161+
.vercel

.husky/commit-msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
yarn commitlint ${1}

.husky/pre-commit

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env sh
2+
3+
echo 'Checking conventions before committing code.'
4+
5+
# Check Prettier
6+
echo "Checking code style."
7+
8+
yarn prettier:check ||
9+
(
10+
echo 'Code style issues found, prettier formatting.';
11+
yarn prettier:format;
12+
git add .;
13+
echo 'Code style fixed.';
14+
git commit --amend --no-edit;
15+
echo 'Commit successfully fixed.';
16+
)
17+
18+
# Check ESLint
19+
echo 'Checking ESLint.'
20+
21+
yarn lint:check ||
22+
(
23+
echo 'ESLint errors detected.'
24+
25+
false
26+
)
27+
28+
npx lint-staged
29+
30+
echo 'Checking passed! ✅ '

.lintstagedrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { relative } from 'path'
2+
3+
const buildEslintCommand = (/** @type {any[]} */ filenames) =>
4+
`next lint --fix --file ${filenames.map((f) => relative(process.cwd(), f)).join(' --file ')}`
5+
6+
export default {
7+
'*.{js,jsx,ts,tsx}': [buildEslintCommand],
8+
}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.18.0

.prettierignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
.yarn/install-state.gz
6+
7+
# testing
8+
/coverage
9+
10+
# next.js
11+
/.next/
12+
/out/
13+
.next/
14+
15+
/build
16+
17+
# misc
18+
.DS_Store
19+
*.pem
20+
21+
# debug
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
./dist
27+
28+
yarn.lock
29+
public
30+
.gitkeep
31+
*.hbs

0 commit comments

Comments
 (0)