This repository is the web application for the GC Forms platform product.
- Explore it here: https://forms-staging.cdssandbox.xyz/.
This is a Next.js and is built with:
- Next.js >= 14.x
- Sass (Syntactically Awesome Style Sheets) for reusable styles
- Tailwindcss a utility-first css framework for rapidly building custom designs
- PostCSS
- Prisma
Clone the forms-terraform repository and follow the instructions in our README to launch the Localstack infrastructure locally.
git clone https://github.com/cds-snc/forms-terraform.gitClone this repository
git clone https://github.com/cds-snc/platform-forms-client.gitInstall dependencies
cd platform-forms-client
yarn installCreate an .env file at the root of the project and use the .env.example as a template. If you want you can find a ready to use version of the .env file in 1Password > Local Development .ENV secure note
yarn devBrowse web application on http://localhost:3000.
A GUI manager is installed with prisma and can be launched with yarn prisma:studio
For more information about developing with prisma migrate please visit: https://www.prisma.io/docs/guides/database/developing-with-prisma-migrate
You can optionally install a GUI manager like pgAdmin4 (MacOS download link) if you would like. Here are the credentials to access your local PostgreSQL instance:
Hostname/Address: 127.0.0.1
Port: 4510
Maintenance database: forms
Username: localstack_postgres
Password: chummy
You can download RedisInsight (see download link at the bottom of this page).
Here are the credentials to access your local Redis instance:
Host: localhost
Port: 6379
There are several ways to connect to the database, but here's how to do it through Prisma Studio:
- Login using your Staging account
- Launch prisma studio with
yarn prisma:studioor if you have prisma installed globallyprisma studio - A browser window will open at
localhost:5555. Open the modelUser - A table will appear. Find your username and add all the privileges under the
privilegescolumn. - Click on "Save Change" button in the top menu bar once completed.
Once the change is made, you will need to 'Log Out' and log back in. Alternatively, if you want to avoid logging out, you can open RedisInsight and delete the key named auth:privileges:<your_user_id>. Then you just need to refresh the web application for the new privileges to be applied.
See package.json scripts for jest, playwright, and vitest
Playwight is configured to run "yarn build:test && yarn start:test" for the web server