Skip to content

Commit 7c847c0

Browse files
committed
feat: Structure import
1 parent 7bbed45 commit 7c847c0

File tree

114 files changed

+34021
-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.

114 files changed

+34021
-0
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.eslintrc.cjs
2+
.eslintrc.js
3+
Procfile

.eslintrc.cjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
ignorePatterns: ['**/*.js', '**/*.d.ts'],
7+
parser: '@typescript-eslint/parser',
8+
parserOptions: {
9+
tsconfigRootDir: __dirname,
10+
project: ['./tsconfig.json'],
11+
},
12+
plugins: [
13+
'@typescript-eslint',
14+
'eslint-plugin-tsdoc',
15+
],
16+
extends: [
17+
'eslint:recommended',
18+
'plugin:@typescript-eslint/recommended',
19+
'airbnb',
20+
'airbnb/hooks',
21+
'plugin:node/recommended',
22+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
23+
],
24+
rules: {
25+
"no-unused-vars": "off",
26+
"@typescript-eslint/no-unused-vars": "error",
27+
'@typescript-eslint/no-var-requires': 'off',
28+
semi: 'off',
29+
'@typescript-eslint/semi': ['error'],
30+
'node/no-unpublished-import': 'off',
31+
'node/no-unsupported-features/es-syntax': [
32+
'error',
33+
{ ignores: ['modules'] },
34+
],
35+
'linebreak-style': 'off',
36+
'eol-last': 'off',
37+
'no-plusplus': ["error", { "allowForLoopAfterthoughts": true }],
38+
"import/no-named-default": "off",
39+
"no-nested-ternary": "off",
40+
"no-console": ["warn", { allow: ["warn", "error"] }],
41+
'import/prefer-default-export': 'off',
42+
},
43+
settings: {
44+
node: {
45+
tryExtensions: ['.js', '.json', '.node', '.ts'],
46+
},
47+
},
48+
};

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Zenoo

