Thank you for taking the time to complete Exygy's take-home code assessment! If you have any questions about the assessment or directions at any time, please don't hesitate to reach out. This repo is a highly pared-down version of an Exygy product, Bloom. Bloom is a web application that helps people learn about, apply for, and gain access to affordable housing. Its two core pieces of functionality are providing information about individual listings and the ability to submit digital applications for those listings.
-
backend/core
contains backend services (e.g. listings) - information is stored in a postgres database and served over HTTPS to the frontend -
sites/public
contains the frontend React/Typescript application -
ui-components
contains our component library
This package is the home of the Bloom affordable housing system component library. The components are styled using Tailwind. This repo only contains a selection of them. Feel free to use any of our components as you work on the assessment.
The UI components package includes Storybook for easy browsing of the component tree, and can be used to help understand what's available, but should not be required for anything in the assessment.
To spin up Storybook locally, from within ui-components
run:
yarn start
To run the ui-components test suite which is built with Jest and RTL, from within ui-components
run:
yarn test
We have removed all but one of the tests to provide for you an example of how to set them up.
yarn install
Configuration of each app and service is read from environment variables. There is a .env.template
file in each app & service directory that must be copied to .env
(or equivalent). You will need to create this local env file from the templates in backend/core
and sites/public
.
The backend is a NestJS application that provides a core set of backend services via REST API endpoints. Information is stored in a Postgres database, accessed via TypeORM. OpenAPI (fka Swagger) documentation is automatically generated by the server at http://localhost:3100/docs/
in local development environments. You will not need to know details specific to any of these tools to complete the assessment.
If not already installed on your machine, you will need to install Node, Postgresql, and Redis. We are currently using Node version 12.22.1. The following commands are for macOS / Linux, but you can find equivalent instructions for Windows machines online.
You can install Node using Homebrew with the following command: brew install [email protected]
.
If you have multiple versions of Node installed, you can use nvm
(node version manager) to manage them. Ensure you're on the right version with node -v
.
You can install Postgres using Homebrew with the following command: brew install postgresql
.
You can start it with brew services start postgresql
.
You can install Redis using Homebrew with the following command: brew install redis
.
To start Redis:
redis-server
.
To launch Redis as a background service and restart at login:
brew services start redis
.
To test if Redis is working:
redis-cli ping
The main database used in this project is bloom
. The following command from within backend/core
should get your database set up.
yarn && yarn db:reseed
The above will create the bloom
DB for you, migrate it to the latest schema, and seed it with data. (If running the reseed command requires that you input a password for Postgres, set the following environment variables: PGUSER
to postgres and PGPASSWORD
to the default password you inputted for the postgres user during Postgres installation.)
If you see psql: error: FATAL: database "<user>" does not exist
you may need to run createdb <user>
first.
If you make edits to the database and want to get it back to its default state, you can run the above reseed command again at any time.
Once you've completed the above set-up steps, to start up the application, run the following from root:
yarn dev
This runs 2 processes:
- 3000 for the application
- 3100 for backend/core
You can view the assessment instructions from within the application.