diff --git a/README.md b/README.md index a763755..371629e 100644 --- a/README.md +++ b/README.md @@ -73,3 +73,42 @@ graph TD J --> K[(Their database)] end ``` + +## Getting Started + +This repository is managed with **Yarn workspaces** and **Lerna**. You will need +Node.js 16 (see `.nvmrc`) and Yarn 1 installed. + +1. Install dependencies and bootstrap all packages: + ```bash + yarn install + ``` +2. Start the databases required by the services: + ```bash + docker-compose up -d + ``` + This launches `api` on port `5432` and `notifapi` on port `5433`. +3. Run every package in development mode: + ```bash + yarn dev + ``` + Individual apps can be started with `yarn dev:webapp`, `yarn dev:www`, + `yarn dev:projector` and `yarn dev:admin`. +4. Copy the sample environment files when present. For example the webapp has + `src/.env.development.local.sample` which should be copied to + `src/.env.development.local`. + +The GraphQL API will be available on port `8080` once the server package starts +and Vite will launch the frontend apps on their respective ports. + +## Contributing + +Formatting is handled by **Prettier** and the pre-commit hook runs +`lerna run lint`. Before opening a pull request run: + +```bash +npx lerna run lint +``` + +Feel free to open issues or pull requests against the `main` branch once your +changes are tested locally. diff --git a/packages/frontend-common/README.md b/packages/frontend-common/README.md index b114c5c..4af70bb 100644 --- a/packages/frontend-common/README.md +++ b/packages/frontend-common/README.md @@ -1,11 +1,13 @@ # `@notifycomp/frontend-common` -> TODO: description +Shared TypeScript utilities for the various frontend applications. Currently this +package exposes helper functions for date and time formatting that are consumed +by both the admin and public websites. ## Usage -``` -const frontendCommon = require('@notifycomp/frontend-common'); +```ts +import { formatDateRange } from '@notifycomp/frontend-common'; -// TODO: DEMONSTRATE API +console.log(formatDateRange('2023-01-01', '2023-01-05')); ``` diff --git a/packages/frontend-common/package.json b/packages/frontend-common/package.json index 1d00f45..54fb391 100644 --- a/packages/frontend-common/package.json +++ b/packages/frontend-common/package.json @@ -1,7 +1,7 @@ { "name": "@notifycomp/frontend-common", "version": "0.0.1", - "description": "> TODO: description", + "description": "Shared utilities for competition schedule frontends", "author": "Choover ", "homepage": "https://github.com/coder13/competition-schedule-live#readme", "license": "ISC",