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:
- macOS/Linux: nvm
- Windows: nvm-windows
Environment Setup
This project requires environment variables to be set.
- Run the setup script to create your
.envfile:
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.
- Open the
.envfile 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
Recommended Method
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:
- Frontend: http://localhost:4200/
- Tablet: http://localhost:4300/
- Online Booking: http://localhost:4400/
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)
🧪 Test Automation (E2E)
This project uses a Git Submodule architecture for End-to-End testing. The Cypress test suite is located in apps/daily-desk-test-automation but is maintained in a separate repository to decouple the QA and Frontend lifecycles.
Installation
Option A: Fresh Clone (New Developers)
If you are cloning this repository for the first time, use the --recursive flag to automatically download the test submodule.
git clone --recursive git@github.com:daily-desk/daily-desk-test-automation.git
npm install
Option B: Existing Clone (Current Developers)
If you already have the project on your machine, you need to initialize the new submodule.
# 1. Pull the latest changes
git pull
# 2. Download and link the submodule content
git submodule update --init --recursive
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.