12. Conclusion
We have written the [Vue.js] client for the [RdvMedecins] application. For the user, it provides the same pages as the HTML application from the [NestJS] course; for the developer, everything has changed:
- the server no longer generates pages. It exposes a JSON API, whose contract (routes, body, codes, and error keys) was sufficient to write the client without ever reading its code;
- the pages, language, formatting, messages, and navigation have moved to the browser;
- Security, however, has not changed: it is still the server that authenticates (cookie [HttpOnly]), verifies roles and management rules, and decides what a patient is authorized to see. The client simply displays what the server sends it.
The same JSON server could serve other clients: a mobile app, an [Angular] or [React] client, or a script. That is the whole point of separating the client from the server with an API.
The [Vue.js] concepts covered in this course (components, reactivity, router, stores, composables) are common to all [Vue.js] applications. To learn more:
- the official documentation: https://vuejs.org;
- tests: [Vitest] for unit tests of components and composables, [Playwright] for end-to-end tests (this is the tool used to create the screenshots in this document);
- [Nuxt], the framework built on top of [Vue.js], which can also generate pages on the server side: this would then partially replicate the architecture of the [NestJS] course.