opengovsg / checkfirst

Don't Know? CheckFirst. A tool to build eligibility checkers and calculators for Singapore Government policies
https://checkfirst.gov.sg
Other
12 stars 6 forks source link
hacktoberfest

CheckFirst

Don't Know? CheckFirst. A tool to build eligibility checkers and calculators for Singapore Government policies

Quick Start

git clone git@github.com:opengovsg/checkfirst
cd checkfirst
npm ci
npm run dev

Codebase Orientation - Server

Environment Variables

As defined in src/server/config

Entrypoints

Modules

Codebase Orientation - Client

Entrypoint

Possible Issues with Running Code + Solutions

Connection with postgres database

By default SQLite DB is used. For other available environments refer to: src/server/database/config/config.ts or edit the dialect for development environment to postgres

SQLite table not found

This may occur if the SQlite tables created is in the wrong format or required tables are not created

Add await sequelize.sync({ force:true }) to the src/server/bootstrap/index file after await sequelize.authenticate(). This will force all the tables in to be dropped and created again with the correct tables.

A potential long term fix for issues related to SQLite is to replace SQLite with a docker-compose environment for usage during development.

Performing Migrations

This section explains the steps required to perform remote database schema migrations using a bastion SSH instance.