Skip to content

DailyDesk

This project contains the frontend application for DailyDesk.

Prerequisites

It is recommended to use Node.js v16 for this project.

To manage multiple Node.js versions, we recommend using a version manager:

Environment Setup

This project requires environment variables to be set.

  1. Run the setup script to create your .env file:

    npm run setup:env
    

    Note: This script will copy the example file and attempt to look up AWS values if they are defined in .env.example.

  2. Open the .env file and configure any remaining variables. For local development, you can use the following values:

NX_API_URL=http://localhost:4000
NX_MAIN_APP_URL=http://localhost:4200

Installation

Install the project dependencies by running:

npm install

Running the Application for Local Development

To run all applications (Frontend, Tablet, and Online Booking) simultaneously in development mode, use the following command:

npm run start-all

Once started, you can access the applications at the following URLs:

Secondary Options

If you only need to run a specific application, you can use the individual start scripts:

  • Frontend: npm start (Runs on port 4200)
  • Tablet: npm run start-tablet (Runs on port 4300)
  • Online Booking: npm run start-booking (Runs on port 4400)

Running Unit Tests

Run the following command to execute the unit tests via Jest:

npm test

Linting

To lint the frontend application:

npm run lint

Understand your workspace

Run nx graph to see a diagram of the dependencies of your projects.

Further help

Visit the Nx Documentation to learn more.