Skip to content

Commit

Permalink
base architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
kired01 committed Aug 9, 2024
0 parents commit e478f24
Show file tree
Hide file tree
Showing 75 changed files with 10,594 additions and 0 deletions.
187 changes: 187 additions & 0 deletions .better-commits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
{
"check_status": true,
"commit_type": {
"enable": true,
"initial_value": "feat",
"infer_type_from_branch": true,
"append_emoji_to_label": false,
"append_emoji_to_commit": false,
"options": [
{
"value": "feat",
"label": "feat",
"hint": "A new feature",
"emoji": "",
"trailer": "Changelog: feature"
},
{
"value": "fix",
"label": "fix",
"hint": "A bug fix",
"emoji": "🐛",
"trailer": "Changelog: fix"
},
{
"value": "docs",
"label": "docs",
"hint": "Documentation only changes",
"emoji": "📚",
"trailer": "Changelog: documentation"
},
{
"value": "refactor",
"label": "refactor",
"hint": "A code change that neither fixes a bug nor adds a feature",
"emoji": "🔨",
"trailer": "Changelog: refactor"
},
{
"value": "perf",
"label": "perf",
"hint": "A code change that improves performance",
"emoji": "🚀",
"trailer": "Changelog: performance"
},
{
"value": "style",
"label": "style",
"hint": "Improving the visual style of the code",
"emoji": "💅",
"trailer": "Changelog: style"
},
{
"value": "test",
"label": "test",
"hint": "Adding missing tests or correcting existing tests",
"emoji": "🚨",
"trailer": "Changelog: test"
},
{
"value": "build",
"label": "build",
"hint": "Changes that affect the build system or external dependencies",
"emoji": "🚧",
"trailer": "Changelog: build"
},
{
"value": "ci",
"label": "ci",
"hint": "Changes to our CI configuration files and scripts",
"emoji": "🤖",
"trailer": "Changelog: ci"
},
{
"value": "chore",
"label": "chore",
"hint": "Other changes that do not modify src or test files",
"emoji": "🧹",
"trailer": "Changelog: chore"
},
{
"value": "",
"label": "none"
}
]
},
"commit_scope": {
"enable": true,
"custom_scope": false,
"initial_value": "app",
"options": [
{
"value": "app",
"label": "app"
},
{
"value": "widgets",
"label": "widgets"
},
{
"value": "features",
"label": "features"
},
{
"value": "entities",
"label": "entities"
},
{
"value": "shared",
"label": "shared"
},
{
"value": "",
"label": "none"
}
]
},
"check_ticket": {
"infer_ticket": true,
"confirm_ticket": true,
"add_to_title": true,
"append_hashtag": false,
"prepend_hashtag": "Never",
"surround": "",
"title_position": "start"
},
"commit_title": {
"max_size": 70
},
"commit_body": {
"enable": true,
"required": false
},
"commit_footer": {
"enable": true,
"initial_value": [],
"options": [
"closes",
"trailer",
"breaking-change",
"deprecated",
"custom"
]
},
"breaking_change": {
"add_exclamation_to_title": true
},
"confirm_with_editor": false,
"confirm_commit": true,
"print_commit_output": true,
"branch_pre_commands": [],
"branch_post_commands": [],
"worktree_pre_commands": [],
"worktree_post_commands": [],
"branch_user": {
"enable": true,
"required": false,
"separator": "/"
},
"branch_type": {
"enable": true,
"separator": "/"
},
"branch_version": {
"enable": false,
"required": false,
"separator": "/"
},
"branch_ticket": {
"enable": true,
"required": false,
"separator": "-"
},
"branch_description": {
"max_length": 70,
"separator": ""
},
"branch_action_default": "branch",
"branch_order": [
"user",
"version",
"type",
"ticket",
"description"
],
"enable_worktrees": true,
"overrides": {}
}
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.git/
.github/
.next/
node_modules/
.better-commits.json
.env
.env.example
.eslintrc.cjs
.gitattributes
.gitignore
.nvmrc
.prettierignore
cspell.config.cjs
docker-compose.yml
Dockerfile
next-env.d.ts
prettier.config.js
README.md
renovate.json
vercel.json
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_ENV=development
33 changes: 33 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended",
"next",
require.resolve("@vercel/style-guide/eslint/next"),
"plugin:@tanstack/eslint-plugin-query/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
ecmaVersion: 14,
sourceType: "module",
},
plugins: [ "@typescript-eslint", "@tanstack/query"],
globals: {
React: true,
JSX: true,
},
env: {
es6: true,
node: true,
},
ignorePatterns: ["node_modules"],
overrides: [
{
files: ["*.(js|cjs|mjs|ts|tsx)"],
},
],
}
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* text=auto

*.{tsx,ts,js,jsx,mjs,cjs} text eol=lf
*.{json,yml,yaml} text eol=lf
*.{md,txt} text eol=lf

*.{jpg,png,ico} binary filter=lfs diff=lfs merge=lfs
*.svg text filter=lfs diff=lfs merge=lfs eol=lf
29 changes: 29 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check code

on:
pull_request:
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Lint code
run: yarn lint

- name: Cspell check code
run: yarn cspell-check
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.next/
.vercel
node_modules/
next-env.d.ts
.env
.env*.local
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.16.0
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Base
.next/
next-env.d.ts
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:20.15.1-alpine3.19 AS base

FROM base AS runner
RUN npm install -g pnpm
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
COPY ./prisma/schema/* ./prisma/schema/
RUN pnpm install
COPY . .
CMD ["pnpm", "dev"]
Empty file added README.md
Empty file.
20 changes: 20 additions & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type { import ("@cspell/cspell-types").CSpellUserSettings } */
module.exports = {
version: "0.2",
language: "en-US",
useGitignore: true,
ignorePaths: ["**/*.svg"],
words: [
"preinstall",
"turbopack",
"svgr",
"dmitriy",
"kvant",
"nextui",
"trivago",
"pxtorem",
"cancelation",
"tanstack",
"tailwindcss",
],
}
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
services:
client:
container_name: client
build:
context: ./
dockerfile: ./Dockerfile
restart: always
env_file:
- .env
ports:
- 3000:3000
environment:
NODE_ENV: ${NODE_ENV}
volumes:
- ./src:/app/src
- ./next.config.js:/app/next.config.js
- ./tailwind.config.ts:/app/tailwind.config.ts
networks:
- client
clientDB:
container_name: clientDB
image: postgres:16-alpine3.19
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
PGDATA: /var/lib/postgresql/data
networks:
- client
networks:
client:
name: client
Loading

0 comments on commit e478f24

Please sign in to comment.