.github/workflows/release-please.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- test
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
with:
12+
release-type: node
13+
package-name: fullstack-typescript-monorepo
14+
bump-minor-pre-major: true
15+
default-branch: test
16+
extra-files: |
17+
client/src/utils/Version.ts
18+
client/package.json
19+
core/package.json
20+
prisma/package.json
21+
server/package.json

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
# Created by https://www.gitignore.io/api/node
3+
4+
### Node ###
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (http://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# Typescript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
65+
# End of https://www.gitignore.io/api/node
66+
67+
lib/
68+
69+
*.tsbuildinfo

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
## Backend
2+
3+
> Made with [Node.js](https://nodejs.org/en/), [Express](https://expressjs.com/), [Prisma](https://www.prisma.io/), written in [Typescript](https://www.typescriptlang.org/).
4+
5+
## Frontend
6+
7+
> Made with [MUI's](https://mui.com/) components, [React](https://reactjs.org/) and [create-react-app](https://facebook.github.io/create-react-app/).
8+
9+
## Local development
10+
11+
- Copy `.env.sample` to `.env` and adapt the database URL
12+
13+
- Install dependencies: `npm i` (This should also setup your database from the `schema.prisma` file and the migrations)
14+
15+
- Start both the server and the client with `npm run dev`
16+
17+
## Deployment
18+
19+
- Set the DATABASE_URL environment variable
20+
21+
- Install dependencies: `npm ci` (This should also setup your database from the `schema.prisma` file and the migrations)
22+
23+
- Start the server with `npm run start`
24+
25+
## Contributing
26+
27+
- Fork the project
28+
29+
- Make sure your NodeJS and yarn versions are up to date
30+
31+
- Install dependencies: `npm run install`
32+
33+
- Copy `.env.sample` to `.env` and adapt the database URL
34+
35+
- Install dependencies: `npm i` (This should also setup your database from the `schema.prisma` file and the migrations)
36+
37+
- Start both the server and the client with `npm run dev`
38+
39+
- Commit and push your changes
40+
41+
- Create a pull request
42+
43+
## Documentation
44+
45+
Every
46+
47+
- Component
48+
- Method
49+
- Callback
50+
51+
Should have a corresponding documentation.
52+
53+
54+
## File Structure
55+
56+
```
57+
├── client
58+
│ ├── build # Compiled frontend
59+
│ ├── public
60+
│ │ ├── i18n # Folder containing all the translations
61+
│ │ └── ... # Any other static file
62+
│ └── src
63+
│ ├── components # Reusable components
64+
│ ├── hooks # React hooks
65+
│ ├── layouts # Layouts
66+
│ ├── theme # Theme variables
67+
│ ├── utils # Utility functions
68+
│ └── views # Views
69+
├── core # Shared ressourcs for both front and back end
70+
│ ├── src
71+
├── prisma # Prisma types definitions for both front and back end
72+
│ ├── src
73+
└── server # Back end
74+
├── prisma # DB
75+
└── src
76+
├── controllers # Controllers
77+
├── utils # Utility functions
78+
└── ...
79+
```

client/.eslintrc.js

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
module.exports = {
2+
root: true,
3+
'env': {
4+
'browser': true,
5+
'es2021': true,
6+
},
7+
"settings": {
8+
"import/parsers": {
9+
"@typescript-eslint/parser": [".ts", ".tsx"]
10+
},
11+
"import/resolver": {
12+
"typescript": {},
13+
"node": {
14+
"moduleDirectory": ["node_modules", "./"]
15+
}
16+
},
17+
},
18+
'extends': [
19+
'plugin:react/recommended',
20+
'plugin:@typescript-eslint/recommended',
21+
'airbnb',
22+
'airbnb/hooks',
23+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
24+
"plugin:import/errors",
25+
"plugin:import/warnings",
26+
"plugin:import/typescript",
27+
],
28+
'parser': '@typescript-eslint/parser',
29+
'parserOptions': {
30+
'ecmaFeatures': {
31+
'jsx': true
32+
},
33+
'ecmaVersion': 'latest',
34+
'sourceType': 'module',
35+
'tsconfigRootDir': __dirname,
36+
'project': ['./tsconfig.json']
37+
},
38+
'plugins': [
39+
'@typescript-eslint',
40+
'react',
41+
'import',
42+
],
43+
'rules': {
44+
'semi': 'off',
45+
'@typescript-eslint/semi': ['error'],
46+
'linebreak-style': 'off',
47+
'no-unused-vars': 'off',
48+
'@typescript-eslint/no-unused-vars': ['error'],
49+
'import/extensions': [
50+
'error',
51+
{
52+
'js': 'never',
53+
'jsx': 'never',
54+
'ts': 'never',
55+
'tsx': 'never',
56+
'json': 'always',
57+
}
58+
],
59+
'react/prop-types': 'off',
60+
'react/require-default-props': 'off',
61+
'react-hooks/rules-of-hooks': 'error',
62+
'react-hooks/exhaustive-deps': 'error',
63+
"react/function-component-definition": ['error', {
64+
"namedComponents": "arrow-function",
65+
}],
66+
'react/jsx-filename-extension': ['error', { 'extensions': ['.ts', '.tsx'] }],
67+
'react/jsx-curly-brace-presence': 'error',
68+
'react/jsx-props-no-spreading': 'off',
69+
'react/jsx-one-expression-per-line': 'off',
70+
'no-nested-ternary': 'off',
71+
"object-curly-newline": ["error", {
72+
"ImportDeclaration": "never",
73+
}],
74+
'import/order': 'off',
75+
"import/no-unresolved": "error",
76+
"jsx-a11y/anchor-is-valid": "off",
77+
"import/no-named-default": "off",
78+
"no-console": ["warn", { allow: ["warn", "error"] }],
79+
"@typescript-eslint/no-inferrable-types": "off",
80+
"@typescript-eslint/no-misused-promises": [
81+
"error",
82+
{
83+
"checksVoidReturn": {
84+
"properties": false,
85+
"attributes": false
86+
}
87+
}
88+
],
89+
"@typescript-eslint/no-floating-promises": [
90+
"error",
91+
{ ignoreIIFE: true }
92+
],
93+
"max-len": ["error", {
94+
"code": 100,
95+
"ignoreComments": true,
96+
"ignoreStrings": true,
97+
}],
98+
"prefer-promise-reject-errors": 'off',
99+
'comma-dangle': 'off',
100+
'eol-last': 'off',
101+
},
102+
};

client/.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
# misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
/build

0 commit comments

Comments
 (0)