This codebase provides CRUD APIs over the PostgreSQL database containing standardized skills and its associations with members, challenges and jobs. It also provides a type-ahead API for suggestion of probable skills with each input.
- Node.js v22+
- pnpm (enable via
corepack enable pnpmif you use Node's bundled Corepack)
- Run
pnpm install - Run
pnpm prisma:generateto emit the Prisma client - Run
pnpm prisma:migrate:deployto apply the latest database schema - Run the docker compose file under
./localdirectory withdocker-compose up -d - Set env variable (using export, or create an
.envfile) forTC_SKILLS_DATABASE_URL=<AWS DEV DB URL FOR SKILLS> - Set env variable for
CHALLENGE_API_DATABASE_URL=<AWS DEV DB URL FOR CHALLENGE API>so challenge skills can be synchronized directly in the challenge service database - Set env variable for
MEMBER_DB_URL=<AWS DEV DB URL FOR MEMBERS>so member validations run directly against the member database (MEMBER_DB_SCHEMA,MEMBER_DB_TABLE, andMEMBER_DB_ID_COLUMNcan be provided when the defaults do not apply) - Connect to VPN
- Autocomplete endpoints now query PostgreSQL directly; OpenSearch is no longer required
- Start the API with
pnpm run start:devfor watch mode orpnpm run startafter runningpnpm run build
- Run
pnpm run db:initto create the database tables & seed initial data into it - Run
pnpm run db:syncto create any new tables based on the db models created insrc/db/models - Run
pnpm run db:seedto insert the seed data into the current db tables
- Run the postman collection under
./docs/postman
pnpm dlx sequelize-auto -h -d -u dbadmin -p 5432 --dialect postgres -o "./src/db/models" -l ts -t <table_name>