This is a monorepo and includes the following:
backend
: a Node.js app that exposes a REST API.frontend
: a Vue.js 3 SPA for books that consumes the REST API exposed by thebackend
.shared-types
: a package that contains shared types.eslint-config-shared
: ESLint configurations package used throughout the monorepo.
Each package/app is 100% Typescript.
yarn
: package manager (version 1.22)turborepo
: monorepo managementeslint
: lintingprettier
: code formatterhusky
: git hooks managementlint-staged
: run linters on staged files, prior to commitsmocha
: testingsupertest
: HTTP request testingchai
: assertion library- other tools used throughout the monorepo
To install all dependencies, execute the following command:
yarn install
To start active development on all apps and packages, run:
yarn dev
To build all apps and packages, use:
yarn build
To serve all applications and packages, run:
yarn serve
Note: Ensure you've run
yarn build
before serving the applications
To run lint checks across all apps and packages, use:
yarn lint
To execute tests across all apps and packages, run:
yarn test
For end-to-end (e2e) tests, use:
yarn test:e2e
Note: Remember to run
npx playwright install
before executing e2e tests.
To perform type-checking across all apps and packages, run:
yarn type-check
To format all apps and packages using Prettier, use:
yarn format
Endpoint | Method | Description |
---|---|---|
/import | POST | Import functionality endpoint |
/import | GET | Retrieve import information endpoint |
/export | POST | Export functionality endpoint |
/export | GET | Retrieve export information endpoint |
/books | GET | Retrieve all books endpoint |
/books?page=1&limit=10 | GET | Retrieve paginated books endpoint |
Parameter | Description |
---|---|
page | Specifies the page number |
limit | Number of books per page |