Skip to content

Commit c2a572f

Browse files
committed
code base init
0 parents  commit c2a572f

17 files changed

+7309
-0
lines changed

.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# compiled output
2+
/dist
3+
/node_modules
4+
/build
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
pnpm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# OS
16+
.DS_Store
17+
18+
# Tests
19+
/coverage
20+
/.nyc_output
21+
22+
# IDEs and editors
23+
/.idea
24+
.project
25+
.classpath
26+
.c9/
27+
*.launch
28+
.settings/
29+
*.sublime-workspace
30+
31+
# IDE - VSCode
32+
.vscode/*
33+
!.vscode/settings.json
34+
!.vscode/tasks.json
35+
!.vscode/launch.json
36+
!.vscode/extensions.json
37+
38+
# dotenv environment variable files
39+
.env
40+
.env.development.local
41+
.env.test.local
42+
.env.production.local
43+
.env.local
44+
45+
# temp directory
46+
.temp
47+
.tmp
48+
49+
# Runtime data
50+
pids
51+
*.pid
52+
*.seed
53+
*.pid.lock
54+
55+
# Diagnostic reports (https://nodejs.org/api/report.html)
56+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

.nvmrc

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

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TC Review API
2+
3+
Review API built on modern frameworks for managing all review-related Topcoder needs.
4+
5+
## Project setup
6+
7+
```bash
8+
$ pnpm install
9+
```
10+
11+
## Compile and run the project
12+
13+
```bash
14+
# development
15+
$ pnpm run start
16+
17+
# watch mode
18+
$ pnpm run start:dev
19+
20+
# production mode
21+
$ pnpm run start:prod
22+
```
23+
24+
## Run tests
25+
26+
```bash
27+
# unit tests
28+
$ pnpm run test
29+
30+
# e2e tests
31+
$ pnpm run test:e2e
32+
33+
# test coverage
34+
$ pnpm run test:cov
35+
```

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// @ts-check
2+
import eslint from '@eslint/js';
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4+
import globals from 'globals';
5+
import tseslint from 'typescript-eslint';
6+
7+
export default tseslint.config(
8+
{
9+
ignores: ['eslint.config.mjs'],
10+
},
11+
eslint.configs.recommended,
12+
...tseslint.configs.recommendedTypeChecked,
13+
eslintPluginPrettierRecommended,
14+
{
15+
languageOptions: {
16+
globals: {
17+
...globals.node,
18+
...globals.jest,
19+
},
20+
ecmaVersion: 5,
21+
sourceType: 'module',
22+
parserOptions: {
23+
projectService: true,
24+
tsconfigRootDir: import.meta.dirname,
25+
},
26+
},
27+
},
28+
{
29+
rules: {
30+
'@typescript-eslint/no-explicit-any': 'off',
31+
'@typescript-eslint/no-floating-promises': 'warn',
32+
'@typescript-eslint/no-unsafe-argument': 'warn'
33+
},
34+
},
35+
);

nest-cli.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
3+
"collection": "@nestjs/schematics",
4+
"sourceRoot": "src",
5+
"compilerOptions": {
6+
"deleteOutDir": true
7+
}
8+
}

package.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"name": "tc-review-api",
3+
"version": "0.0.1",
4+
"description": "",
5+
"author": "",
6+
"private": true,
7+
"license": "UNLICENSED",
8+
"scripts": {
9+
"build": "nest build",
10+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
11+
"start": "nest start",
12+
"start:dev": "nest start --watch",
13+
"start:debug": "nest start --debug --watch",
14+
"start:prod": "node dist/main",
15+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
16+
"test": "jest",
17+
"test:watch": "jest --watch",
18+
"test:cov": "jest --coverage",
19+
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
20+
"test:e2e": "jest --config ./test/jest-e2e.json"
21+
},
22+
"dependencies": {
23+
"@nestjs/common": "^11.0.1",
24+
"@nestjs/core": "^11.0.1",
25+
"@nestjs/platform-express": "^11.0.1",
26+
"reflect-metadata": "^0.2.2",
27+
"rxjs": "^7.8.1"
28+
},
29+
"devDependencies": {
30+
"@eslint/eslintrc": "^3.2.0",
31+
"@eslint/js": "^9.18.0",
32+
"@nestjs/cli": "^11.0.0",
33+
"@nestjs/schematics": "^11.0.0",
34+
"@nestjs/testing": "^11.0.1",
35+
"@swc/cli": "^0.6.0",
36+
"@swc/core": "^1.10.7",
37+
"@types/express": "^5.0.0",
38+
"@types/jest": "^29.5.14",
39+
"@types/node": "^22.10.7",
40+
"@types/supertest": "^6.0.2",
41+
"eslint": "^9.18.0",
42+
"eslint-config-prettier": "^10.0.1",
43+
"eslint-plugin-prettier": "^5.2.2",
44+
"globals": "^15.14.0",
45+
"jest": "^29.7.0",
46+
"prettier": "^3.4.2",
47+
"source-map-support": "^0.5.21",
48+
"supertest": "^7.0.0",
49+
"ts-jest": "^29.2.5",
50+
"ts-loader": "^9.5.2",
51+
"ts-node": "^10.9.2",
52+
"tsconfig-paths": "^4.2.0",
53+
"typescript": "^5.7.3",
54+
"typescript-eslint": "^8.20.0"
55+
},
56+
"jest": {
57+
"moduleFileExtensions": [
58+
"js",
59+
"json",
60+
"ts"
61+
],
62+
"rootDir": "src",
63+
"testRegex": ".*\\.spec\\.ts$",
64+
"transform": {
65+
"^.+\\.(t|j)s$": "ts-jest"
66+
},
67+
"collectCoverageFrom": [
68+
"**/*.(t|j)s"
69+
],
70+
"coverageDirectory": "../coverage",
71+
"testEnvironment": "node"
72+
}
73+
}

0 commit comments

Comments
 (0)