Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
21f73cd
Entire schema for WPCAS Service.
Oct 6, 2023
34eee8e
schema relation updated
Ajay-Maury Oct 9, 2023
8570f3b
Merge pull request #8 from COMPASS-DPG/fix/schema-update
Ajay-Maury Oct 10, 2023
b164de8
updated docker
Ajay-Maury Oct 11, 2023
d6ea0af
error handling
Ajay-Maury Oct 11, 2023
ba4fd51
Merge pull request #15 from COMPASS-DPG/feature/error-handling
Ajay-Maury Oct 11, 2023
51137f0
Prisma scripts added
Ajay-Maury Oct 12, 2023
24a740a
mock folder
Ajay-Maury Oct 6, 2023
416707d
mock folder
Ajay-Maury Oct 6, 2023
1c702ca
User, Level and Team APIs implemented
Ajay-Maury Oct 6, 2023
89e7d4b
Added error handling
Ajay-Maury Oct 8, 2023
39bac28
removed extra files
Ajay-Maury Oct 8, 2023
5c8ea7f
Role, Competency and Competency Level APIs.
Oct 10, 2023
7bc5aeb
Added types for swagger docs. And improved error handling.
Oct 10, 2023
4ff81fd
Added APIs to assign a role to "CONSUMER" and get all FRAC data for a…
Oct 12, 2023
545634c
Merge pull request #22 from COMPASS-DPG/feature/prisma-scripts
Ajay-Maury Oct 12, 2023
c9477bf
Resolved review changes
Ajay-Maury Oct 12, 2023
29663bf
Merge pull request #12 from COMPASS-DPG/feature/mockUserService
Ajay-Maury Oct 13, 2023
37fe8b3
Response tracer APIs created
Ajay-Maury Oct 10, 2023
f571b55
Merge pull request #16 from COMPASS-DPG/feature/response-tracer
Ajay-Maury Oct 13, 2023
bd046a1
Added sorveyForm module.
Oct 11, 2023
6f75d59
Updated Response DTO and removed global serializer.
Oct 13, 2023
f7cf161
Merge pull request #23 from COMPASS-DPG/feature/survey-form
Ajay-Maury Oct 13, 2023
377d78a
Survey score APIs created
Ajay-Maury Oct 11, 2023
dae71cc
Merge pull request #17 from COMPASS-DPG/feature/surveyScore
Ajay-Maury Oct 13, 2023
d3b49d7
Created API for the question bank
prashantesmagico Oct 12, 2023
29abd3c
Removed createdAt and UpdaredAt fields from create and update DTOs.
Oct 13, 2023
93c402f
Merge pull request #21 from COMPASS-DPG/feature/question-bank
Ajay-Maury Oct 13, 2023
d0b664d
API for survey config and survey parameter
prashantesmagico Oct 11, 2023
60ee21a
Changes as per PR review
prashantesmagico Oct 11, 2023
3b0eab7
Merge pull request #18 from COMPASS-DPG/feature/survey-config-parameter
Ajay-Maury Oct 13, 2023
7a27385
competencyLevelId-dto added
Ajay-Maury Oct 13, 2023
f3cb4bd
updated required fields
Ajay-Maury Oct 13, 2023
73cb507
updated required fields
Ajay-Maury Oct 13, 2023
71bad4b
updated required fields
Ajay-Maury Oct 13, 2023
85378ad
Changed "Team" to "Department". Added Many to One ralation from "Comp…
Oct 13, 2023
26fbc2d
Merge pull request #24 from COMPASS-DPG/fix/teamToDepartmentChange
Ajay-Maury Oct 16, 2023
2856530
Schema Changes.
Oct 17, 2023
81c7baa
Merge pull request #27 from COMPASS-DPG/fix/schemaChanges
VamshiBatta07 Oct 17, 2023
d8dd64e
Relation name correction in SurveyForm Model.
Oct 17, 2023
fa28c78
Merge pull request #28 from COMPASS-DPG/fix/schemaChanges
VamshiBatta07 Oct 17, 2023
8d6bb16
Schema update for SurveyCycleParameter.
Oct 18, 2023
bdd44d3
Survey Form Module update according to the changes in schema.
Oct 18, 2023
4e69874
fixes for the question bank module as per prisma schema changes.
prashantesmagico Oct 18, 2023
2330c3d
Detatched Role to User relation, added designation table for mock.
Oct 18, 2023
8dd8e60
fixes for the survey score module as per prisma schema changes.
prashantesmagico Oct 18, 2023
5f506ef
Merge pull request #29 from COMPASS-DPG/fix/user-surveyform-api
VamshiBatta07 Oct 18, 2023
0744067
Merge pull request #30 from COMPASS-DPG/fix/survey-score-and-question…
Ajay-Maury Oct 18, 2023
ed17e68
Survey config and survey parameter fixes
Ajay-Maury Oct 18, 2023
69d3964
fixes for the response tracker module as per prisma schema changes.
prashantesmagico Oct 18, 2023
e80f52a
chages as per PR review
prashantesmagico Oct 18, 2023
dfcf089
changes as per PR review.
prashantesmagico Oct 18, 2023
4cae517
Changes as per PR review.
prashantesmagico Oct 18, 2023
1c9804f
Merge pull request #32 from COMPASS-DPG/fix/response-tracker
Ajay-Maury Oct 18, 2023
5c5ab45
Merge pull request #31 from COMPASS-DPG/fix/survey-config-&-parameter
Ajay-Maury Oct 18, 2023
b6d8eda
Created the crud APIs for the admin department
prashantesmagico Oct 18, 2023
be2e7d6
Mock Designation APIs.
Oct 18, 2023
959cd92
refactor
prashantesmagico Oct 18, 2023
829f264
Added the optional field description in the Admin department prisma …
prashantesmagico Oct 18, 2023
37cc2d1
Admin competency module and APIs
Ajay-Maury Oct 18, 2023
b9ce338
Response tracker JSON data fix
Ajay-Maury Oct 19, 2023
d08d5a3
Added UserMetaData APIs.
Oct 19, 2023
c7ce31a
UserMetadata schema update.
Oct 19, 2023
8e24329
Updated DTO and APIs for JSON data
Ajay-Maury Oct 19, 2023
4668881
fixed Patch API
Ajay-Maury Oct 19, 2023
22a7306
Changed update API as a post request. Added API to connect roles to d…
Oct 19, 2023
0af6b4b
Added Swagger decorators.
Oct 19, 2023
588f543
Merge pull request #37 from COMPASS-DPG/fix/response-tracer
VamshiBatta07 Oct 19, 2023
4d13a40
Added the department service relation with adminDepartment.
prashantesmagico Oct 19, 2023
d5269f9
Merge pull request #34 from COMPASS-DPG/feature/designation
VamshiBatta07 Oct 19, 2023
d07b034
Bump @babel/traverse from 7.23.0 to 7.23.2
dependabot[bot] Oct 19, 2023
2396063
Merge pull request #40 from COMPASS-DPG/dependabot/npm_and_yarn/babel…
Ajay-Maury Oct 20, 2023
35cb2df
Merge pull request #38 from COMPASS-DPG/feature/admin-competency
VamshiBatta07 Oct 20, 2023
a6303ec
Merge branch 'dev-test' into feature/userMetadata
VamshiBatta07 Oct 20, 2023
49eb9f7
Merge pull request #39 from COMPASS-DPG/feature/userMetadata
Ajay-Maury Oct 20, 2023
20b1e35
UserMetadata Fix.
Oct 25, 2023
6707c66
SurveyForm APIs fix.
Oct 25, 2023
b6a20d8
Api created to calculate survey score
Ajay-Maury Oct 20, 2023
3ff6ade
updated score calculation API
Ajay-Maury Oct 25, 2023
fb5d577
APIs to fetch user survey scores
Ajay-Maury Oct 25, 2023
3b655b8
schema change for question bank and changes in question bank API
prashantesmagico Oct 25, 2023
ed11e47
Csv file upload API.
prashantesmagico Oct 25, 2023
6690ccd
Added package-lock.json
prashantesmagico Oct 25, 2023
1347821
competency level id removed
Ajay-Maury Oct 26, 2023
fc3299f
Changes as per PR Review
prashantesmagico Oct 26, 2023
0b43ac5
removed the API for updating and creating and updating admin departme…
prashantesmagico Oct 26, 2023
57a6e60
Merge branch 'dev-test' into feature/admin-department
prashantesmagico Oct 26, 2023
67658e9
Merge pull request #33 from COMPASS-DPG/feature/admin-department
prashantesmagico Oct 26, 2023
6fcf63e
Merge pull request #42 from COMPASS-DPG/feature/surverscore-calculati…
VamshiBatta07 Oct 27, 2023
66d8808
Schema changes and changes in related module
prashantesmagico Oct 27, 2023
7370569
API for user to map with questions using competencyId and competencyL…
prashantesmagico Oct 27, 2023
b37c696
Merge branch 'dev-test' into feature/user-mapping-with-question
prashantesmagico Oct 30, 2023
84dd987
Merge pull request #47 from COMPASS-DPG/feature/user-mapping-with-que…
VamshiBatta07 Oct 30, 2023
f4d5b82
Changes as per PR review and refactor.
prashantesmagico Oct 30, 2023
3a37d14
Changes as per PR review and refactor.
prashantesmagico Oct 30, 2023
4ec7ecc
Refactor as per PR review
prashantesmagico Oct 30, 2023
b708e90
Merge branch 'dev-test' into feature/question-bank-bulk-upload
prashantesmagico Oct 30, 2023
a06ef68
Revert and added back the file upload module
prashantesmagico Oct 31, 2023
b414260
Merge branch 'feature/question-bank-bulk-upload' of https://github.co…
prashantesmagico Oct 31, 2023
820d10f
API updates needed for the CRON Service.
Oct 31, 2023
eb3b0bb
Core Survey APIs and CRON Service.
Oct 31, 2023
725dc6d
Optimizing SurveyScore module.
Oct 31, 2023
d88761c
Removeing unnecessary comments.
Oct 31, 2023
26b90f1
Refactor and imported services from file upload module
prashantesmagico Oct 31, 2023
d15391f
Merge pull request #43 from COMPASS-DPG/feature/question-bank-bulk-up…
VamshiBatta07 Oct 31, 2023
0286885
Merge branch 'dev-test' into feature/cron-setup
VamshiBatta07 Oct 31, 2023
252719a
Merge pull request #48 from COMPASS-DPG/feature/cron-setup
VamshiBatta07 Oct 31, 2023
ef4434c
Fix for dependancy errors after resolving merge conflicts.
Oct 31, 2023
c689e7b
Merge pull request #50 from COMPASS-DPG/fix/dependancy-error
Ajay-Maury Oct 31, 2023
62a6a11
updated
Ajay-Maury Nov 2, 2023
0622847
User metadata, admin department and admin competency data sync APIs
Ajay-Maury Nov 2, 2023
a33ad0d
updated
Ajay-Maury Nov 2, 2023
13da283
Merge pull request #57 from COMPASS-DPG/feature/data-sync-APIs
VamshiBatta07 Nov 2, 2023
4e8daa3
added the unit test-cases
prashantesmagico Oct 27, 2023
8214837
Prisma Module updated for testcases. And test cases for SurveyConfigM…
Oct 31, 2023
076055c
Survey Form unit test cases
Ajay-Maury Oct 31, 2023
9671ca2
Response tracker and survey score unit test cases
Ajay-Maury Oct 31, 2023
e35911c
Seeds for Mock: User, Designation, Department and Roles.
Nov 1, 2023
aa84820
Seeding for Levels, CompetencyLevels, Competencies, Roles to competen…
Ajay-Maury Nov 1, 2023
a52160e
Updated seed data
Ajay-Maury Nov 1, 2023
9043e84
Added testcases for the survey cycle parameter
prashantesmagico Nov 1, 2023
e8a65b4
Added testcases for admin
prashantesmagico Nov 1, 2023
532a8b3
Refactor
prashantesmagico Nov 1, 2023
75e75c3
Latest Survey, response and survey form for user APIs
Ajay-Maury Nov 2, 2023
9238291
User Metadata unit test cases and needed path changes.
Nov 2, 2023
7a726a8
Updated user metadata unit test cases.
Nov 3, 2023
e71cf80
updated
Ajay-Maury Nov 3, 2023
da5e2bb
Merge pull request #58 from COMPASS-DPG/feature/additional-APIs
Ajay-Maury Nov 3, 2023
1dd987d
User seed data update.
Nov 3, 2023
9cf3f0b
bugs fixed
Ajay-Maury Nov 3, 2023
8bdb7a7
Latest Survey, response and survey form for user APIs
Ajay-Maury Nov 2, 2023
e9da377
updated
Ajay-Maury Nov 3, 2023
c94278f
bugs fixed
Ajay-Maury Nov 3, 2023
0d1796d
Added the working testcases
prashantesmagico Nov 6, 2023
add2af4
removed unwanted test api
prashantesmagico Nov 6, 2023
505aaa7
Merge branch 'unit-testcases' into admin-question-bank-testcases
prashantesmagico Nov 6, 2023
5c5b165
Response tracker & survey score APIs modified
Ajay-Maury Nov 6, 2023
1f57238
Merge pull request #59 from COMPASS-DPG/admin-question-bank-testcases
VamshiBatta07 Nov 7, 2023
57e7974
Merge pull request #60 from COMPASS-DPG/fix/response-tracker
VamshiBatta07 Nov 7, 2023
dfd4da6
Resolving Import errors.
Nov 7, 2023
ba18163
Added API to fetch Competency Names only.
Nov 7, 2023
874cba6
Added API to Create, Update and Delete Multiple Questions.
Nov 8, 2023
f5dd6e1
Added competency Id check when creating new Question.
Nov 8, 2023
0adb5b1
Added "ArrayNotEmpty" class validator to CreateUpdateDeleteQuesitonsDto.
Nov 8, 2023
2e267c0
Merge pull request #64 from COMPASS-DPG/feature/newQuestionBankAPI
VamshiBatta07 Nov 8, 2023
0c7d4ce
Testcases for survey
prashantesmagico Nov 8, 2023
efa378b
refactor
prashantesmagico Nov 8, 2023
2ca181a
Merge pull request #65 from COMPASS-DPG/survey-testcases
Ajay-Maury Nov 8, 2023
bd4566e
TestCases for survey score
prashantesmagico Nov 8, 2023
6fe93be
Merge pull request #66 from COMPASS-DPG/survey-score-testcases
VamshiBatta07 Nov 9, 2023
31e4a4a
Merge branch 'dev-test' into unit-testcases
prashantesmagico Nov 9, 2023
9782985
Fixes and refactoring of unit testcases
prashantesmagico Nov 10, 2023
b17e0b7
Merge pull request #69 from COMPASS-DPG/fix/test-cases
Ajay-Maury Nov 10, 2023
9f93257
Merge pull request #46 from COMPASS-DPG/unit-testcases
Ajay-Maury Nov 10, 2023
004400d
Removing Department from schema.
Nov 8, 2023
b57040a
Removing Department model from MockModels.
Nov 8, 2023
8ab572c
Upadte prisma schema.
Nov 8, 2023
9fe9c6c
Added "UserMapping" table.
Nov 14, 2023
b13b59e
Removing Department and SurveyCycle Parameter APIs.
Nov 14, 2023
fae5f04
Updating seed data.
Nov 14, 2023
4340c26
API for question bank template
prashantesmagico Nov 14, 2023
9eb5068
API for question bank template
prashantesmagico Nov 14, 2023
cedd316
Question bank template API
prashantesmagico Nov 14, 2023
7ceff30
Minor schema changes. And survey logic updates after removing departm…
Nov 15, 2023
d25c8f7
Bug fixed for the API to fetch the surveys to be filled (response tra…
Nov 15, 2023
c7be9d7
API for question bank template
prashantesmagico Nov 15, 2023
3172210
Bug fixed for the API to fetch the surveys to be filled (response tra…
Nov 15, 2023
b1f7085
Bug fix for the fetch response tracker by assessorId API.
Nov 15, 2023
6eef3be
Merge pull request #70 from COMPASS-DPG/feature/question-bank-template
VamshiBatta07 Nov 15, 2023
96cb4d5
Fixes suggested for PR.
Nov 15, 2023
1bfa789
Bug fixes for question bank bulk upload
prashantesmagico Nov 15, 2023
f28be5b
Merge pull request #72 from COMPASS-DPG/fix/question-bank-bulk-upload
VamshiBatta07 Nov 15, 2023
9b63bc1
Added API to fetch WPCAS home screen data, fixed update survey config…
Nov 15, 2023
11014b4
Added API to fetch sample user mapping data.
Nov 15, 2023
429f696
Fetch extra userData for fetch-latest-survey-form API.
Nov 15, 2023
fc0c79b
Removing default pagination applied for SurveyConfigFilterDto.
Nov 15, 2023
e781d67
Added wpcasScore to FetchAllUserMetadata API.
Nov 16, 2023
5717005
Bug fix for the fetch response tracker by assessorId API.
Nov 15, 2023
34ff05c
API for question bank template
prashantesmagico Nov 14, 2023
5da8ade
API for question bank template
prashantesmagico Nov 14, 2023
0ec49a1
Question bank template API
prashantesmagico Nov 14, 2023
748d921
API for question bank template
prashantesmagico Nov 15, 2023
d057d22
Bug fixes for question bank bulk upload
prashantesmagico Nov 15, 2023
0df3b81
Minor schema changes. And survey logic updates after removing departm…
Nov 15, 2023
9cbb617
Bug fixed for the API to fetch the surveys to be filled (response tra…
Nov 15, 2023
bc3d6f0
Bug fixed for the API to fetch the surveys to be filled (response tra…
Nov 15, 2023
edd1b0f
Merge branch 'dev-test' into fix/remove-department-logic
VamshiBatta07 Nov 16, 2023
48f4402
Minor code fixes after a PR review.
Nov 17, 2023
f2bb589
Removed duplicate "UserMappingFileUploadDto".
Nov 17, 2023
470f7dd
Remove whitespaces while formatting the assessorIds string fetched fr…
Nov 17, 2023
322a489
Delete existing userMapping when updating a surveyConfig if the userM…
Nov 17, 2023
ee0dfef
Added a check to determine if the survey is active or not for generat…
Nov 17, 2023
dbb36bc
adding dockerfile fixes
Nov 20, 2023
af5a81d
Bug fix for "fetchLatestSurveyScoreByUserId".
Nov 22, 2023
7c95b71
Merge pull request #71 from COMPASS-DPG/fix/remove-department-logic
VamshiBatta07 Nov 22, 2023
05c657f
removal of Level and related changes in mockUser service and question…
prashantesmagico Nov 22, 2023
90ace96
Level and LevelNumber removal and fixes
prashantesmagico Nov 23, 2023
1efda5f
Merge pull request #76 from COMPASS-DPG/fix/remove/LevelFromUser
prashantesmagico Nov 27, 2023
61a1062
Fix for cors issue
prashantesmagico Dec 5, 2023
2385992
Minor fix
prashantesmagico Dec 5, 2023
c9adbc5
Merge pull request #77 from COMPASS-DPG/fix/cors-issue
prashantesmagico Dec 5, 2023
e80afd7
Merge pull request #74 from COMPASS-DPG/dev-test
VamshiBatta07 Dec 6, 2023
fb7d4f3
assessor-survey-response-fix
Ajay-Maury Dec 13, 2023
dbee7ae
Merge pull request #79 from COMPASS-DPG/fix/assessor-survey-response
aman1esmagico Dec 13, 2023
7ace3f6
feat(docker): setting it up for external postgres
Dec 13, 2023
4b9a138
Merge pull request #81 from COMPASS-DPG/feature/migrations
aman1esmagico Dec 13, 2023
cca439a
Integrating SunbirdRC and Passbook.
Dec 12, 2023
6d48a37
commit 2.
Dec 12, 2023
cc02cea
Bug Fixes.
Dec 14, 2023
d9ef5a8
Credential table migration and bug fixes.
Dec 14, 2023
581badc
CRON job, sunbirdRC and credential tabled api bug fixes.
Dec 14, 2023
40f77d6
Removing unnecessary functions.
Dec 14, 2023
d951c02
Merge pull request #84 from COMPASS-DPG/feature/external-services
aman1esmagico Dec 15, 2023
ccd9ba9
removed credentials check when setting up a survey.
Dec 15, 2023
177e59d
Updated readme.
Dec 15, 2023
39d34d4
Merge pull request #85 from COMPASS-DPG/fix/survey-setup
aman1esmagico Dec 15, 2023
3b1b6ee
Bug fix for sunbirdRc's issue credential API.
Dec 19, 2023
5c19a57
Merge pull request #86 from COMPASS-DPG/fix/issue-sunbird-creds
Ajay-Maury Dec 20, 2023
549aa0c
External service configuration improvement.
Dec 20, 2023
fe5a9a1
Merge pull request #88 from COMPASS-DPG/fix/passbook-sunbird-url-config
Ajay-Maury Dec 20, 2023
4c0b1cc
SunbirdRc and SurveyCron bug fixes.
Dec 20, 2023
8048428
Merge pull request #89 from COMPASS-DPG/fix/sunbirdrc-surveycron-bugf…
Ajay-Maury Dec 22, 2023
702bcb4
example env update
Mar 27, 2024
b32035e
Merge pull request #95 from COMPASS-DPG/feature/env_update
Ajay-Maury Mar 27, 2024
a3da6d5
partial commit.
Mar 27, 2024
f5ad260
Tarento API Integration (user and Frac).
Apr 5, 2024
1137cb0
New API for 3cp portal.
Apr 8, 2024
7275f3e
Merge pull request #99 from COMPASS-DPG/feature/integrating_tarento_apis
VamshiBatta07 Apr 8, 2024
2123e97
Update sync all users API.
Apr 16, 2024
fa6457e
Created user sync CRON and frac sync CRON update.
Apr 16, 2024
fdcc002
Merge pull request #100 from COMPASS-DPG/feature/all-user-sync
VamshiBatta07 Apr 16, 2024
44c85e3
fixing designation to role mapping.
Apr 16, 2024
c0861e1
disabling seeding.
Apr 16, 2024
e4dc6de
Merge pull request #101 from COMPASS-DPG/fix/designation-to-role-mapping
VamshiBatta07 Apr 17, 2024
2882c87
fix: user api integration in createOrUpdateUserMetadata API
Apr 17, 2024
e1554b1
Merge pull request #102 from COMPASS-DPG/fix/user-api-integration
VamshiBatta07 Apr 17, 2024
c0d718d
Update .env.example
kh4l1d64 Apr 17, 2024
05193f1
Merge pull request #103 from COMPASS-DPG/kh4l1d64-patch-1
VamshiBatta07 Apr 17, 2024
816acbc
Creating views for Metabase.
Jul 17, 2024
a07e686
Merge pull request #106 from COMPASS-DPG/feature/create-views
VamshiBatta07 Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/
node_modules/
dist/
npm-debug.log
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
NODE_ENV=development
APP_NAME="WPCAS Survey API"
API_PREFIX=api
APP_PORT=

DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_NAME=
TELEMETRY_DATABASE_NAME=
DATABASE_PORT=
PASSBOOK_SERVICE_URL=
SUNBIRD_SERVICE_URL=
DATABASE_URL=postgresql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@172.17.0.1:${DATABASE_PORT}/${DATABASE_NAME}?schema=public
USER_SERVICE_TOKEN=
USER_SERVICE_COOKIE=
USER_SERVICE_URL=
FRAC_SERVICE_URL=
##expression configured to trigger the CRON job EVERY_WEEKEND
FRAC_CRON_EPX="0 0 * * 6,0"
USER_CRON_EPX="0 0 * * 6,0"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# compiled output
dist
node_modules
.data

# enviornment variables
.env
Expand Down
33 changes: 14 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# Use the official Node.js 18 image as a base
FROM node:18.16.1-alpine

# Install bash for debugging purposes (optional)
RUN apk add --no-cache bash

# Install global Node.js packages for NestJS development
RUN npm i -g @nestjs/cli typescript ts-node

# Set the working directory inside the container
Expand All @@ -9,33 +14,23 @@ WORKDIR /usr/src/app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Copy the Prisma configuration and migration files
# This line copies the "prisma" directory from your project's root into the Docker container's working directory.
COPY prisma ./prisma/
COPY env-example ./.env
# Install project dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# Expose the PORT environment variable (default to 4000 if not provided)
ARG PORT=4010
ENV PORT=$APP_PORT


# COPY package*.json /tmp/app/
# RUN cd /tmp/app && npm install

# COPY . /usr/src/app
# RUN cp -a /tmp/app/node_modules /usr/src/app
# COPY ./wait-for-it.sh /opt/wait-for-it.sh
# COPY ./startup.dev.sh /opt/startup.dev.sh
# RUN sed -i 's/\r//g' /opt/wait-for-it.sh
# RUN sed -i 's/\r//g' /opt/startup.dev.sh

# RUN cp env-example .env

# Build your Nest.js application
RUN npm run build

# Expose the PORT environment variable (default to 4000 if not provided)
ARG PORT=4000
ENV PORT=$PORT
EXPOSE $PORT

# Start the Nest.js application using the start:prod script
CMD ["npm", "run", "start:prod"]

# CMD ["/opt/startup.dev.sh"]
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# Microservice boilerplate
# WPCAS - Workplace Competency Assessment Score

## About

WPCAS is a vital component of COMPASS, a goal-oriented human resource management system (GO-HRM) designed to help organizations align their objectives with well-defined targets for teams and individuals. This system maps competencies required to achieve these targets and establishes a connection between capacity and performance management.

WPCAS specifically focuses on Workplace Competency Assessment Scores, offering a comprehensive 360-degree feedback survey for employees. This survey involves input from juniors, seniors, and colleagues, providing valuable insights into an employee's strengths and weaknesses based on workplace performance.

## Tech Stack

- **Language:** TypeScript
- **Database:** PostgreSQL
- **ORM:** Prisma
- **Framework:** NestJS
- **Node Version:** 18.16.1-alpine

## Setup

1. Install the necessary package dependencies:
```bash
npm i
```

2. Set up PostgreSQL in your local environment.

3. Configure environment variables:
- Create an environment variable file (e.g., `.env`) using the example file as a reference.

4. Generate Prisma migrations:
```bash
npx prisma migrate dev
```
- If seed data is required, populate it by running:
```bash
npx prisma db seed
```
or for a complete reset (including deleting all previous data):
```bash
npx prisma migrate reset
```

5. Running a Local Development Server:
```bash
npm run start:dev
```
- Access the Swagger API documentation at `http://YOUR_APP_PORT/api/docs`

## License

This project is licensed under the [LICENSE NAME] - see the [LICENSE.md](LICENSE.md) file for details.
51 changes: 20 additions & 31 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
services:
postgres:
image: postgres:15.3-alpine
ports:
- ${DATABASE_PORT}:5432
volumes:
- ./.data/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}

# maildev:
# build:
# context: .
# dockerfile: maildev.Dockerfile
# ports:
# - ${MAIL_CLIENT_PORT}:1080
# - ${MAIL_PORT}:1025

# adminer:
# image: adminer
# restart: always
# ports:
# - 8080:8080

# Uncomment to use redis
# redis:
# image: redis:7-alpine
# ports:
# - 6379:6379
version: '3'

services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- ${APP_PORT}:${APP_PORT}
networks:
- samagra_compass

networks:
samagra_compass:
external: true

# postgres:
# image: postgres:15.3-alpine
# ports:
# - ${DATABASE_PORT}:5432
# volumes:
# - ./.data/db:/var/lib/postgresql/data
# environment:
# POSTGRES_USER: ${DATABASE_USERNAME}
# POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
# POSTGRES_DB: ${DATABASE_NAME}

17 changes: 13 additions & 4 deletions e2e.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
# CMD ["/opt/startup.ci.sh"]


# Use the official Node.js 18 image as a base
FROM node:18.16.1-alpine

# Install bash for debugging purposes (optional)
RUN apk add --no-cache bash

# Install global Node.js packages for NestJS development
RUN npm i -g @nestjs/cli typescript ts-node

# Set the working directory inside the container
Expand All @@ -31,18 +35,23 @@ WORKDIR /usr/src/app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Copy the Prisma configuration and migration files
# This line copies the "prisma" directory from your project's root into the Docker container's working directory.
COPY prisma ./prisma/

# Install project dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# Expose the PORT environment variable (default to 4000 if not provided)
ARG PORT=4010
ENV PORT=$APP_PORT

# Build your Nest.js application
RUN npm run build

# Expose the PORT environment variable (default to 4000 if not provided)
ARG PORT=4000
ENV PORT=$PORT
EXPOSE $PORT

# Start the Nest.js application using the start:prod script
CMD ["npm", "run", "start:prod"]
10 changes: 0 additions & 10 deletions env-example

This file was deleted.

Loading