/frontend

EmCasa Web Client

Primary LanguageJavaScriptMIT LicenseMIT

Real Estate Web Client

Pre-requisites

  • Node (10.9.x)
  • Yarn

Install

yarn install

Run

  1. Make sure you have our backend up and running.
  2. Then, go to your AccountKit settings and get both your App Id and App Secret.
  3. Run FACEBOOK_APP_ID=yourAppId ACCOUNT_KIT_APP_SECRET=yourAppSecret yarn start
  4. Check http://localhost:3000/

With docker

Before anything else, you must ave docker and docker-compose installed in your system.

  1. Ensure backend services are up and running.
  2. Copy .local.env.example as .local.env and substitute all keys with proper values.
  3. Start all services with docker-compose up -d.
  4. Start next.js with docker-compose exec frontend yarn start.

To use https locally, check the instructions in the README from backend, the frontend will be available in https://dev.emcasa.com.

Tests

yarn test to run automated unit, integration and end to end tests with Jest and Cypress.

If you want to open Cypress UI to run end to end tests manually, watch the process and use debugging tools run yarn cy:open.

Bundle Analyzer

yarn analyze to build the app and run the bundle analyzer tool.

Output file with bundle sizes will be created at .next/stats.txt

Contribute

Feel free to open issues and PRs.