From 411fb981efbf5f863604cc8535ce7901e4b7cd88 Mon Sep 17 00:00:00 2001 From: Mathis Date: Tue, 9 Jul 2024 13:39:55 +0200 Subject: [PATCH] feat: Add initial configuration files New configuration files have been added for TypeScript, Biome, Nest CLI, Docker-compose, and environment variables. This setup includes TypeScript compiler options, biome schema settings, database container configuration and more. Additionally, a .gitignore file is added to exclude unnecessary files from the git repository. --- .env.example | 13 +++++++++++++ .gitignore | 5 +++++ biome.json | 36 ++++++++++++++++++++++++++++++++++++ docker-compose.yml | 16 ++++++++++++++++ nest-cli.json | 8 ++++++++ tsconfig.build.json | 4 ++++ tsconfig.json | 21 +++++++++++++++++++++ 7 files changed, 103 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 biome.json create mode 100644 docker-compose.yml create mode 100644 nest-cli.json create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..eaa4544 --- /dev/null +++ b/.env.example @@ -0,0 +1,13 @@ +POSTGRES_DATABASE=explorer +POSTGRES_USER=postgres +POSTGRES_PASSWORD=e5NvXK@NV5Q3XQMiwLMj@hppAaVdVXKvCFqhFPN@fiQE_zZdb&bh@VJmf333nNqC +POSTGRES_HOST=localhost +POSTGRES_PORT=15432 + +APP_PORT=3333 +APP_TOKEN_SECRET=2RkNMP&7Zfywapqdkxck@hS5&LKqTn&22HftTKwLxmSQ@5_AU@E&sWLLishAoRCJ +APP_HASH_SECRET=S7kKsmtszHQ2E9&3jQkTM&3gjDfbxbXiVWzhLYP9KTSbfZ7Cwd_a2TitXsNgwDW4 +APP_CYPHER_SECRET=Pz4Mhb2sEty92Ur4grHWfELhnFnz52nYFW4EUZi44j5Qo7@XYU5AjHwNP4aeY_xV +FRONTEND_ORIGIN=localhost +SIGNUP_ENABLE=true +REGISTER_CODE=36303630 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97848dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/node_modules/ +/drizzle/ +/dist/ +.backup.zip +.temp diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..89eb673 --- /dev/null +++ b/biome.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.6.4/schema.json", + "organizeImports": { + "enabled": true + }, + "files": { + "include": [ + "./src/**/*.ts" + ] + }, + "vcs": { + "enabled": true, + "clientKind": "git" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "performance": { + "recommended": true, + "noDelete": "off" + }, + "suspicious": { + "noExplicitAny": "warn" + }, + "complexity": { + "useLiteralKeys": "off" + } + } + }, + "formatter": { + "indentStyle": "tab", + "indentWidth": 2, + "lineWidth": 80 + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2b27a69 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +services: + database: + container_name: "b08-db" + image: 'postgres:latest' + env_file: + - .env + ports: + - "${POSTGRES_PORT}:5432" + environment: + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DATABASE} + volumes: + - './db-data/:/var/lib/postgresql/data/' \ No newline at end of file diff --git a/nest-cli.json b/nest-cli.json new file mode 100644 index 0000000..f9aa683 --- /dev/null +++ b/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..64f86c6 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..95f5641 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "forceConsistentCasingInFileNames": false, + "noFallthroughCasesInSwitch": false + } +}